types.h 5.84 KB
Newer Older
1
/*
Tinderbox User's avatar
Tinderbox User committed
2
 * Copyright (C) 2004-2009, 2012, 2013  Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
Mark Andrews committed
3
 * Copyright (C) 1999-2003  Internet Software Consortium.
4
 *
Automatic Updater's avatar
Automatic Updater committed
5
 * Permission to use, copy, modify, and/or distribute this software for any
6 7
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
8
 *
Mark Andrews's avatar
Mark Andrews committed
9 10 11 12 13 14 15
 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
16 17
 */

Mark Andrews's avatar
Mark Andrews committed
18
/* $Id$ */
David Lawrence's avatar
David Lawrence committed
19

20 21 22
#ifndef ISC_TYPES_H
#define ISC_TYPES_H 1

23
#include <isc/bind9.h>
24 25
#include <isc/namespace.h>

26
/*! \file isc/types.h
27
 * \brief
28 29
 * OS-specific types, from the OS-specific include directories.
 */
30
#include <isc/int.h>
31 32 33 34 35 36
#include <isc/offset.h>

/*
 * XXXDCL should isc_boolean_t be moved here, requiring an explicit include
 * of <isc/boolean.h> when ISC_TRUE/ISC_FALSE/ISC_TF() are desired?
 */
Michael Graff's avatar
Michael Graff committed
37
#include <isc/boolean.h>
38 39 40 41
/*
 * XXXDCL This is just for ISC_LIST and ISC_LINK, but gets all of the other
 * list macros too.
 */
Bob Halley's avatar
Bob Halley committed
42 43
#include <isc/list.h>

44
/* Core Types.  Alphabetized by defined type. */
Bob Halley's avatar
Bob Halley committed
45

