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