types.h revision 170222
1/*
2 * Copyright (C) 2004, 2005  Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2003  Internet Software Consortium.
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
16 */
17
18/* $Id: types.h,v 1.35.18.2 2005/04/29 00:17:04 marka Exp $ */
19
20#ifndef ISC_TYPES_H
21#define ISC_TYPES_H 1
22
23/*! \file
24 * \brief
25 * OS-specific types, from the OS-specific include directories.
26 */
27#include <isc/int.h>
28#include <isc/offset.h>
29
30/*
31 * XXXDCL should isc_boolean_t be moved here, requiring an explicit include
32 * of <isc/boolean.h> when ISC_TRUE/ISC_FALSE/ISC_TF() are desired?
33 */
34#include <isc/boolean.h>
35/*
36 * XXXDCL This is just for ISC_LIST and ISC_LINK, but gets all of the other
37 * list macros too.
38 */
39#include <isc/list.h>
40
41/* Core Types.  Alphabetized by defined type. */
42
43typedef struct isc_bitstring		isc_bitstring_t; 	/*%< Bitstring */
44typedef struct isc_buffer		isc_buffer_t;		/*%< Buffer */
45typedef ISC_LIST(isc_buffer_t)		isc_bufferlist_t;	/*%< Buffer List */
46typedef struct isc_constregion		isc_constregion_t;	/*%< Const region */
47typedef struct isc_consttextregion	isc_consttextregion_t;	/*%< Const Text Region */
48typedef struct isc_entropy		isc_entropy_t;		/*%< Entropy */
49typedef struct isc_entropysource	isc_entropysource_t;	/*%< Entropy Source */
50typedef struct isc_event		isc_event_t;		/*%< Event */
51typedef ISC_LIST(isc_event_t)		isc_eventlist_t;	/*%< Event List */
52typedef unsigned int			isc_eventtype_t;	/*%< Event Type */
53typedef isc_uint32_t			isc_fsaccess_t;		/*%< FS Access */
54typedef struct isc_hash			isc_hash_t;		/*%< Hash */
55typedef struct isc_interface		isc_interface_t;	/*%< Interface */
56typedef struct isc_interfaceiter	isc_interfaceiter_t;	/*%< Interface Iterator */
57typedef struct isc_interval		isc_interval_t;		/*%< Interval */
58typedef struct isc_lex			isc_lex_t;		/*%< Lex */
59typedef struct isc_log 			isc_log_t;		/*%< Log */
60typedef struct isc_logcategory		isc_logcategory_t;	/*%< Log Category */
61typedef struct isc_logconfig		isc_logconfig_t;	/*%< Log Configuration */
62typedef struct isc_logmodule		isc_logmodule_t;	/*%< Log Module */
63typedef struct isc_mem			isc_mem_t;		/*%< Memory */
64typedef struct isc_mempool		isc_mempool_t;		/*%< Memory Pool */
65typedef struct isc_msgcat		isc_msgcat_t;		/*%< Message Catalog */
66typedef struct isc_ondestroy		isc_ondestroy_t;	/*%< On Destroy */
67typedef struct isc_netaddr		isc_netaddr_t;		/*%< Net Address */
68typedef struct isc_quota		isc_quota_t;		/*%< Quota */
69typedef struct isc_random		isc_random_t;		/*%< Random */
70typedef struct isc_ratelimiter		isc_ratelimiter_t;	/*%< Rate Limiter */
71typedef struct isc_region		isc_region_t;		/*%< Region */
72typedef isc_uint64_t			isc_resourcevalue_t;	/*%< Resource Value */
73typedef unsigned int			isc_result_t;		/*%< Result */
74typedef struct isc_rwlock		isc_rwlock_t;		/*%< Read Write Lock */
75typedef struct isc_sockaddr		isc_sockaddr_t;		/*%< Socket Address */
76typedef struct isc_socket		isc_socket_t;		/*%< Socket */
77typedef struct isc_socketevent		isc_socketevent_t;	/*%< Socket Event */
78typedef struct isc_socketmgr		isc_socketmgr_t;	/*%< Socket Manager */
79typedef struct isc_symtab		isc_symtab_t;		/*%< Symbol Table */
80typedef struct isc_task			isc_task_t;		/*%< Task */
81typedef ISC_LIST(isc_task_t)		isc_tasklist_t;		/*%< Task List */
82typedef struct isc_taskmgr		isc_taskmgr_t;		/*%< Task Manager */
83typedef struct isc_textregion		isc_textregion_t;	/*%< Text Region */
84typedef struct isc_time			isc_time_t;		/*%< Time */
85typedef struct isc_timer		isc_timer_t;		/*%< Timer */
86typedef struct isc_timermgr		isc_timermgr_t;		/*%< Timer Manager */
87
88typedef void (*isc_taskaction_t)(isc_task_t *, isc_event_t *);
89
90/*% Resource */
91typedef enum {
92	isc_resource_coresize = 1,
93	isc_resource_cputime,
94	isc_resource_datasize,
95	isc_resource_filesize,
96	isc_resource_lockedmemory,
97	isc_resource_openfiles,
98	isc_resource_processes,
99	isc_resource_residentsize,
100	isc_resource_stacksize
101} isc_resource_t;
102
103#endif /* ISC_TYPES_H */
104