46
typedef struct isc_appctx		isc_appctx_t;	 	/*%< Application context */
47
typedef struct isc_backtrace_symmap	isc_backtrace_symmap_t; /*%< Symbol Table Entry */
48 49 50 51 52 53 54 55 56 57 58 59
typedef struct isc_bitstring		isc_bitstring_t; 	/*%< Bitstring */
typedef struct isc_buffer		isc_buffer_t;		/*%< Buffer */
typedef ISC_LIST(isc_buffer_t)		isc_bufferlist_t;	/*%< Buffer List */
typedef struct isc_constregion		isc_constregion_t;	/*%< Const region */
typedef struct isc_consttextregion	isc_consttextregion_t;	/*%< Const Text Region */
typedef struct isc_entropy		isc_entropy_t;		/*%< Entropy */
typedef struct isc_entropysource	isc_entropysource_t;	/*%< Entropy Source */
typedef struct isc_event		isc_event_t;		/*%< Event */
typedef ISC_LIST(isc_event_t)		isc_eventlist_t;	/*%< Event List */
typedef unsigned int			isc_eventtype_t;	/*%< Event Type */
typedef isc_uint32_t			isc_fsaccess_t;		/*%< FS Access */
typedef struct isc_hash			isc_hash_t;		/*%< Hash */
60
typedef struct isc_httpd		isc_httpd_t;		/*%< HTTP client */
61
typedef void (isc_httpdfree_t)(isc_buffer_t *, void *);		/*%< HTTP free function */
62 63
typedef struct isc_httpdmgr		isc_httpdmgr_t;		/*%< HTTP manager */
typedef struct isc_httpdurl		isc_httpdurl_t;		/*%< HTTP URL */
64
typedef void (isc_httpdondestroy_t)(void *);			/*%< Callback on destroying httpd */
65 66 67 68 69 70 71 72 73 74 75 76 77
typedef struct isc_interface		isc_interface_t;	/*%< Interface */
typedef struct isc_interfaceiter	isc_interfaceiter_t;	/*%< Interface Iterator */
typedef struct isc_interval		isc_interval_t;		/*%< Interval */
typedef struct isc_lex			isc_lex_t;		/*%< Lex */
typedef struct isc_log 			isc_log_t;		/*%< Log */
typedef struct isc_logcategory		isc_logcategory_t;	/*%< Log Category */
typedef struct isc_logconfig		isc_logconfig_t;	/*%< Log Configuration */
typedef struct isc_logmodule		isc_logmodule_t;	/*%< Log Module */
typedef struct isc_mem			isc_mem_t;		/*%< Memory */
typedef struct isc_mempool		isc_mempool_t;		/*%< Memory Pool */
typedef struct isc_msgcat		isc_msgcat_t;		/*%< Message Catalog */
typedef struct isc_ondestroy		isc_ondestroy_t;	/*%< On Destroy */
typedef struct isc_netaddr		isc_netaddr_t;		/*%< Net Address */
78
typedef struct isc_portset		isc_portset_t;		/*%< Port Set */
79 80 81 82 83 84 85 86 87 88 89
typedef struct isc_quota		isc_quota_t;		/*%< Quota */
typedef struct isc_random		isc_random_t;		/*%< Random */
typedef struct isc_ratelimiter		isc_ratelimiter_t;	/*%< Rate Limiter */
typedef struct isc_region		isc_region_t;		/*%< Region */
typedef isc_uint64_t			isc_resourcevalue_t;	/*%< Resource Value */
typedef unsigned int			isc_result_t;		/*%< Result */
typedef struct isc_rwlock		isc_rwlock_t;		/*%< Read Write Lock */
typedef struct isc_sockaddr		isc_sockaddr_t;		/*%< Socket Address */
typedef struct isc_socket		isc_socket_t;		/*%< Socket */
typedef struct isc_socketevent		isc_socketevent_t;	/*%< Socket Event */
typedef struct isc_socketmgr		isc_socketmgr_t;	/*%< Socket Manager */
90 91
typedef struct isc_stats		isc_stats_t;		/*%< Statistics */
typedef int				isc_statscounter_t;	/*%< Statistics Counter */
92 93 94 95 96 97 98 99
typedef struct isc_symtab		isc_symtab_t;		/*%< Symbol Table */
typedef struct isc_task			isc_task_t;		/*%< Task */
typedef ISC_LIST(isc_task_t)		isc_tasklist_t;		/*%< Task List */
typedef struct isc_taskmgr		isc_taskmgr_t;		/*%< Task Manager */
typedef struct isc_textregion		isc_textregion_t;	/*%< Text Region */
typedef struct isc_time			isc_time_t;		/*%< Time */
typedef struct isc_timer		isc_timer_t;		/*%< Timer */
typedef struct isc_timermgr		isc_timermgr_t;		/*%< Timer Manager */
Bob Halley's avatar
Bob Halley committed
100 101

typedef void (*isc_taskaction_t)(isc_task_t *, isc_event_t *);
102
typedef int (*isc_sockfdwatch_t)(isc_task_t *, isc_socket_t *, void *, int);
103 104

/* The following cannot be listed alphabetically due to forward reference */
105 106 107 108 109 110 111 112 113
typedef isc_result_t (isc_httpdaction_t)(const char *url,
					 const char *querystring,
					 void *arg,
					 unsigned int *retcode,
					 const char **retmsg,
					 const char **mimetype,
					 isc_buffer_t *body,
					 isc_httpdfree_t **freecb,
					 void **freecb_args);
114
typedef isc_boolean_t (isc_httpdclientok_t)(const isc_sockaddr_t *, void *);
115

116
/*% Resource */
117 118 119 120 121 122 123 124 125 126 127 128
typedef enum {
	isc_resource_coresize = 1,
	isc_resource_cputime,
	isc_resource_datasize,
	isc_resource_filesize,
	isc_resource_lockedmemory,
	isc_resource_openfiles,
	isc_resource_processes,
	isc_resource_residentsize,
	isc_resource_stacksize
} isc_resource_t;

129 130 131
/*% Statistics formats (text file or XML) */
typedef enum {
	isc_statsformat_file,
132 133
	isc_statsformat_xml,
	isc_statsformat_json
134 135
} isc_statsformat_t;

136
#endif /* ISC_TYPES_H */