From: Miek Gieben Date: Thu, 16 Dec 2004 12:11:39 +0000 (+0000) Subject: buf.h added, we need some kind of holding place of dns data X-Git-Tag: release-0.50~655 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=81e754ff585a691a040ae4d1e7fd47c209991f53;p=thirdparty%2Fldns.git buf.h added, we need some kind of holding place of dns data --- diff --git a/Makefile.in b/Makefile.in index 099e69ec..b423a957 100644 --- a/Makefile.in +++ b/Makefile.in @@ -25,7 +25,8 @@ LIBDNS_HEADERS = ldns/error.h \ ldns/prototype.h \ ldns/rdata.h \ ldns/rr.h \ - util.h + util.h \ + buf.h LIBDNS_OBJECTS = $(LIBDNS_SOURCES:.c=.o) ALL_SOURCES = run-test0.c $(LIBDNS_SOURCES) diff --git a/buf.h b/buf.h new file mode 100644 index 00000000..6a02e190 --- /dev/null +++ b/buf.h @@ -0,0 +1,19 @@ +/* + * buf.h + * + * a buffer with dns data and a length + * + * a Net::DNS like library for C + * + * (c) NLnet Labs, 2004 + * + * See the file LICENSE for the license + */ + +struct ldns_struct_buf +{ + size_t size; + uint8_t *data; +}; +typedef ldns_struct_buf ldns_buf; + diff --git a/wire2host.c b/wire2host.c index fd435985..1ef11050 100644 --- a/wire2host.c +++ b/wire2host.c @@ -18,12 +18,7 @@ * internal representation */ ssize_t -rdata_wireformat_to_rdata_atoms(region_type *region, - domain_table_type *owners, - uint16_t rrtype, - uint16_t data_size, - buffer_type *packet, - rdata_atom_type **rdatas) +rdata_buf_to_rdf(ldns_rdf *rd, ldns_buf *buffer) { size_t end = buffer_position(packet) + data_size; ssize_t i;