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