Commit 5901928e authored by Mark Andrews's avatar Mark Andrews

fix up TKEY

parent 8d3e74b1
......@@ -39,8 +39,8 @@ typedef void dns_dbversion_t;
typedef unsigned char dns_offsets_t[128];
typedef struct dns_compress dns_compress_t;
typedef struct dns_decompress dns_decompress_t;
/* typedef isc_uint16_t dns_rdataclass_t; */
/* typedef isc_uint16_t dns_rdatatype_t; */
typedef isc_uint16_t dns_rdataclass_t;
typedef isc_uint16_t dns_rdatatype_t;
typedef isc_uint32_t dns_ttl_t;
typedef struct dns_rdata dns_rdata_t;
typedef struct dns_rdatalist dns_rdatalist_t;
......@@ -65,18 +65,18 @@ typedef enum {
} dns_addmode_t;
#include <dns/enumtype.h>
typedef enum {
enum {
dns_rdatatype_none = 0,
TYPEENUM
dns_rdatatype_any = 255
} dns_rdatatype_t;
} ;
#include <dns/enumclass.h>
typedef enum {
enum {
CLASSENUM
dns_rdataclass_none = 0,
/* dns_rdataclass_any = 255 TSIG is class ANY specific */
} dns_rdataclass_t;
} ;
typedef enum {
/* standard rcodes */
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: tkey_249.c,v 1.2 1999/02/04 06:38:43 marka Exp $ */
/* $Id: tkey_249.c,v 1.3 1999/02/04 07:00:32 marka Exp $ */
/* draft-ietf-dnssec-tkey-01.txt */
......@@ -109,6 +109,7 @@ totext_tkey(dns_rdata_t *rdata, dns_name_t *origin, isc_buffer_t *target) {
/* Algorithm */
dns_name_init(&name, NULL);
dns_name_init(&prefix, NULL);
dns_name_fromregion(&name, &sr);
sub = name_prefix(&name, origin, &prefix);
RETERR(dns_name_totext(&prefix, sub, target));
isc_region_consume(&sr, name_length(&name));
......@@ -250,7 +251,7 @@ compare_tkey(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
dns_name_init(&name1, NULL);
dns_name_init(&name2, NULL);
dns_name_fromregion(&name1, &r1);
dns_name_fromregion(&name1, &r1);
dns_name_fromregion(&name2, &r2);
if ((result = dns_name_compare(&name1, &name2)) != 0)
return (result);
isc_region_consume(&r1, name_length(&name1));
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: tkey_249.h,v 1.2 1999/02/04 06:38:43 marka Exp $ */
/* $Id: tkey_249.h,v 1.3 1999/02/04 07:00:32 marka Exp $ */
/* draft-ietf-dnssec-tkey-01.txt */
......@@ -109,6 +109,7 @@ totext_tkey(dns_rdata_t *rdata, dns_name_t *origin, isc_buffer_t *target) {
/* Algorithm */
dns_name_init(&name, NULL);
dns_name_init(&prefix, NULL);
dns_name_fromregion(&name, &sr);
sub = name_prefix(&name, origin, &prefix);
RETERR(dns_name_totext(&prefix, sub, target));
isc_region_consume(&sr, name_length(&name));
......@@ -250,7 +251,7 @@ compare_tkey(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
dns_name_init(&name1, NULL);
dns_name_init(&name2, NULL);
dns_name_fromregion(&name1, &r1);
dns_name_fromregion(&name1, &r1);
dns_name_fromregion(&name2, &r2);
if ((result = dns_name_compare(&name1, &name2)) != 0)
return (result);
isc_region_consume(&r1, name_length(&name1));
......
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