Merge branch '1768-move-dns_peer_t-into-peer-c' into 'master'

Resolve "move dns_peer_t into peer.c"

Closes #1768

See merge request isc-projects/bind9!3400
This commit is contained in:
Mark Andrews 2020-04-20 09:39:36 +00:00
commit 54eba4fca3
2 changed files with 51 additions and 50 deletions

View file

@ -41,56 +41,6 @@
#define DNS_PEERLIST_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_PEERLIST_MAGIC)
#define DNS_PEER_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_PEER_MAGIC)
/***
*** Types
***/
struct dns_peerlist {
unsigned int magic;
isc_refcount_t refs;
isc_mem_t *mem;
ISC_LIST(dns_peer_t) elements;
};
struct dns_peer {
unsigned int magic;
isc_refcount_t refs;
isc_mem_t *mem;
isc_netaddr_t address;
unsigned int prefixlen;
bool bogus;
dns_transfer_format_t transfer_format;
uint32_t transfers;
bool support_ixfr;
bool provide_ixfr;
bool request_ixfr;
bool support_edns;
bool request_nsid;
bool send_cookie;
bool request_expire;
bool force_tcp;
bool tcp_keepalive;
dns_name_t * key;
isc_sockaddr_t * transfer_source;
isc_dscp_t transfer_dscp;
isc_sockaddr_t * notify_source;
isc_dscp_t notify_dscp;
isc_sockaddr_t * query_source;
isc_dscp_t query_dscp;
uint16_t udpsize; /* receive size */
uint16_t maxudp; /* transmit size */
uint16_t padding; /* pad block size */
uint8_t ednsversion; /* edns version */
uint32_t bitflags;
ISC_LINK(dns_peer_t) next;
};
/***
*** Functions
***/

View file

@ -24,6 +24,57 @@
#include <dns/name.h>
#include <dns/peer.h>
/***
*** Types
***/
struct dns_peerlist {
unsigned int magic;
isc_refcount_t refs;
isc_mem_t *mem;
ISC_LIST(dns_peer_t) elements;
};
struct dns_peer {
unsigned int magic;
isc_refcount_t refs;
isc_mem_t *mem;
isc_netaddr_t address;
unsigned int prefixlen;
bool bogus;
dns_transfer_format_t transfer_format;
uint32_t transfers;
bool support_ixfr;
bool provide_ixfr;
bool request_ixfr;
bool support_edns;
bool request_nsid;
bool send_cookie;
bool request_expire;
bool force_tcp;
bool tcp_keepalive;
bool check_axfr_id;
dns_name_t *key;
isc_sockaddr_t *transfer_source;
isc_dscp_t transfer_dscp;
isc_sockaddr_t *notify_source;
isc_dscp_t notify_dscp;
isc_sockaddr_t *query_source;
isc_dscp_t query_dscp;
uint16_t udpsize; /* receive size */
uint16_t maxudp; /* transmit size */
uint16_t padding; /* pad block size */
uint8_t ednsversion; /* edns version */
uint32_t bitflags;
ISC_LINK(dns_peer_t) next;
};
/*%
* Bit positions in the dns_peer_t structure flags field
*/