mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
remove rdatalist_p.h
make the private isc__rdatalist_* functions public dns_rdatalist functions so that all the rdatalist primitives can be used by callers to libdns. (this will be needed later for moving SDB and SDLZ out of libdns.)
This commit is contained in:
parent
c283850cc3
commit
c90fafa45d
@ -239,7 +239,6 @@ libdns_la_SOURCES = \
|
||||
zonekey.c \
|
||||
zt.c \
|
||||
client.c \
|
||||
rdatalist_p.h \
|
||||
tsig_p.h \
|
||||
zone_p.h
|
||||
|
||||
|
@ -111,4 +111,42 @@ dns_rdatalist_fromrdataset(dns_rdataset_t *rdataset,
|
||||
*\li 'rdatalist' is pointed to the rdatalist in rdataset.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_rdatalist_disassociate(dns_rdataset_t *rdatasetp);
|
||||
|
||||
isc_result_t
|
||||
dns_rdatalist_first(dns_rdataset_t *rdataset);
|
||||
|
||||
isc_result_t
|
||||
dns_rdatalist_next(dns_rdataset_t *rdataset);
|
||||
|
||||
void
|
||||
dns_rdatalist_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata);
|
||||
|
||||
void
|
||||
dns_rdatalist_clone(dns_rdataset_t *source, dns_rdataset_t *target);
|
||||
|
||||
unsigned int
|
||||
dns_rdatalist_count(dns_rdataset_t *rdataset);
|
||||
|
||||
isc_result_t
|
||||
dns_rdatalist_addnoqname(dns_rdataset_t *rdataset, const dns_name_t *name);
|
||||
|
||||
isc_result_t
|
||||
dns_rdatalist_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig);
|
||||
|
||||
isc_result_t
|
||||
dns_rdatalist_addclosest(dns_rdataset_t *rdataset, const dns_name_t *name);
|
||||
|
||||
isc_result_t
|
||||
dns_rdatalist_getclosest(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig);
|
||||
|
||||
void
|
||||
dns_rdatalist_setownercase(dns_rdataset_t *rdataset, const dns_name_t *name);
|
||||
|
||||
void
|
||||
dns_rdatalist_getownercase(const dns_rdataset_t *rdataset, dns_name_t *name);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
@ -24,24 +24,22 @@
|
||||
#include <dns/rdatalist.h>
|
||||
#include <dns/rdataset.h>
|
||||
|
||||
#include "rdatalist_p.h"
|
||||
|
||||
static dns_rdatasetmethods_t methods = {
|
||||
isc__rdatalist_disassociate,
|
||||
isc__rdatalist_first,
|
||||
isc__rdatalist_next,
|
||||
isc__rdatalist_current,
|
||||
isc__rdatalist_clone,
|
||||
isc__rdatalist_count,
|
||||
isc__rdatalist_addnoqname,
|
||||
isc__rdatalist_getnoqname,
|
||||
isc__rdatalist_addclosest,
|
||||
isc__rdatalist_getclosest,
|
||||
dns_rdatalist_disassociate,
|
||||
dns_rdatalist_first,
|
||||
dns_rdatalist_next,
|
||||
dns_rdatalist_current,
|
||||
dns_rdatalist_clone,
|
||||
dns_rdatalist_count,
|
||||
dns_rdatalist_addnoqname,
|
||||
dns_rdatalist_getnoqname,
|
||||
dns_rdatalist_addclosest,
|
||||
dns_rdatalist_getclosest,
|
||||
NULL, /* settrust */
|
||||
NULL, /* expire */
|
||||
NULL, /* clearprefetch */
|
||||
isc__rdatalist_setownercase,
|
||||
isc__rdatalist_getownercase,
|
||||
dns_rdatalist_setownercase,
|
||||
dns_rdatalist_getownercase,
|
||||
NULL /* addglue */
|
||||
};
|
||||
|
||||
@ -100,12 +98,12 @@ dns_rdatalist_fromrdataset(dns_rdataset_t *rdataset,
|
||||
}
|
||||
|
||||
void
|
||||
isc__rdatalist_disassociate(dns_rdataset_t *rdataset) {
|
||||
dns_rdatalist_disassociate(dns_rdataset_t *rdataset) {
|
||||
UNUSED(rdataset);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_first(dns_rdataset_t *rdataset) {
|
||||
dns_rdatalist_first(dns_rdataset_t *rdataset) {
|
||||
dns_rdatalist_t *rdatalist;
|
||||
|
||||
rdatalist = rdataset->private1;
|
||||
@ -119,7 +117,7 @@ isc__rdatalist_first(dns_rdataset_t *rdataset) {
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_next(dns_rdataset_t *rdataset) {
|
||||
dns_rdatalist_next(dns_rdataset_t *rdataset) {
|
||||
dns_rdata_t *rdata;
|
||||
|
||||
REQUIRE(rdataset != NULL);
|
||||
@ -139,7 +137,7 @@ isc__rdatalist_next(dns_rdataset_t *rdataset) {
|
||||
}
|
||||
|
||||
void
|
||||
isc__rdatalist_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
|
||||
dns_rdatalist_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
|
||||
dns_rdata_t *list_rdata;
|
||||
|
||||
REQUIRE(rdataset != NULL);
|
||||
@ -151,7 +149,7 @@ isc__rdatalist_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
|
||||
}
|
||||
|
||||
void
|
||||
isc__rdatalist_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
|
||||
dns_rdatalist_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
|
||||
REQUIRE(source != NULL);
|
||||
REQUIRE(target != NULL);
|
||||
|
||||
@ -164,7 +162,7 @@ isc__rdatalist_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
|
||||
}
|
||||
|
||||
unsigned int
|
||||
isc__rdatalist_count(dns_rdataset_t *rdataset) {
|
||||
dns_rdatalist_count(dns_rdataset_t *rdataset) {
|
||||
dns_rdatalist_t *rdatalist;
|
||||
dns_rdata_t *rdata;
|
||||
unsigned int count;
|
||||
@ -184,7 +182,7 @@ isc__rdatalist_count(dns_rdataset_t *rdataset) {
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_addnoqname(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
dns_rdatalist_addnoqname(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
dns_rdataset_t *neg = NULL;
|
||||
dns_rdataset_t *negsig = NULL;
|
||||
dns_rdataset_t *rdset;
|
||||
@ -238,8 +236,8 @@ isc__rdatalist_addnoqname(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig) {
|
||||
dns_rdatalist_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig) {
|
||||
dns_rdataclass_t rdclass;
|
||||
dns_rdataset_t *tneg = NULL;
|
||||
dns_rdataset_t *tnegsig = NULL;
|
||||
@ -289,7 +287,7 @@ isc__rdatalist_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_addclosest(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
dns_rdatalist_addclosest(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
dns_rdataset_t *neg = NULL;
|
||||
dns_rdataset_t *negsig = NULL;
|
||||
dns_rdataset_t *rdset;
|
||||
@ -343,8 +341,8 @@ isc__rdatalist_addclosest(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_getclosest(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig) {
|
||||
dns_rdatalist_getclosest(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig) {
|
||||
dns_rdataclass_t rdclass;
|
||||
dns_rdataset_t *tneg = NULL;
|
||||
dns_rdataset_t *tnegsig = NULL;
|
||||
@ -394,7 +392,7 @@ isc__rdatalist_getclosest(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
}
|
||||
|
||||
void
|
||||
isc__rdatalist_setownercase(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
dns_rdatalist_setownercase(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
dns_rdatalist_t *rdatalist;
|
||||
unsigned int i;
|
||||
|
||||
@ -419,7 +417,7 @@ isc__rdatalist_setownercase(dns_rdataset_t *rdataset, const dns_name_t *name) {
|
||||
}
|
||||
|
||||
void
|
||||
isc__rdatalist_getownercase(const dns_rdataset_t *rdataset, dns_name_t *name) {
|
||||
dns_rdatalist_getownercase(const dns_rdataset_t *rdataset, dns_name_t *name) {
|
||||
dns_rdatalist_t *rdatalist;
|
||||
unsigned int i;
|
||||
|
||||
|
@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/result.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
void
|
||||
isc__rdatalist_disassociate(dns_rdataset_t *rdatasetp);
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_first(dns_rdataset_t *rdataset);
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_next(dns_rdataset_t *rdataset);
|
||||
|
||||
void
|
||||
isc__rdatalist_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata);
|
||||
|
||||
void
|
||||
isc__rdatalist_clone(dns_rdataset_t *source, dns_rdataset_t *target);
|
||||
|
||||
unsigned int
|
||||
isc__rdatalist_count(dns_rdataset_t *rdataset);
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_addnoqname(dns_rdataset_t *rdataset, const dns_name_t *name);
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig);
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_addclosest(dns_rdataset_t *rdataset, const dns_name_t *name);
|
||||
|
||||
isc_result_t
|
||||
isc__rdatalist_getclosest(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig);
|
||||
|
||||
void
|
||||
isc__rdatalist_setownercase(dns_rdataset_t *rdataset, const dns_name_t *name);
|
||||
|
||||
void
|
||||
isc__rdatalist_getownercase(const dns_rdataset_t *rdataset, dns_name_t *name);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
@ -41,8 +41,6 @@
|
||||
#include <dns/sdb.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
#include "rdatalist_p.h"
|
||||
|
||||
struct dns_sdbimplementation {
|
||||
const dns_sdbmethods_t *methods;
|
||||
void *driverdata;
|
||||
@ -1382,7 +1380,7 @@ disassociate(dns_rdataset_t *rdataset) {
|
||||
dns_db_t *db = (dns_db_t *)sdbnode->sdb;
|
||||
|
||||
detachnode(db, &node);
|
||||
isc__rdatalist_disassociate(rdataset);
|
||||
dns_rdatalist_disassociate(rdataset);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1392,20 +1390,20 @@ rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
|
||||
dns_db_t *db = (dns_db_t *)sdbnode->sdb;
|
||||
dns_dbnode_t *tempdb = NULL;
|
||||
|
||||
isc__rdatalist_clone(source, target);
|
||||
dns_rdatalist_clone(source, target);
|
||||
attachnode(db, node, &tempdb);
|
||||
source->private5 = tempdb;
|
||||
}
|
||||
|
||||
static dns_rdatasetmethods_t sdb_rdataset_methods = {
|
||||
disassociate,
|
||||
isc__rdatalist_first,
|
||||
isc__rdatalist_next,
|
||||
isc__rdatalist_current,
|
||||
dns_rdatalist_first,
|
||||
dns_rdatalist_next,
|
||||
dns_rdatalist_current,
|
||||
rdataset_clone,
|
||||
isc__rdatalist_count,
|
||||
isc__rdatalist_addnoqname,
|
||||
isc__rdatalist_getnoqname,
|
||||
dns_rdatalist_count,
|
||||
dns_rdatalist_addnoqname,
|
||||
dns_rdatalist_getnoqname,
|
||||
NULL, /* addclosest */
|
||||
NULL, /* getclosest */
|
||||
NULL, /* settrust */
|
||||
|
@ -80,8 +80,6 @@
|
||||
#include <dns/sdlz.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
#include "rdatalist_p.h"
|
||||
|
||||
/*
|
||||
* Private Types
|
||||
*/
|
||||
@ -1381,7 +1379,7 @@ disassociate(dns_rdataset_t *rdataset) {
|
||||
dns_db_t *db = (dns_db_t *)sdlznode->sdlz;
|
||||
|
||||
detachnode(db, &node);
|
||||
isc__rdatalist_disassociate(rdataset);
|
||||
dns_rdatalist_disassociate(rdataset);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1391,20 +1389,20 @@ rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
|
||||
dns_db_t *db = (dns_db_t *)sdlznode->sdlz;
|
||||
dns_dbnode_t *tempdb = NULL;
|
||||
|
||||
isc__rdatalist_clone(source, target);
|
||||
dns_rdatalist_clone(source, target);
|
||||
attachnode(db, node, &tempdb);
|
||||
source->private5 = tempdb;
|
||||
}
|
||||
|
||||
static dns_rdatasetmethods_t rdataset_methods = {
|
||||
disassociate,
|
||||
isc__rdatalist_first,
|
||||
isc__rdatalist_next,
|
||||
isc__rdatalist_current,
|
||||
dns_rdatalist_first,
|
||||
dns_rdatalist_next,
|
||||
dns_rdatalist_current,
|
||||
rdataset_clone,
|
||||
isc__rdatalist_count,
|
||||
isc__rdatalist_addnoqname,
|
||||
isc__rdatalist_getnoqname,
|
||||
dns_rdatalist_count,
|
||||
dns_rdatalist_addnoqname,
|
||||
dns_rdatalist_getnoqname,
|
||||
NULL, /* addclosest */
|
||||
NULL, /* getclosest */
|
||||
NULL, /* settrust */
|
||||
|
Loading…
x
Reference in New Issue
Block a user