mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
adjust what points to what. You are lost in a maze of twisty little pointers,
all alike.
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <isc/assertions.h>
|
#include <isc/assertions.h>
|
||||||
|
#include <isc/mutex.h>
|
||||||
|
|
||||||
#include <dns/address.h>
|
#include <dns/address.h>
|
||||||
|
|
||||||
@@ -38,7 +39,11 @@
|
|||||||
#define DNS_ADBADDRINFO_MAGIC 0x61644149 /* adAI. */
|
#define DNS_ADBADDRINFO_MAGIC 0x61644149 /* adAI. */
|
||||||
#define DNS_ADBADDRINFO_VALID(x) VCHECK(x, DNS_ADBADDRINFO_MAGIC)
|
#define DNS_ADBADDRINFO_VALID(x) VCHECK(x, DNS_ADBADDRINFO_MAGIC)
|
||||||
|
|
||||||
|
#define DNS_ADBNAMELIST_LENGTH 16
|
||||||
|
#define DNS_ADBENTRYLOCK_LENGTH 16
|
||||||
|
|
||||||
typedef struct dns_adbname dns_adbname_t;
|
typedef struct dns_adbname dns_adbname_t;
|
||||||
|
typedef ISC_LIST(dns_adbname_t) dns_adbnamelist_t;
|
||||||
typedef struct dns_adbnamehook dns_adbnamehook_t;
|
typedef struct dns_adbnamehook dns_adbnamehook_t;
|
||||||
typedef struct dns_adbzoneinfo dns_adbzoneinfo_t;
|
typedef struct dns_adbzoneinfo dns_adbzoneinfo_t;
|
||||||
|
|
||||||
@@ -55,7 +60,22 @@ struct dns_adb {
|
|||||||
isc_mempool_t *ahmp; /* dns_adbhandle_t */
|
isc_mempool_t *ahmp; /* dns_adbhandle_t */
|
||||||
isc_mempool_t *aimp; /* dns_adbaddrinfo_t */
|
isc_mempool_t *aimp; /* dns_adbaddrinfo_t */
|
||||||
|
|
||||||
ISC_LIST(dns_adbname_t) names;
|
/*
|
||||||
|
* Bucketized locks and lists for names.
|
||||||
|
*/
|
||||||
|
dns_adbnamelist_t names[DNS_ADBNAMELIST_LENGTH];
|
||||||
|
isc_mutex_t namelocks[DNS_ADBNAMELIST_LENGTH];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Bucketized locks for entries.
|
||||||
|
*/
|
||||||
|
isc_mutex_t entrylocks[DNS_ADBENTRYLOCK_LENGTH];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* List of running and idle handles.
|
||||||
|
*/
|
||||||
|
ISC_LIST(dns_adbhandle_t) running_handles;
|
||||||
|
ISC_LIST(dns_adbhandle_t) idle_handles;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dns_adbname {
|
struct dns_adbname {
|
||||||
@@ -109,8 +129,6 @@ struct dns_adbentry {
|
|||||||
isc_sockaddr_t sockaddr;
|
isc_sockaddr_t sockaddr;
|
||||||
|
|
||||||
ISC_LIST(dns_adbzoneinfo_t) zoneinfo;
|
ISC_LIST(dns_adbzoneinfo_t) zoneinfo;
|
||||||
|
|
||||||
ISC_LINK(dns_adbentry_t) link;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -130,8 +148,7 @@ struct dns_adbhandle {
|
|||||||
void *arg;
|
void *arg;
|
||||||
dns_name_t *zone;
|
dns_name_t *zone;
|
||||||
|
|
||||||
dns_adbaddrlist_t addrlist;
|
ISC_LIST(dns_adbaddrinfo_t) list;
|
||||||
|
|
||||||
ISC_LINK(dns_adbhandle_t) link;
|
ISC_LINK(dns_adbhandle_t) link;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -86,6 +86,7 @@
|
|||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/task.h>
|
#include <isc/task.h>
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
|
#include <isc/list.h>
|
||||||
#include <isc/result.h>
|
#include <isc/result.h>
|
||||||
#include <isc/sockaddr.h>
|
#include <isc/sockaddr.h>
|
||||||
|
|
||||||
@@ -117,7 +118,6 @@ typedef struct dns_adbentry dns_adbentry_t;
|
|||||||
* The answers to queries come back as a list of these.
|
* The answers to queries come back as a list of these.
|
||||||
*/
|
*/
|
||||||
typedef struct dns_adbaddrinfo dns_adbaddrinfo_t;
|
typedef struct dns_adbaddrinfo dns_adbaddrinfo_t;
|
||||||
typedef ISC_LIST(dns_adbaddrinfo_t) dns_adbaddrlist_t;
|
|
||||||
struct dns_adbaddrinfo {
|
struct dns_adbaddrinfo {
|
||||||
unsigned int magic; /* private */
|
unsigned int magic; /* private */
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ struct dns_adbaddrinfo {
|
|||||||
unsigned int srtt; /* microseconds */
|
unsigned int srtt; /* microseconds */
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
dns_adbentry_t *entry; /* private */
|
dns_adbentry_t *entry; /* private */
|
||||||
dns_adbaddrlist_t link;
|
ISC_LINK(dns_adbaddrinfo_t) link;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user