mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Update the source code formatting using clang-format-17
This commit is contained in:
parent
1cf082baa6
commit
7c6632e174
26 changed files with 103 additions and 102 deletions
|
|
@ -99,7 +99,7 @@ static int nsec_datatype = dns_rdatatype_nsec;
|
|||
"dns_dbiterator_current()")
|
||||
|
||||
#define IS_NSEC3 (nsec_datatype == dns_rdatatype_nsec3)
|
||||
#define OPTOUT(x) (((x)&DNS_NSEC3FLAG_OPTOUT) != 0)
|
||||
#define OPTOUT(x) (((x) & DNS_NSEC3FLAG_OPTOUT) != 0)
|
||||
|
||||
#define REVOKE(x) ((dst_key_flags(x) & DNS_KEYFLAG_REVOKE) != 0)
|
||||
|
||||
|
|
|
|||
|
|
@ -448,8 +448,8 @@ enum {
|
|||
* These are currently used on simple unsigned ints, so they are
|
||||
* not really associated with any particular type.
|
||||
*/
|
||||
#define WANT_INET(x) (((x)&DNS_ADBFIND_INET) != 0)
|
||||
#define WANT_INET6(x) (((x)&DNS_ADBFIND_INET6) != 0)
|
||||
#define WANT_INET(x) (((x) & DNS_ADBFIND_INET) != 0)
|
||||
#define WANT_INET6(x) (((x) & DNS_ADBFIND_INET6) != 0)
|
||||
|
||||
#define EXPIRE_OK(exp, now) ((exp == INT_MAX) || (exp < now))
|
||||
|
||||
|
|
@ -458,12 +458,12 @@ enum {
|
|||
* glue, and compare this to the appropriate bits set in o, to see if
|
||||
* this is ok.
|
||||
*/
|
||||
#define GLUE_OK(nf, o) (!NAME_GLUEOK(nf) || (((o)&DNS_ADBFIND_GLUEOK) != 0))
|
||||
#define HINT_OK(nf, o) (!NAME_HINTOK(nf) || (((o)&DNS_ADBFIND_HINTOK) != 0))
|
||||
#define GLUE_OK(nf, o) (!NAME_GLUEOK(nf) || (((o) & DNS_ADBFIND_GLUEOK) != 0))
|
||||
#define HINT_OK(nf, o) (!NAME_HINTOK(nf) || (((o) & DNS_ADBFIND_HINTOK) != 0))
|
||||
#define GLUEHINT_OK(nf, o) (GLUE_OK(nf, o) || HINT_OK(nf, o))
|
||||
#define STARTATZONE_MATCHES(nf, o) \
|
||||
(((nf)->flags & DNS_ADBFIND_STARTATZONE) == \
|
||||
((o)&DNS_ADBFIND_STARTATZONE))
|
||||
((o) & DNS_ADBFIND_STARTATZONE))
|
||||
|
||||
#define ENTER_LEVEL ISC_LOG_DEBUG(50)
|
||||
#define EXIT_LEVEL ENTER_LEVEL
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@ extern unsigned int dns_pps;
|
|||
*****/
|
||||
|
||||
typedef struct dns_dbmethods {
|
||||
void (*attach)(dns_db_t *source, dns_db_t **targetp);
|
||||
void (*detach)(dns_db_t **dbp);
|
||||
void (*attach)(dns_db_t *source, dns_db_t **targetp);
|
||||
void (*detach)(dns_db_t **dbp);
|
||||
isc_result_t (*beginload)(dns_db_t *db,
|
||||
dns_rdatacallbacks_t *callbacks);
|
||||
isc_result_t (*endload)(dns_db_t *db, dns_rdatacallbacks_t *callbacks);
|
||||
|
|
@ -85,9 +85,9 @@ typedef struct dns_dbmethods {
|
|||
dns_masterformat_t masterformat);
|
||||
void (*currentversion)(dns_db_t *db, dns_dbversion_t **versionp);
|
||||
isc_result_t (*newversion)(dns_db_t *db, dns_dbversion_t **versionp);
|
||||
void (*attachversion)(dns_db_t *db, dns_dbversion_t *source,
|
||||
void (*attachversion)(dns_db_t *db, dns_dbversion_t *source,
|
||||
dns_dbversion_t **targetp);
|
||||
void (*closeversion)(dns_db_t *db, dns_dbversion_t **versionp,
|
||||
void (*closeversion)(dns_db_t *db, dns_dbversion_t **versionp,
|
||||
bool commit);
|
||||
isc_result_t (*findnode)(dns_db_t *db, const dns_name_t *name,
|
||||
bool create, dns_dbnode_t **nodep);
|
||||
|
|
@ -103,12 +103,12 @@ typedef struct dns_dbmethods {
|
|||
dns_name_t *dcname,
|
||||
dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset);
|
||||
void (*attachnode)(dns_db_t *db, dns_dbnode_t *source,
|
||||
void (*attachnode)(dns_db_t *db, dns_dbnode_t *source,
|
||||
dns_dbnode_t **targetp);
|
||||
void (*detachnode)(dns_db_t *db, dns_dbnode_t **targetp);
|
||||
void (*detachnode)(dns_db_t *db, dns_dbnode_t **targetp);
|
||||
isc_result_t (*expirenode)(dns_db_t *db, dns_dbnode_t *node,
|
||||
isc_stdtime_t now);
|
||||
void (*printnode)(dns_db_t *db, dns_dbnode_t *node, FILE *out);
|
||||
void (*printnode)(dns_db_t *db, dns_dbnode_t *node, FILE *out);
|
||||
isc_result_t (*createiterator)(dns_db_t *db, unsigned int options,
|
||||
dns_dbiterator_t **iteratorp);
|
||||
isc_result_t (*findrdataset)(dns_db_t *db, dns_dbnode_t *node,
|
||||
|
|
@ -135,13 +135,13 @@ typedef struct dns_dbmethods {
|
|||
dns_dbversion_t *version,
|
||||
dns_rdatatype_t type,
|
||||
dns_rdatatype_t covers);
|
||||
bool (*issecure)(dns_db_t *db);
|
||||
bool (*issecure)(dns_db_t *db);
|
||||
unsigned int (*nodecount)(dns_db_t *db, dns_dbtree_t);
|
||||
bool (*ispersistent)(dns_db_t *db);
|
||||
void (*overmem)(dns_db_t *db, bool overmem);
|
||||
void (*settask)(dns_db_t *db, isc_task_t *);
|
||||
bool (*ispersistent)(dns_db_t *db);
|
||||
void (*overmem)(dns_db_t *db, bool overmem);
|
||||
void (*settask)(dns_db_t *db, isc_task_t *);
|
||||
isc_result_t (*getoriginnode)(dns_db_t *db, dns_dbnode_t **nodep);
|
||||
void (*transfernode)(dns_db_t *db, dns_dbnode_t **sourcep,
|
||||
void (*transfernode)(dns_db_t *db, dns_dbnode_t **sourcep,
|
||||
dns_dbnode_t **targetp);
|
||||
isc_result_t (*getnsec3parameters)(dns_db_t *db,
|
||||
dns_dbversion_t *version,
|
||||
|
|
@ -155,11 +155,11 @@ typedef struct dns_dbmethods {
|
|||
isc_stdtime_t resign);
|
||||
isc_result_t (*getsigningtime)(dns_db_t *db, dns_rdataset_t *rdataset,
|
||||
dns_name_t *name);
|
||||
void (*resigned)(dns_db_t *db, dns_rdataset_t *rdataset,
|
||||
void (*resigned)(dns_db_t *db, dns_rdataset_t *rdataset,
|
||||
dns_dbversion_t *version);
|
||||
bool (*isdnssec)(dns_db_t *db);
|
||||
bool (*isdnssec)(dns_db_t *db);
|
||||
dns_stats_t *(*getrrsetstats)(dns_db_t *db);
|
||||
void (*rpz_attach)(dns_db_t *db, void *rpzs, uint8_t rpz_num);
|
||||
void (*rpz_attach)(dns_db_t *db, void *rpzs, uint8_t rpz_num);
|
||||
isc_result_t (*rpz_ready)(dns_db_t *db);
|
||||
isc_result_t (*findnodeext)(dns_db_t *db, const dns_name_t *name,
|
||||
bool create,
|
||||
|
|
@ -175,7 +175,7 @@ typedef struct dns_dbmethods {
|
|||
dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset);
|
||||
isc_result_t (*setcachestats)(dns_db_t *db, isc_stats_t *stats);
|
||||
size_t (*hashsize)(dns_db_t *db);
|
||||
size_t (*hashsize)(dns_db_t *db);
|
||||
isc_result_t (*nodefullname)(dns_db_t *db, dns_dbnode_t *node,
|
||||
dns_name_t *name);
|
||||
isc_result_t (*getsize)(dns_db_t *db, dns_dbversion_t *version,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ ISC_LANG_BEGINDECLS
|
|||
*****/
|
||||
|
||||
typedef struct dns_dbiteratormethods {
|
||||
void (*destroy)(dns_dbiterator_t **iteratorp);
|
||||
void (*destroy)(dns_dbiterator_t **iteratorp);
|
||||
isc_result_t (*first)(dns_dbiterator_t *iterator);
|
||||
isc_result_t (*last)(dns_dbiterator_t *iterator);
|
||||
isc_result_t (*seek)(dns_dbiterator_t *iterator,
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ dns_keynode_trust(dns_keynode_t *keynode);
|
|||
|
||||
isc_result_t
|
||||
dns_keytable_forall(dns_keytable_t *keytable,
|
||||
void (*func)(dns_keytable_t *, dns_keynode_t *,
|
||||
dns_name_t *, void *),
|
||||
void *arg);
|
||||
void (*func)(dns_keytable_t *, dns_keynode_t *,
|
||||
dns_name_t *, void *),
|
||||
void *arg);
|
||||
ISC_LANG_ENDDECLS
|
||||
|
|
|
|||
|
|
@ -699,7 +699,7 @@ dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum);
|
|||
|
||||
void
|
||||
dns_rbt_printtext(dns_rbt_t *rbt, void (*data_printer)(FILE *, void *),
|
||||
FILE *f);
|
||||
FILE *f);
|
||||
/*%<
|
||||
* Print an ASCII representation of the internal structure of the red-black
|
||||
* tree of trees to the passed stream.
|
||||
|
|
|
|||
|
|
@ -63,11 +63,11 @@ typedef enum {
|
|||
} dns_rdatasetadditional_t;
|
||||
|
||||
typedef struct dns_rdatasetmethods {
|
||||
void (*disassociate)(dns_rdataset_t *rdataset);
|
||||
void (*disassociate)(dns_rdataset_t *rdataset);
|
||||
isc_result_t (*first)(dns_rdataset_t *rdataset);
|
||||
isc_result_t (*next)(dns_rdataset_t *rdataset);
|
||||
void (*current)(dns_rdataset_t *rdataset, dns_rdata_t *rdata);
|
||||
void (*clone)(dns_rdataset_t *source, dns_rdataset_t *target);
|
||||
void (*current)(dns_rdataset_t *rdataset, dns_rdata_t *rdata);
|
||||
void (*clone)(dns_rdataset_t *source, dns_rdataset_t *target);
|
||||
unsigned int (*count)(dns_rdataset_t *rdataset);
|
||||
isc_result_t (*addnoqname)(dns_rdataset_t *rdataset,
|
||||
const dns_name_t *name);
|
||||
|
|
@ -77,9 +77,9 @@ typedef struct dns_rdatasetmethods {
|
|||
const dns_name_t *name);
|
||||
isc_result_t (*getclosest)(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig);
|
||||
void (*settrust)(dns_rdataset_t *rdataset, dns_trust_t trust);
|
||||
void (*expire)(dns_rdataset_t *rdataset);
|
||||
void (*clearprefetch)(dns_rdataset_t *rdataset);
|
||||
void (*settrust)(dns_rdataset_t *rdataset, dns_trust_t trust);
|
||||
void (*expire)(dns_rdataset_t *rdataset);
|
||||
void (*clearprefetch)(dns_rdataset_t *rdataset);
|
||||
void (*setownercase)(dns_rdataset_t *rdataset, const dns_name_t *name);
|
||||
void (*getownercase)(const dns_rdataset_t *rdataset, dns_name_t *name);
|
||||
isc_result_t (*addglue)(dns_rdataset_t *rdataset,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ ISC_LANG_BEGINDECLS
|
|||
*****/
|
||||
|
||||
typedef struct dns_rdatasetitermethods {
|
||||
void (*destroy)(dns_rdatasetiter_t **iteratorp);
|
||||
void (*destroy)(dns_rdatasetiter_t **iteratorp);
|
||||
isc_result_t (*first)(dns_rdatasetiter_t *iterator);
|
||||
isc_result_t (*next)(dns_rdatasetiter_t *iterator);
|
||||
void (*current)(dns_rdatasetiter_t *iterator, dns_rdataset_t *rdataset);
|
||||
|
|
|
|||
|
|
@ -493,7 +493,7 @@ extern const char *dns_statscounter_names[];
|
|||
/*%<
|
||||
* Conversion macros among dns_rdatatype_t, attributes and isc_statscounter_t.
|
||||
*/
|
||||
#define DNS_RDATASTATSTYPE_BASE(type) ((dns_rdatatype_t)((type)&0xFFFF))
|
||||
#define DNS_RDATASTATSTYPE_BASE(type) ((dns_rdatatype_t)((type) & 0xFFFF))
|
||||
#define DNS_RDATASTATSTYPE_ATTR(type) ((type) >> 16)
|
||||
#define DNS_RDATASTATSTYPE_VALUE(b, a) (((a) << 16) | (b))
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#include <dns/types.h>
|
||||
|
||||
typedef struct {
|
||||
void (*func)(void *arg, dns_zone_t *zone, int level,
|
||||
const char *message);
|
||||
void (*func)(void *arg, dns_zone_t *zone, int level,
|
||||
const char *message);
|
||||
void *arg;
|
||||
} dns_update_log_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -223,13 +223,13 @@ struct dns_view {
|
|||
* XXX: This should be a pointer to an opaque type that
|
||||
* named implements.
|
||||
*/
|
||||
char *new_zone_dir;
|
||||
char *new_zone_file;
|
||||
char *new_zone_db;
|
||||
void *new_zone_dbenv;
|
||||
uint64_t new_zone_mapsize;
|
||||
void *new_zone_config;
|
||||
void (*cfg_destroy)(void **);
|
||||
char *new_zone_dir;
|
||||
char *new_zone_file;
|
||||
char *new_zone_db;
|
||||
void *new_zone_dbenv;
|
||||
uint64_t new_zone_mapsize;
|
||||
void *new_zone_config;
|
||||
void (*cfg_destroy)(void **);
|
||||
isc_mutex_t new_zone_lock;
|
||||
|
||||
unsigned char secret[32]; /* Client secret */
|
||||
|
|
@ -241,11 +241,11 @@ struct dns_view {
|
|||
|
||||
/* Registered module instances */
|
||||
void *plugins;
|
||||
void (*plugins_free)(isc_mem_t *, void **);
|
||||
void (*plugins_free)(isc_mem_t *, void **);
|
||||
|
||||
/* Hook table */
|
||||
void *hooktable; /* ns_hooktable */
|
||||
void (*hooktable_free)(isc_mem_t *, void **);
|
||||
void (*hooktable_free)(isc_mem_t *, void **);
|
||||
};
|
||||
|
||||
#define DNS_VIEW_MAGIC ISC_MAGIC('V', 'i', 'e', 'w')
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
#define DNS_MASTER_LHS 2048
|
||||
#define DNS_MASTER_RHS MINTSIZ
|
||||
|
||||
#define CHECKNAMESFAIL(x) (((x)&DNS_MASTER_CHECKNAMESFAIL) != 0)
|
||||
#define CHECKNAMESFAIL(x) (((x) & DNS_MASTER_CHECKNAMESFAIL) != 0)
|
||||
|
||||
typedef ISC_LIST(dns_rdatalist_t) rdatalist_head_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@
|
|||
goto failure; \
|
||||
} while (0)
|
||||
|
||||
#define OPTOUT(x) (((x)&DNS_NSEC3FLAG_OPTOUT) != 0)
|
||||
#define CREATE(x) (((x)&DNS_NSEC3FLAG_CREATE) != 0)
|
||||
#define INITIAL(x) (((x)&DNS_NSEC3FLAG_INITIAL) != 0)
|
||||
#define REMOVE(x) (((x)&DNS_NSEC3FLAG_REMOVE) != 0)
|
||||
#define OPTOUT(x) (((x) & DNS_NSEC3FLAG_OPTOUT) != 0)
|
||||
#define CREATE(x) (((x) & DNS_NSEC3FLAG_CREATE) != 0)
|
||||
#define INITIAL(x) (((x) & DNS_NSEC3FLAG_INITIAL) != 0)
|
||||
#define REMOVE(x) (((x) & DNS_NSEC3FLAG_REMOVE) != 0)
|
||||
|
||||
isc_result_t
|
||||
dns_nsec3_buildrdata(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@
|
|||
* been requested to be built otherwise a NSEC chain needs to be built.
|
||||
*/
|
||||
|
||||
#define REMOVE(x) (((x)&DNS_NSEC3FLAG_REMOVE) != 0)
|
||||
#define CREATE(x) (((x)&DNS_NSEC3FLAG_CREATE) != 0)
|
||||
#define INITIAL(x) (((x)&DNS_NSEC3FLAG_INITIAL) != 0)
|
||||
#define NONSEC(x) (((x)&DNS_NSEC3FLAG_NONSEC) != 0)
|
||||
#define REMOVE(x) (((x) & DNS_NSEC3FLAG_REMOVE) != 0)
|
||||
#define CREATE(x) (((x) & DNS_NSEC3FLAG_CREATE) != 0)
|
||||
#define INITIAL(x) (((x) & DNS_NSEC3FLAG_INITIAL) != 0)
|
||||
#define NONSEC(x) (((x) & DNS_NSEC3FLAG_NONSEC) != 0)
|
||||
|
||||
#define CHECK(x) \
|
||||
do { \
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
typedef uint32_t rbtdb_serial_t;
|
||||
typedef uint32_t rbtdb_rdatatype_t;
|
||||
|
||||
#define RBTDB_RDATATYPE_BASE(type) ((dns_rdatatype_t)((type)&0xFFFF))
|
||||
#define RBTDB_RDATATYPE_BASE(type) ((dns_rdatatype_t)((type) & 0xFFFF))
|
||||
#define RBTDB_RDATATYPE_EXT(type) ((dns_rdatatype_t)((type) >> 16))
|
||||
#define RBTDB_RDATATYPE_VALUE(base, ext) \
|
||||
((rbtdb_rdatatype_t)(((uint32_t)ext) << 16) | \
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@
|
|||
*/
|
||||
#define RANGE(a, min, max) (((a) < (min)) ? (min) : ((a) < (max) ? (a) : (max)))
|
||||
|
||||
#define NSEC3REMOVE(x) (((x)&DNS_NSEC3FLAG_REMOVE) != 0)
|
||||
#define NSEC3REMOVE(x) (((x) & DNS_NSEC3FLAG_REMOVE) != 0)
|
||||
|
||||
/*%
|
||||
* Key flags
|
||||
|
|
|
|||
|
|
@ -86,29 +86,29 @@
|
|||
#include <inttypes.h>
|
||||
|
||||
#ifndef bswap_16
|
||||
#define bswap_16(x) \
|
||||
((uint16_t)((((uint16_t)(x)&0xff00) >> 8) | \
|
||||
(((uint16_t)(x)&0x00ff) << 8)))
|
||||
#define bswap_16(x) \
|
||||
((uint16_t)((((uint16_t)(x) & 0xff00) >> 8) | \
|
||||
(((uint16_t)(x) & 0x00ff) << 8)))
|
||||
#endif /* !bswap_16 */
|
||||
|
||||
#ifndef bswap_32
|
||||
#define bswap_32(x) \
|
||||
((uint32_t)((((uint32_t)(x)&0xff000000) >> 24) | \
|
||||
(((uint32_t)(x)&0x00ff0000) >> 8) | \
|
||||
(((uint32_t)(x)&0x0000ff00) << 8) | \
|
||||
(((uint32_t)(x)&0x000000ff) << 24)))
|
||||
#define bswap_32(x) \
|
||||
((uint32_t)((((uint32_t)(x) & 0xff000000) >> 24) | \
|
||||
(((uint32_t)(x) & 0x00ff0000) >> 8) | \
|
||||
(((uint32_t)(x) & 0x0000ff00) << 8) | \
|
||||
(((uint32_t)(x) & 0x000000ff) << 24)))
|
||||
#endif /* !bswap_32 */
|
||||
|
||||
#ifndef bswap_64
|
||||
#define bswap_64(x) \
|
||||
((uint64_t)((((uint64_t)(x)&0xff00000000000000ULL) >> 56) | \
|
||||
(((uint64_t)(x)&0x00ff000000000000ULL) >> 40) | \
|
||||
(((uint64_t)(x)&0x0000ff0000000000ULL) >> 24) | \
|
||||
(((uint64_t)(x)&0x000000ff00000000ULL) >> 8) | \
|
||||
(((uint64_t)(x)&0x00000000ff000000ULL) << 8) | \
|
||||
(((uint64_t)(x)&0x0000000000ff0000ULL) << 24) | \
|
||||
(((uint64_t)(x)&0x000000000000ff00ULL) << 40) | \
|
||||
(((uint64_t)(x)&0x00000000000000ffULL) << 56)))
|
||||
#define bswap_64(x) \
|
||||
((uint64_t)((((uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \
|
||||
(((uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \
|
||||
(((uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \
|
||||
(((uint64_t)(x) & 0x000000ff00000000ULL) >> 8) | \
|
||||
(((uint64_t)(x) & 0x00000000ff000000ULL) << 8) | \
|
||||
(((uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \
|
||||
(((uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \
|
||||
(((uint64_t)(x) & 0x00000000000000ffULL) << 56)))
|
||||
#endif /* !bswap_64 */
|
||||
|
||||
#ifndef htobe16
|
||||
|
|
|
|||
|
|
@ -192,10 +192,10 @@
|
|||
|
||||
/*% Is IP address multicast? */
|
||||
#define ISC_IPADDR_ISMULTICAST(i) \
|
||||
(((uint32_t)(i)&ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xe0000000))
|
||||
(((uint32_t)(i) & ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xe0000000))
|
||||
|
||||
#define ISC_IPADDR_ISEXPERIMENTAL(i) \
|
||||
(((uint32_t)(i)&ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xf0000000))
|
||||
(((uint32_t)(i) & ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xf0000000))
|
||||
|
||||
/***
|
||||
*** Functions.
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ isc_radix_process(isc_radix_tree_t *radix, isc_radix_processfunc_t func);
|
|||
*/
|
||||
|
||||
#define RADIX_MAXBITS 128
|
||||
#define RADIX_NBIT(x) (0x80 >> ((x)&0x7f))
|
||||
#define RADIX_NBIT(x) (0x80 >> ((x) & 0x7f))
|
||||
#define RADIX_NBYTE(x) ((x) >> 3)
|
||||
|
||||
#define RADIX_WALK(Xhead, Xnode) \
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ extern thread_local size_t isc_tid_v;
|
|||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
typedef pthread_t isc_thread_t;
|
||||
typedef void *isc_threadresult_t;
|
||||
typedef void *isc_threadarg_t;
|
||||
typedef pthread_t isc_thread_t;
|
||||
typedef void *isc_threadresult_t;
|
||||
typedef void *isc_threadarg_t;
|
||||
typedef isc_threadresult_t (*isc_threadfunc_t)(isc_threadarg_t);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ isc_netaddr_issitelocal(const isc_netaddr_t *na) {
|
|||
}
|
||||
|
||||
#define ISC_IPADDR_ISNETZERO(i) \
|
||||
(((uint32_t)(i)&ISC__IPADDR(0xff000000)) == ISC__IPADDR(0x00000000))
|
||||
(((uint32_t)(i) & ISC__IPADDR(0xff000000)) == ISC__IPADDR(0x00000000))
|
||||
|
||||
bool
|
||||
isc_netaddr_isnetzero(const isc_netaddr_t *na) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
#ifndef BIT_AT
|
||||
#define BIT_AT(a, i) \
|
||||
(!!((unsigned int)(a)[(unsigned int)(i) >> 3] & \
|
||||
(1 << ((unsigned int)(i)&7))))
|
||||
(1 << ((unsigned int)(i) & 7))))
|
||||
#endif
|
||||
|
||||
#if HTTP_PARSER_STRICT
|
||||
|
|
@ -201,7 +201,8 @@ typedef enum {
|
|||
#define IS_URL_CHAR(c) (BIT_AT(normal_url_char, (unsigned char)c))
|
||||
#define IS_HOST_CHAR(c) (isalnum((unsigned char)c) || (c) == '.' || (c) == '-')
|
||||
#else
|
||||
#define IS_URL_CHAR(c) (BIT_AT(normal_url_char, (unsigned char)c) || ((c)&0x80))
|
||||
#define IS_URL_CHAR(c) \
|
||||
(BIT_AT(normal_url_char, (unsigned char)c) || ((c) & 0x80))
|
||||
#define IS_HOST_CHAR(c) \
|
||||
(isalnum((unsigned char)c) || (c) == '.' || (c) == '-' || (c) == '_')
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -481,11 +481,11 @@ cfg_listelt_value(const cfg_listelt_t *elt);
|
|||
|
||||
void
|
||||
cfg_print(const cfg_obj_t *obj,
|
||||
void (*f)(void *closure, const char *text, int textlen),
|
||||
void *closure);
|
||||
void (*f)(void *closure, const char *text, int textlen),
|
||||
void *closure);
|
||||
void
|
||||
cfg_printx(const cfg_obj_t *obj, unsigned int flags,
|
||||
void (*f)(void *closure, const char *text, int textlen),
|
||||
void (*f)(void *closure, const char *text, int textlen),
|
||||
void *closure);
|
||||
|
||||
#define CFG_PRINTER_XKEY 0x1 /* '?' out shared keys. */
|
||||
|
|
@ -507,7 +507,7 @@ cfg_printx(const cfg_obj_t *obj, unsigned int flags,
|
|||
|
||||
void
|
||||
cfg_print_grammar(const cfg_type_t *type, unsigned int flags,
|
||||
void (*f)(void *closure, const char *text, int textlen),
|
||||
void (*f)(void *closure, const char *text, int textlen),
|
||||
void *closure);
|
||||
/*%<
|
||||
* Print a summary of the grammar of the configuration type 'type'.
|
||||
|
|
|
|||
|
|
@ -87,9 +87,9 @@ typedef struct cfg_rep cfg_rep_t;
|
|||
|
||||
typedef isc_result_t (*cfg_parsefunc_t)(cfg_parser_t *, const cfg_type_t *type,
|
||||
cfg_obj_t **);
|
||||
typedef void (*cfg_printfunc_t)(cfg_printer_t *, const cfg_obj_t *);
|
||||
typedef void (*cfg_docfunc_t)(cfg_printer_t *, const cfg_type_t *);
|
||||
typedef void (*cfg_freefunc_t)(cfg_parser_t *, cfg_obj_t *);
|
||||
typedef void (*cfg_printfunc_t)(cfg_printer_t *, const cfg_obj_t *);
|
||||
typedef void (*cfg_docfunc_t)(cfg_printer_t *, const cfg_type_t *);
|
||||
typedef void (*cfg_freefunc_t)(cfg_parser_t *, cfg_obj_t *);
|
||||
|
||||
/*
|
||||
* Structure definitions
|
||||
|
|
@ -101,7 +101,7 @@ typedef void (*cfg_freefunc_t)(cfg_parser_t *, cfg_obj_t *);
|
|||
* by calling the function 'f'.
|
||||
*/
|
||||
struct cfg_printer {
|
||||
void (*f)(void *closure, const char *text, int textlen);
|
||||
void (*f)(void *closure, const char *text, int textlen);
|
||||
void *closure;
|
||||
int indent;
|
||||
int flags;
|
||||
|
|
@ -569,7 +569,7 @@ cfg_clause_validforzone(const char *name, unsigned int ztype);
|
|||
|
||||
void
|
||||
cfg_print_zonegrammar(const unsigned int zonetype, unsigned int flags,
|
||||
void (*f)(void *closure, const char *text, int textlen),
|
||||
void (*f)(void *closure, const char *text, int textlen),
|
||||
void *closure);
|
||||
/*%<
|
||||
* Print a summary of the grammar of the zone type represented by
|
||||
|
|
|
|||
|
|
@ -194,15 +194,15 @@ struct ns_client {
|
|||
uint16_t extflags;
|
||||
int16_t ednsversion; /* -1 noedns */
|
||||
uint16_t additionaldepth;
|
||||
void (*cleanup)(ns_client_t *);
|
||||
ns_query_t query;
|
||||
isc_time_t requesttime;
|
||||
isc_stdtime_t now;
|
||||
isc_time_t tnow;
|
||||
dns_name_t signername; /*%< [T]SIG key name */
|
||||
dns_name_t *signer; /*%< NULL if not valid sig */
|
||||
bool mortal; /*%< Die after handling request */
|
||||
isc_quota_t *recursionquota;
|
||||
void (*cleanup)(ns_client_t *);
|
||||
ns_query_t query;
|
||||
isc_time_t requesttime;
|
||||
isc_stdtime_t now;
|
||||
isc_time_t tnow;
|
||||
dns_name_t signername; /*%< [T]SIG key name */
|
||||
dns_name_t *signer; /*%< NULL if not valid sig */
|
||||
bool mortal; /*%< Die after handling request */
|
||||
isc_quota_t *recursionquota;
|
||||
|
||||
isc_sockaddr_t peeraddr;
|
||||
bool peeraddr_valid;
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ client_trace(ns_client_t *client, int level, const char *message) {
|
|||
#define DNS_GETDB_IGNOREACL 0x08U
|
||||
#define DNS_GETDB_STALEFIRST 0X0CU
|
||||
|
||||
#define PENDINGOK(x) (((x)&DNS_DBFIND_PENDINGOK) != 0)
|
||||
#define PENDINGOK(x) (((x) & DNS_DBFIND_PENDINGOK) != 0)
|
||||
|
||||
#define SFCACHE_CDFLAG 0x1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue