Commit b8dd48ec authored by Mark Andrews's avatar Mark Andrews
Browse files

119. [cleanup] structure definitions for generic rdata stuctures do

                        not have _generic_ in their names.
parent 6b7257f7
119. [cleanup] structure definitions for generic rdata stuctures do
not have _generic_ in their names.
118. [cleanup] libdns.a is now namespace-clean, on NetBSD, excepting
YACC crust (yyparse, etc) [2000-apr-27 explorer]
......
......@@ -207,7 +207,7 @@ iszonekey(signer_key_t *key, dns_db_t *db) {
* that we've loaded already, and then see if there's a key on disk.
*/
static signer_key_t *
keythatsigned(dns_rdata_generic_sig_t *sig) {
keythatsigned(dns_rdata_sig_t *sig) {
char *keyname;
isc_result_t result;
dst_key_t *pubkey = NULL, *privkey = NULL;
......@@ -306,7 +306,7 @@ signset(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
dns_rdataset_t sigset, oldsigset;
dns_rdata_t oldsigrdata;
dns_rdata_t *trdata;
dns_rdata_generic_sig_t sig;
dns_rdata_sig_t sig;
signer_key_t *key;
isc_result_t result;
isc_boolean_t notsigned = ISC_TRUE, nosigs = ISC_FALSE;
......
......@@ -216,7 +216,7 @@ configure_view_dnsseckeys(dns_c_ctx_t *cctx,
ckey = ISC_LIST_NEXT(ckey, next))
{
dns_rdataclass_t viewclass;
dns_rdata_generic_key_t keystruct;
dns_rdata_key_t keystruct;
isc_int32_t flags, proto, alg;
unsigned char keydata[4096];
isc_buffer_t keydatabuf;
......
......@@ -207,7 +207,7 @@ iszonekey(signer_key_t *key, dns_db_t *db) {
* that we've loaded already, and then see if there's a key on disk.
*/
static signer_key_t *
keythatsigned(dns_rdata_generic_sig_t *sig) {
keythatsigned(dns_rdata_sig_t *sig) {
char *keyname;
isc_result_t result;
dst_key_t *pubkey = NULL, *privkey = NULL;
......@@ -306,7 +306,7 @@ signset(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
dns_rdataset_t sigset, oldsigset;
dns_rdata_t oldsigrdata;
dns_rdata_t *trdata;
dns_rdata_generic_sig_t sig;
dns_rdata_sig_t sig;
signer_key_t *key;
isc_result_t result;
isc_boolean_t notsigned = ISC_TRUE, nosigs = ISC_FALSE;
......
......@@ -16,7 +16,7 @@
*/
/*
* $Id: dnssec.c,v 1.31 2000/04/28 01:10:00 halley Exp $
* $Id: dnssec.c,v 1.32 2000/04/28 02:08:26 marka Exp $
* Principal Author: Brian Wellington
*/
......@@ -189,7 +189,7 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
isc_stdtime_t *inception, isc_stdtime_t *expire,
isc_mem_t *mctx, isc_buffer_t *buffer, dns_rdata_t *sigrdata)
{
dns_rdata_generic_sig_t sig;
dns_rdata_sig_t sig;
dns_rdata_t *rdatas;
int nrdatas, i;
isc_buffer_t b, sigbuf, envbuf;
......@@ -336,7 +336,7 @@ dns_dnssec_verify(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
isc_boolean_t ignoretime, isc_mem_t *mctx,
dns_rdata_t *sigrdata)
{
dns_rdata_generic_sig_t sig;
dns_rdata_sig_t sig;
dns_fixedname_t fnewname;
isc_region_t r;
isc_buffer_t envbuf;
......@@ -523,7 +523,7 @@ dns_dnssec_findzonekeys(dns_db_t *db, dns_dbversion_t *ver,
isc_result_t
dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key) {
dns_rdata_generic_sig_t sig;
dns_rdata_sig_t sig;
unsigned char data[512];
unsigned char header[DNS_MESSAGE_HEADERLEN];
isc_buffer_t headerbuf, databuf, sigbuf;
......@@ -548,7 +548,7 @@ dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key) {
mctx = msg->mctx;
memset(&sig, 0, sizeof(dns_rdata_generic_sig_t));
memset(&sig, 0, sizeof(dns_rdata_sig_t));
sig.mctx = mctx;
sig.common.rdclass = dns_rdataclass_any;
......@@ -654,7 +654,7 @@ isc_result_t
dns_dnssec_verifymessage(isc_buffer_t *source, dns_message_t *msg,
dst_key_t *key)
{
dns_rdata_generic_sig_t sig;
dns_rdata_sig_t sig;
unsigned char header[DNS_MESSAGE_HEADERLEN];
dns_rdata_t rdata;
dns_name_t tname;
......
......@@ -2237,7 +2237,7 @@ dns_message_signer(dns_message_t *msg, dns_name_t *signer) {
if (msg->sig0 != NULL) {
dns_rdata_t rdata;
dns_rdata_generic_sig_t sig;
dns_rdata_sig_t sig;
result = dns_rdataset_first(msg->sig0);
INSIST(result == ISC_R_SUCCESS);
......@@ -2292,7 +2292,7 @@ dns_message_checksig(dns_message_t *msg, dns_view_t *view) {
return (dns_view_checksig(view, &msgb, msg));
else {
dns_rdata_t rdata;
dns_rdata_generic_sig_t sig;
dns_rdata_sig_t sig;
dns_rdataset_t keyset;
isc_result_t result;
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: key_25.c,v 1.22 2000/04/28 01:24:02 gson Exp $ */
/* $Id: key_25.c,v 1.23 2000/04/28 02:08:30 marka Exp $ */
/*
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
......@@ -165,7 +165,7 @@ static inline isc_result_t
fromstruct_key(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
isc_buffer_t *target)
{
dns_rdata_generic_key_t *key;
dns_rdata_key_t *key;
isc_region_t tr;
UNUSED(rdclass);
......@@ -174,7 +174,7 @@ fromstruct_key(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
REQUIRE(type == 25);
key = (dns_rdata_generic_key_t *) source;
key = (dns_rdata_key_t *) source;
/* Flags */
RETERR(uint16_tobuffer(key->flags, target));
......@@ -199,7 +199,7 @@ fromstruct_key(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
static inline isc_result_t
tostruct_key(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
dns_rdata_generic_key_t *key;
dns_rdata_key_t *key;
isc_region_t sr;
UNUSED(target);
......@@ -207,7 +207,7 @@ tostruct_key(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
REQUIRE(rdata->type == 25);
key = (dns_rdata_generic_key_t *) target;
key = (dns_rdata_key_t *) target;
key->common.rdclass = rdata->rdclass;
key->common.rdtype = rdata->type;
ISC_LINK_INIT(&key->common, link);
......@@ -249,7 +249,7 @@ tostruct_key(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
static inline void
freestruct_key(void *source) {
dns_rdata_generic_key_t *key = (dns_rdata_generic_key_t *) source;
dns_rdata_key_t *key = (dns_rdata_key_t *) source;
REQUIRE(source != NULL);
REQUIRE(key->common.rdtype == 25);
......
......@@ -15,11 +15,11 @@
* SOFTWARE.
*/
/* $Id: key_25.h,v 1.9 2000/03/20 22:57:12 gson Exp $ */
/* $Id: key_25.h,v 1.10 2000/04/28 02:08:31 marka Exp $ */
/* RFC 2535 */
typedef struct dns_rdata_generic_key_t {
typedef struct dns_rdata_key_t {
dns_rdatacommon_t common;
isc_mem_t * mctx;
isc_uint16_t flags;
......@@ -27,5 +27,5 @@ typedef struct dns_rdata_generic_key_t {
isc_uint8_t algorithm;
isc_uint16_t datalen;
unsigned char * data;
} dns_rdata_generic_key_t;
} dns_rdata_key_t;
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: sig_24.c,v 1.34 2000/04/28 01:24:09 gson Exp $ */
/* $Id: sig_24.c,v 1.35 2000/04/28 02:08:32 marka Exp $ */
/* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */
......@@ -307,14 +307,14 @@ fromstruct_sig(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
isc_buffer_t *target)
{
isc_region_t tr;
dns_rdata_generic_sig_t *sig;
dns_rdata_sig_t *sig;
dns_compress_t cctx;
REQUIRE(type == 24);
UNUSED(rdclass);
sig = (dns_rdata_generic_sig_t *) source;
sig = (dns_rdata_sig_t *) source;
REQUIRE(sig->mctx != NULL);
/* Type covered */
......@@ -359,12 +359,12 @@ fromstruct_sig(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
static inline isc_result_t
tostruct_sig(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
isc_region_t sr;
dns_rdata_generic_sig_t *sig;
dns_rdata_sig_t *sig;
dns_name_t signer;
REQUIRE(rdata->type == 24);
sig = (dns_rdata_generic_sig_t *) target;
sig = (dns_rdata_sig_t *) target;
sig->common.rdclass = rdata->rdclass;
sig->common.rdtype = rdata->type;
ISC_LINK_INIT(&sig->common, link);
......@@ -432,7 +432,7 @@ tostruct_sig(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
static inline void
freestruct_sig(void *source) {
dns_rdata_generic_sig_t *sig = (dns_rdata_generic_sig_t *) source;
dns_rdata_sig_t *sig = (dns_rdata_sig_t *) source;
REQUIRE(source != NULL);
REQUIRE(sig->common.rdtype == 24);
......
......@@ -15,11 +15,11 @@
* SOFTWARE.
*/
/* $Id: sig_24.h,v 1.16 2000/03/17 17:07:10 gson Exp $ */
/* $Id: sig_24.h,v 1.17 2000/04/28 02:08:33 marka Exp $ */
/* RFC 2535 */
typedef struct dns_rdata_generic_sig_t {
typedef struct dns_rdata_sig_t {
dns_rdatacommon_t common;
isc_mem_t * mctx;
dns_rdatatype_t covered;
......@@ -32,5 +32,5 @@ typedef struct dns_rdata_generic_sig_t {
dns_name_t signer;
isc_uint16_t siglen;
unsigned char * signature;
} dns_rdata_generic_sig_t;
} dns_rdata_sig_t;
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: tkey_249.c,v 1.27 2000/04/28 01:24:09 gson Exp $ */
/* $Id: tkey_249.c,v 1.28 2000/04/28 02:08:34 marka Exp $ */
/*
* Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley.
......@@ -301,7 +301,7 @@ fromstruct_tkey(dns_rdataclass_t rdclass, dns_rdatatype_t type,
void *source, isc_buffer_t *target)
{
isc_region_t tr;
dns_rdata_generic_tkey_t *tkey;
dns_rdata_tkey_t *tkey;
dns_compress_t cctx;
UNUSED(rdclass);
......@@ -310,7 +310,7 @@ fromstruct_tkey(dns_rdataclass_t rdclass, dns_rdatatype_t type,
REQUIRE(type == 249);
tkey = (dns_rdata_generic_tkey_t *) source;
tkey = (dns_rdata_tkey_t *) source;
REQUIRE(tkey->mctx != NULL);
/* Algorithm Name */
......@@ -360,7 +360,7 @@ fromstruct_tkey(dns_rdataclass_t rdclass, dns_rdatatype_t type,
static inline isc_result_t
tostruct_tkey(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
dns_rdata_generic_tkey_t *tkey;
dns_rdata_tkey_t *tkey;
dns_name_t alg;
isc_region_t sr;
......@@ -369,7 +369,7 @@ tostruct_tkey(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
REQUIRE(rdata->type == 249);
tkey = (dns_rdata_generic_tkey_t *) target;
tkey = (dns_rdata_tkey_t *) target;
tkey->common.rdclass = rdata->rdclass;
tkey->common.rdtype = rdata->type;
......@@ -439,7 +439,7 @@ tostruct_tkey(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
static inline void
freestruct_tkey(void *source) {
dns_rdata_generic_tkey_t *tkey = (dns_rdata_generic_tkey_t *) source;
dns_rdata_tkey_t *tkey = (dns_rdata_tkey_t *) source;
REQUIRE(source != NULL);
......
......@@ -15,11 +15,11 @@
* SOFTWARE.
*/
/* $Id: tkey_249.h,v 1.13 2000/03/20 22:57:14 gson Exp $ */
/* $Id: tkey_249.h,v 1.14 2000/04/28 02:08:35 marka Exp $ */
/* draft-ietf-dnsind-tkey-00.txt */
typedef struct dns_rdata_generic_tkey {
typedef struct dns_rdata_key {
dns_rdatacommon_t common;
isc_mem_t * mctx;
dns_name_t algorithm;
......@@ -31,5 +31,5 @@ typedef struct dns_rdata_generic_tkey {
unsigned char * key;
isc_uint16_t otherlen;
unsigned char * other;
} dns_rdata_generic_tkey_t;
} dns_rdata_tkey_t;
......@@ -15,5 +15,30 @@
* SOFTWARE.
*/
/* $Id: txt_16.h,v 1.14 2000/03/20 23:08:50 gson Exp $ */
/* $Id: txt_16.h,v 1.15 2000/04/28 02:08:37 marka Exp $ */
typedef struct dns_rdata_txt_string {
isc_uint8_t length;
unsigned char *data;
} dns_rdata_txt_string_t;
typedef struct dns_rdata_txt {
dns_rdatacommon_t common;
isc_mem_t *mctx;
unsigned char *txt;
isc_uint16_t txt_len;
/* private */
isc_uint16_t offset;
} dns_rdata_txt_t;
#include <isc/lang.h>
ISC_LANG_BEGINDECLS
isc_result_t dns_rdata_txt_first(dns_rdata_txt_t *);
isc_result_t dns_rdata_txt_next(dns_rdata_txt_t *);
isc_result_t dns_rdata_txt_current(dns_rdata_txt_t *, dns_rdata_txt_string_t *);
ISC_LANG_ENDDECLS
......@@ -16,7 +16,7 @@
*/
/*
* $Id: tkey.c,v 1.30 2000/04/28 01:10:21 halley Exp $
* $Id: tkey.c,v 1.31 2000/04/28 02:08:29 marka Exp $
* Principal Author: Brian Wellington
*/
......@@ -212,8 +212,8 @@ compute_secret(isc_buffer_t *shared, isc_region_t *queryrandomness,
static isc_result_t
process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
dns_rdata_generic_tkey_t *tkeyin, dns_tkey_ctx_t *tctx,
dns_rdata_generic_tkey_t *tkeyout,
dns_rdata_tkey_t *tkeyin, dns_tkey_ctx_t *tctx,
dns_rdata_tkey_t *tkeyout,
dns_tsig_keyring_t *ring, dns_namelist_t *namelist)
{
isc_result_t result = ISC_R_SUCCESS;
......@@ -386,8 +386,8 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
static isc_result_t
process_deletetkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
dns_rdata_generic_tkey_t *tkeyin,
dns_rdata_generic_tkey_t *tkeyout,
dns_rdata_tkey_t *tkeyin,
dns_rdata_tkey_t *tkeyout,
dns_tsig_keyring_t *ring,
dns_namelist_t *namelist)
{
......@@ -429,7 +429,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkey_ctx_t *tctx,
dns_tsig_keyring_t *ring)
{
isc_result_t result = ISC_R_SUCCESS;
dns_rdata_generic_tkey_t tkeyin, tkeyout;
dns_rdata_tkey_t tkeyin, tkeyout;
dns_name_t *qname, *name, *keyname, tempkeyname, signer;
dns_rdataset_t *tkeyset;
dns_rdata_t tkeyrdata, *rdata = NULL;
......@@ -441,7 +441,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkey_ctx_t *tctx,
REQUIRE(ring != NULL);
/* Need to do this to determine if this should be freed later */
memset(&tkeyin, 0, sizeof(dns_rdata_generic_tkey_t));
memset(&tkeyin, 0, sizeof(dns_rdata_tkey_t));
/* Interpret the question section */
result = dns_message_firstname(msg, DNS_SECTION_QUESTION);
......@@ -639,7 +639,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkey_ctx_t *tctx,
static isc_result_t
buildquery(dns_message_t *msg, dns_name_t *name,
dns_rdata_generic_tkey_t *tkey)
dns_rdata_tkey_t *tkey)
{
dns_name_t *qname = NULL, *aname = NULL;
dns_rdataset_t *question = NULL, *tkeyset = NULL;
......@@ -711,7 +711,7 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
dns_name_t *algorithm, isc_buffer_t *nonce,
isc_uint32_t lifetime)
{
dns_rdata_generic_tkey_t tkey;
dns_rdata_tkey_t tkey;
dns_rdata_t *rdata = NULL;
isc_buffer_t src, *dynbuf = NULL;
isc_region_t r;
......@@ -785,7 +785,7 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
isc_result_t
dns_tkey_builddeletequery(dns_message_t *msg, dns_tsigkey_t *key) {
dns_rdata_generic_tkey_t tkey;
dns_rdata_tkey_t tkey;
REQUIRE(msg != NULL);
REQUIRE(key != NULL);
......@@ -844,7 +844,7 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
dns_rdata_t theirkeyrdata;
dst_key_t *theirkey;
dns_tsigkey_t *tsigkey;
dns_rdata_generic_tkey_t qtkey, rtkey;
dns_rdata_tkey_t qtkey, rtkey;
unsigned char keydata[1024], secretdata[256];
unsigned int sharedsize;
isc_buffer_t keysrc, keybuf, *shared = NULL, secret;
......@@ -962,7 +962,7 @@ dns_tkey_processdeleteresponse(dns_message_t *qmsg, dns_message_t *rmsg,
{
dns_rdata_t qtkeyrdata, rtkeyrdata;
dns_name_t *tkeyname, *tempname;
dns_rdata_generic_tkey_t qtkey, rtkey;
dns_rdata_tkey_t qtkey, rtkey;
dns_tsigkey_t *tsigkey = NULL;
isc_result_t result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment