1135446Strhodes/*
2262706Serwin * Copyright (C) 2004-2009, 2012, 2014  Internet Systems Consortium, Inc. ("ISC")
3135446Strhodes * Copyright (C) 1999-2003  Internet Software Consortium.
4135446Strhodes *
5186462Sdougb * Permission to use, copy, modify, and/or distribute this software for any
6135446Strhodes * purpose with or without fee is hereby granted, provided that the above
7135446Strhodes * copyright notice and this permission notice appear in all copies.
8135446Strhodes *
9135446Strhodes * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10135446Strhodes * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11135446Strhodes * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12135446Strhodes * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13135446Strhodes * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14135446Strhodes * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15135446Strhodes * PERFORMANCE OF THIS SOFTWARE.
16135446Strhodes */
17135446Strhodes
18234010Sdougb/* $Id$ */
19135446Strhodes
20135446Strhodes#ifndef ISC_TYPES_H
21135446Strhodes#define ISC_TYPES_H 1
22135446Strhodes
23224092Sdougb#include <isc/bind9.h>
24224092Sdougb#include <isc/namespace.h>
25224092Sdougb
26193149Sdougb/*! \file isc/types.h
27170222Sdougb * \brief
28135446Strhodes * OS-specific types, from the OS-specific include directories.
29135446Strhodes */
30135446Strhodes#include <isc/int.h>
31135446Strhodes#include <isc/offset.h>
32135446Strhodes
33135446Strhodes/*
34135446Strhodes * XXXDCL should isc_boolean_t be moved here, requiring an explicit include
35135446Strhodes * of <isc/boolean.h> when ISC_TRUE/ISC_FALSE/ISC_TF() are desired?
36135446Strhodes */
37135446Strhodes#include <isc/boolean.h>
38135446Strhodes/*
39135446Strhodes * XXXDCL This is just for ISC_LIST and ISC_LINK, but gets all of the other
40135446Strhodes * list macros too.
41135446Strhodes */
42135446Strhodes#include <isc/list.h>
43135446Strhodes
44170222Sdougb/* Core Types.  Alphabetized by defined type. */
45135446Strhodes
46224092Sdougbtypedef struct isc_appctx		isc_appctx_t;	 	/*%< Application context */
47224092Sdougbtypedef struct isc_backtrace_symmap	isc_backtrace_symmap_t; /*%< Symbol Table Entry */
48170222Sdougbtypedef struct isc_bitstring		isc_bitstring_t; 	/*%< Bitstring */
49170222Sdougbtypedef struct isc_buffer		isc_buffer_t;		/*%< Buffer */
50170222Sdougbtypedef ISC_LIST(isc_buffer_t)		isc_bufferlist_t;	/*%< Buffer List */
51170222Sdougbtypedef struct isc_constregion		isc_constregion_t;	/*%< Const region */
52170222Sdougbtypedef struct isc_consttextregion	isc_consttextregion_t;	/*%< Const Text Region */
53170222Sdougbtypedef struct isc_entropy		isc_entropy_t;		/*%< Entropy */
54170222Sdougbtypedef struct isc_entropysource	isc_entropysource_t;	/*%< Entropy Source */
55170222Sdougbtypedef struct isc_event		isc_event_t;		/*%< Event */
56170222Sdougbtypedef ISC_LIST(isc_event_t)		isc_eventlist_t;	/*%< Event List */
57170222Sdougbtypedef unsigned int			isc_eventtype_t;	/*%< Event Type */
58170222Sdougbtypedef isc_uint32_t			isc_fsaccess_t;		/*%< FS Access */
59170222Sdougbtypedef struct isc_hash			isc_hash_t;		/*%< Hash */
60193149Sdougbtypedef struct isc_httpd		isc_httpd_t;		/*%< HTTP client */
61193149Sdougbtypedef void (isc_httpdfree_t)(isc_buffer_t *, void *);		/*%< HTTP free function */
62193149Sdougbtypedef struct isc_httpdmgr		isc_httpdmgr_t;		/*%< HTTP manager */
63193149Sdougbtypedef struct isc_httpdurl		isc_httpdurl_t;		/*%< HTTP URL */
64193149Sdougbtypedef void (isc_httpdondestroy_t)(void *);			/*%< Callback on destroying httpd */
65170222Sdougbtypedef struct isc_interface		isc_interface_t;	/*%< Interface */
66170222Sdougbtypedef struct isc_interfaceiter	isc_interfaceiter_t;	/*%< Interface Iterator */
67170222Sdougbtypedef struct isc_interval		isc_interval_t;		/*%< Interval */
68170222Sdougbtypedef struct isc_lex			isc_lex_t;		/*%< Lex */
69170222Sdougbtypedef struct isc_log 			isc_log_t;		/*%< Log */
70170222Sdougbtypedef struct isc_logcategory		isc_logcategory_t;	/*%< Log Category */
71170222Sdougbtypedef struct isc_logconfig		isc_logconfig_t;	/*%< Log Configuration */
72170222Sdougbtypedef struct isc_logmodule		isc_logmodule_t;	/*%< Log Module */
73170222Sdougbtypedef struct isc_mem			isc_mem_t;		/*%< Memory */
74170222Sdougbtypedef struct isc_mempool		isc_mempool_t;		/*%< Memory Pool */
75170222Sdougbtypedef struct isc_msgcat		isc_msgcat_t;		/*%< Message Catalog */
76170222Sdougbtypedef struct isc_ondestroy		isc_ondestroy_t;	/*%< On Destroy */
77170222Sdougbtypedef struct isc_netaddr		isc_netaddr_t;		/*%< Net Address */
78186462Sdougbtypedef struct isc_portset		isc_portset_t;		/*%< Port Set */
79170222Sdougbtypedef struct isc_quota		isc_quota_t;		/*%< Quota */
80170222Sdougbtypedef struct isc_random		isc_random_t;		/*%< Random */
81170222Sdougbtypedef struct isc_ratelimiter		isc_ratelimiter_t;	/*%< Rate Limiter */
82170222Sdougbtypedef struct isc_region		isc_region_t;		/*%< Region */
83170222Sdougbtypedef isc_uint64_t			isc_resourcevalue_t;	/*%< Resource Value */
84170222Sdougbtypedef unsigned int			isc_result_t;		/*%< Result */
85170222Sdougbtypedef struct isc_rwlock		isc_rwlock_t;		/*%< Read Write Lock */
86170222Sdougbtypedef struct isc_sockaddr		isc_sockaddr_t;		/*%< Socket Address */
87170222Sdougbtypedef struct isc_socket		isc_socket_t;		/*%< Socket */
88170222Sdougbtypedef struct isc_socketevent		isc_socketevent_t;	/*%< Socket Event */
89170222Sdougbtypedef struct isc_socketmgr		isc_socketmgr_t;	/*%< Socket Manager */
90193149Sdougbtypedef struct isc_stats		isc_stats_t;		/*%< Statistics */
91193149Sdougbtypedef int				isc_statscounter_t;	/*%< Statistics Counter */
92170222Sdougbtypedef struct isc_symtab		isc_symtab_t;		/*%< Symbol Table */
93170222Sdougbtypedef struct isc_task			isc_task_t;		/*%< Task */
94170222Sdougbtypedef ISC_LIST(isc_task_t)		isc_tasklist_t;		/*%< Task List */
95170222Sdougbtypedef struct isc_taskmgr		isc_taskmgr_t;		/*%< Task Manager */
96170222Sdougbtypedef struct isc_textregion		isc_textregion_t;	/*%< Text Region */
97170222Sdougbtypedef struct isc_time			isc_time_t;		/*%< Time */
98170222Sdougbtypedef struct isc_timer		isc_timer_t;		/*%< Timer */
99170222Sdougbtypedef struct isc_timermgr		isc_timermgr_t;		/*%< Timer Manager */
100135446Strhodes
101135446Strhodestypedef void (*isc_taskaction_t)(isc_task_t *, isc_event_t *);
102224092Sdougbtypedef int (*isc_sockfdwatch_t)(isc_task_t *, isc_socket_t *, void *, int);
103135446Strhodes
104193149Sdougb/* The following cannot be listed alphabetically due to forward reference */
105193149Sdougbtypedef isc_result_t (isc_httpdaction_t)(const char *url,
106262706Serwin					 isc_httpdurl_t *urlinfo,
107193149Sdougb					 const char *querystring,
108262706Serwin					 const char *headers,
109193149Sdougb					 void *arg,
110193149Sdougb					 unsigned int *retcode,
111193149Sdougb					 const char **retmsg,
112193149Sdougb					 const char **mimetype,
113193149Sdougb					 isc_buffer_t *body,
114193149Sdougb					 isc_httpdfree_t **freecb,
115193149Sdougb					 void **freecb_args);
116193149Sdougbtypedef isc_boolean_t (isc_httpdclientok_t)(const isc_sockaddr_t *, void *);
117193149Sdougb
118170222Sdougb/*% Resource */
119135446Strhodestypedef enum {
120135446Strhodes	isc_resource_coresize = 1,
121135446Strhodes	isc_resource_cputime,
122135446Strhodes	isc_resource_datasize,
123135446Strhodes	isc_resource_filesize,
124135446Strhodes	isc_resource_lockedmemory,
125135446Strhodes	isc_resource_openfiles,
126135446Strhodes	isc_resource_processes,
127135446Strhodes	isc_resource_residentsize,
128135446Strhodes	isc_resource_stacksize
129135446Strhodes} isc_resource_t;
130135446Strhodes
131135446Strhodes#endif /* ISC_TYPES_H */
132