#define BIND_SERVICE_NAME "named"
void
-ntservice_init();
+ ntservice_init();
void UpdateSCM(DWORD);
void
ServiceControl(DWORD dwCtrlCode);
* special tokens are %zone%, %record%, %client%
*/
struct query_segment {
- void *sql;
+ void * sql;
unsigned int strlen;
- bool direct;
+ bool direct;
ISC_LINK(query_segment_t) link;
};
* make sure no two threads try to use the same DBI at a time.
*/
struct dbinstance {
- void *dbconn;
+ void * dbconn;
query_list_t *allnodes_q;
query_list_t *allowxfr_q;
query_list_t *authority_q;
query_list_t *findzone_q;
query_list_t *lookup_q;
query_list_t *countzone_q;
- char *query_buf;
- char *zone;
- char *record;
- char *client;
- isc_mem_t *mctx;
- isc_mutex_t instance_lock;
+ char * query_buf;
+ char * zone;
+ char * record;
+ char * client;
+ isc_mem_t * mctx;
+ isc_mutex_t instance_lock;
ISC_LINK(dbinstance_t) link;
};
* special tokens are %zone%, %record%, %client%
*/
struct query_segment {
- void *cmd;
+ void * cmd;
unsigned int strlen;
- bool direct;
+ bool direct;
DLZ_LINK(query_segment_t) link;
};
* make sure no two threads try to use the same DBI at a time.
*/
struct dbinstance {
- void *dbconn;
+ void * dbconn;
query_list_t *allnodes_q;
query_list_t *allowxfr_q;
query_list_t *authority_q;
query_list_t *findzone_q;
query_list_t *lookup_q;
query_list_t *countzone_q;
- char *query_buf;
- char *zone;
- char *record;
- char *client;
- dlz_mutex_t lock;
+ char * query_buf;
+ char * zone;
+ char * record;
+ char * client;
+ dlz_mutex_t lock;
DLZ_LINK(dbinstance_t) link;
};
#include <inttypes.h>
#include <stdbool.h>
+
#include <sys/socket.h>
#include <sys/types.h>
#ifdef ISC_PLATFORM_HAVESYSUNH
#include <netinet/in.h>
typedef unsigned int isc_result_t;
-typedef uint32_t dns_ttl_t;
+typedef uint32_t dns_ttl_t;
/*
* Define DLZ_DLOPEN_VERSION to different values to use older versions
do { \
union { \
const void *k; \
- void *v; \
+ void * v; \
} _u; \
_u.k = konst; \
var = _u.v; \
*/
typedef struct isc_sockaddr {
union {
- struct sockaddr sa;
- struct sockaddr_in sin;
+ struct sockaddr sa;
+ struct sockaddr_in sin;
struct sockaddr_in6 sin6;
#ifdef ISC_PLATFORM_HAVESYSUNH
struct sockaddr_un sunix;
#endif /* ifdef ISC_PLATFORM_HAVESYSUNH */
} type;
unsigned int length;
- void *link;
+ void * link;
} isc_sockaddr_t;
#define DNS_CLIENTINFO_VERSION 2
typedef struct dns_clientinfo {
uint16_t version;
- void *data;
- void *dbversion;
+ void * data;
+ void * dbversion;
} dns_clientinfo_t;
typedef isc_result_t (*dns_clientinfo_sourceip_t)(dns_clientinfo_t *client,
- isc_sockaddr_t **addrp);
+ isc_sockaddr_t ** addrp);
typedef isc_result_t (*dns_clientinfo_version_t)(dns_clientinfo_t *client,
- void **addrp);
+ void ** addrp);
#define DNS_CLIENTINFOMETHODS_VERSION 2
#define DNS_CLIENTINFOMETHODS_AGE 1
typedef struct dns_clientinfomethods {
- uint16_t version;
- uint16_t age;
+ uint16_t version;
+ uint16_t age;
dns_clientinfo_sourceip_t sourceip;
- dns_clientinfo_version_t dbversion;
+ dns_clientinfo_version_t dbversion;
} dns_clientinfomethods_t;
#endif /* DLZ_DLOPEN_VERSION > 1 */
#ifdef ISC_IRS_NEEDADDRINFO
struct addrinfo {
- int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
- int ai_family; /* PF_xxx */
- int ai_socktype; /* SOCK_xxx */
- int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and
- * IPv6 */
- size_t ai_addrlen; /* Length of ai_addr */
- char *ai_canonname; /* Canonical name for hostname */
- struct sockaddr *ai_addr; /* Binary address */
- struct addrinfo *ai_next; /* Next structure in linked list */
+ int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
+ int ai_family; /* PF_xxx */
+ int ai_socktype; /* SOCK_xxx */
+ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and
+ * IPv6 */
+ size_t ai_addrlen; /* Length of ai_addr */
+ char * ai_canonname; /* Canonical name for hostname */
+ struct sockaddr *ai_addr; /* Binary address */
+ struct addrinfo *ai_next; /* Next structure in linked list */
};
#endif /* ifdef ISC_IRS_NEEDADDRINFO */
typedef struct isc_mutexstats isc_mutexstats_t;
typedef struct {
- pthread_mutex_t mutex; /*%< The actual mutex. */
+ pthread_mutex_t mutex; /*%< The actual mutex. */
isc_mutexstats_t *stats; /*%< Mutex statistics. */
} isc_mutex_t;
#else /* if ISC_MUTEX_PROFILE */
ISC_LANG_BEGINDECLS
typedef pthread_t isc_thread_t;
-typedef void *isc_threadresult_t;
-typedef void *isc_threadarg_t;
+typedef void * isc_threadresult_t;
+typedef void * isc_threadarg_t;
typedef isc_threadresult_t (*isc_threadfunc_t)(isc_threadarg_t);
void
/*! \file */
#include <dirent.h>
-#include <sys/types.h> /* Required on some systems. */
#include <isc/lang.h>
#include <isc/platform.h>
#include <isc/result.h>
+#include <sys/types.h> /* Required on some systems. */
+
/*% Directory Entry */
typedef struct isc_direntry {
- char name[NAME_MAX];
+ char name[NAME_MAX];
unsigned int length;
} isc_direntry_t;
/*% Directory */
typedef struct isc_dir {
- unsigned int magic;
- char dirname[PATH_MAX];
+ unsigned int magic;
+ char dirname[PATH_MAX];
isc_direntry_t entry;
- DIR *handle;
+ DIR * handle;
} isc_dir_t;
ISC_LANG_BEGINDECLS
/***
*** Imports.
***/
-#include <arpa/inet.h> /* Contractual promise. */
#include <inttypes.h>
-#include <net/if.h>
-#include <netinet/in.h> /* Contractual promise. */
-#include <sys/socket.h> /* Contractual promise. */
-#include <sys/types.h>
#include <isc/lang.h>
#include <isc/platform.h>
#include <isc/types.h>
+#include <arpa/inet.h> /* Contractual promise. */
+#include <net/if.h>
+#include <netinet/in.h> /* Contractual promise. */
+#include <sys/socket.h> /* Contractual promise. */
+#include <sys/types.h>
+
#ifndef IN6ADDR_LOOPBACK_INIT
#ifdef s6_addr
/*% IPv6 address loopback init */
*/
#include <limits.h> /* Required for CHAR_BIT. */
#include <stddef.h> /* For Linux Standard Base. */
+
#include <sys/types.h>
typedef off_t isc_offset_t;
typedef enum memory_order memory_order;
-typedef int_fast32_t atomic_int_fast32_t;
+typedef int_fast32_t atomic_int_fast32_t;
typedef uint_fast32_t atomic_uint_fast32_t;
-typedef int_fast64_t atomic_int_fast64_t;
+typedef int_fast64_t atomic_int_fast64_t;
typedef uint_fast64_t atomic_uint_fast64_t;
-typedef bool atomic_bool;
+typedef bool atomic_bool;
typedef uint_fast64_t atomic_uintptr_t;
struct isc_condition_thread {
unsigned long th;
- HANDLE handle[2];
+ HANDLE handle[2];
ISC_LINK(isc_condition_thread_t) link;
};
typedef struct isc_condition {
- HANDLE events[2];
+ HANDLE events[2];
unsigned int waiters;
ISC_LIST(isc_condition_thread_t) threadlist;
} isc_condition_t;
#include <isc/result.h>
typedef struct {
- char name[NAME_MAX];
- unsigned int length;
+ char name[NAME_MAX];
+ unsigned int length;
WIN32_FIND_DATA find_data;
} isc_direntry_t;
typedef struct {
- unsigned int magic;
- char dirname[PATH_MAX];
+ unsigned int magic;
+ char dirname[PATH_MAX];
isc_direntry_t entry;
- bool entry_filled;
- HANDLE search_handle;
+ bool entry_filled;
+ HANDLE search_handle;
} isc_dir_t;
ISC_LANG_BEGINDECLS
#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
#endif /* ifndef _WINSOCKAPI_ */
-#include <sys/types.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <isc/lang.h>
#include <isc/types.h>
+#include <sys/types.h>
+
/*
* This is here because named client, interfacemgr.c, etc. use the name as
* a variable
* File offsets are operating-system dependent.
*/
#include <limits.h> /* Required for CHAR_BIT. */
+
#include <sys/types.h>
typedef _off_t isc_offset_t;
atomic_compare_exchange_strong_explicit8(atomic_int_fast8_t *obj,
int8_t *expected, int8_t desired,
memory_order succ, memory_order fail) {
- bool __r;
+ bool __r;
int8_t __v;
UNUSED(succ);
int32_t *expected, int32_t desired,
memory_order succ,
memory_order fail) {
- bool __r;
+ bool __r;
int32_t __v;
UNUSED(succ);
int64_t *expected, int64_t desired,
memory_order succ,
memory_order fail) {
- bool __r;
+ bool __r;
int64_t __v;
UNUSED(succ);
}
typedef HANDLE isc_thread_t;
-typedef DWORD isc_threadresult_t;
-typedef void *isc_threadarg_t;
+typedef DWORD isc_threadresult_t;
+typedef void * isc_threadarg_t;
typedef isc_threadresult_t(WINAPI *isc_threadfunc_t)(isc_threadarg_t);
#define isc_thread_self (unsigned long)GetCurrentThreadId