2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Refactor zone.c, use dns_remote_t structure

Use the new dns_remote_t structure for remote server communication to
primaries, parental agents, etc.
This commit is contained in:
Matthijs Mekking
2022-10-26 14:40:30 +02:00
parent 0300295944
commit bf1dd57242
2 changed files with 240 additions and 503 deletions

View File

@@ -634,7 +634,7 @@ dns_zone_dumptostream(dns_zone_t *zone, FILE *fd, dns_masterformat_t format,
*/
void
dns_zone_setprimaries(dns_zone_t *zone, const isc_sockaddr_t *primaries,
dns_zone_setprimaries(dns_zone_t *zone, isc_sockaddr_t *addresses,
dns_name_t **keynames, dns_name_t **tlsnames,
uint32_t count);
/*%<
@@ -642,11 +642,11 @@ dns_zone_setprimaries(dns_zone_t *zone, const isc_sockaddr_t *primaries,
*
* Require:
*\li 'zone' to be a valid zone.
*\li 'primaries' array of isc_sockaddr_t with port set or NULL.
*\li 'addresses' array of isc_sockaddr_t with port set or NULL.
*\li 'count' the number of primaries.
*\li 'keynames' array of dns_name_t's for tsig keys or NULL.
*
*\li If 'primaries' is NULL then 'count' must be zero.
*\li If 'addresses' is NULL then 'count' must be zero.
*
* Returns:
*\li #ISC_R_SUCCESS
@@ -655,7 +655,7 @@ dns_zone_setprimaries(dns_zone_t *zone, const isc_sockaddr_t *primaries,
*/
void
dns_zone_setparentals(dns_zone_t *zone, const isc_sockaddr_t *parentals,
dns_zone_setparentals(dns_zone_t *zone, isc_sockaddr_t *addresses,
dns_name_t **keynames, dns_name_t **tlsnames,
uint32_t count);
/*%<
@@ -663,11 +663,11 @@ dns_zone_setparentals(dns_zone_t *zone, const isc_sockaddr_t *parentals,
*
* Require:
*\li 'zone' to be a valid zone.
*\li 'parentals' array of isc_sockaddr_t with port set or NULL.
*\li 'addresses' array of isc_sockaddr_t with port set or NULL.
*\li 'count' the number of primaries.
*\li 'keynames' array of dns_name_t's for tsig keys or NULL.
*
*\li If 'parentals' is NULL then 'count' must be zero.
*\li If 'addresses' is NULL then 'count' must be zero.
*
* Returns:
*\li #ISC_R_SUCCESS
@@ -676,29 +676,8 @@ dns_zone_setparentals(dns_zone_t *zone, const isc_sockaddr_t *parentals,
*/
void
dns_zone_setparentals(dns_zone_t *zone, const isc_sockaddr_t *parentals,
dns_name_t **keynames, dns_name_t **tlsnames,
uint32_t count);
/*%<
* Set the list of parental agents for the zone.
*
* Require:
*\li 'zone' to be a valid zone.
*\li 'parentals' array of isc_sockaddr_t with port set or NULL.
*\li 'count' the number of parentals.
*\li 'keynames' array of dns_name_t's for tsig keys or NULL.
*
*\li If 'parentals' is NULL then 'count' must be zero.
*
* Returns:
*\li #ISC_R_SUCCESS
*\li #ISC_R_NOMEMORY
*\li Any result dns_name_dup() can return, if keynames!=NULL
*/
void
dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
const isc_dscp_t *dscps, dns_name_t **keynames,
dns_zone_setalsonotify(dns_zone_t *zone, isc_sockaddr_t *addresses,
isc_dscp_t *dscps, dns_name_t **keynames,
dns_name_t **tlsnames, uint32_t count);
/*%<
* Set the list of additional servers to be notified when
@@ -709,7 +688,7 @@ dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
*
* Require:
*\li 'zone' to be a valid zone.
*\li 'notify' to be non-NULL if count != 0.
*\li 'addresses' to be non-NULL if count != 0.
*\li 'count' to be the number of notifiees.
*
* Returns:

File diff suppressed because it is too large Load Diff