1 /* $NetBSD: txt_16.h,v 1.4 2014/12/10 04:37:59 christos Exp $ */ 2 3 /* 4 * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") 5 * Copyright (C) 1998-2001 Internet Software Consortium. 6 * 7 * Permission to use, copy, modify, and/or distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /* */ 21 #ifndef GENERIC_TXT_16_H 22 #define GENERIC_TXT_16_H 1 23 24 /* Id: txt_16.h,v 1.28 2007/06/19 23:47:17 tbox Exp */ 25 26 typedef struct dns_rdata_txt_string { 27 isc_uint8_t length; 28 unsigned char *data; 29 } dns_rdata_txt_string_t; 30 31 typedef struct dns_rdata_txt { 32 dns_rdatacommon_t common; 33 isc_mem_t *mctx; 34 unsigned char *txt; 35 isc_uint16_t txt_len; 36 /* private */ 37 isc_uint16_t offset; 38 } dns_rdata_txt_t; 39 40 /* 41 * ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS are already done 42 * via rdatastructpre.h and rdatastructsuf.h. 43 */ 44 45 isc_result_t 46 dns_rdata_txt_first(dns_rdata_txt_t *); 47 48 isc_result_t 49 dns_rdata_txt_next(dns_rdata_txt_t *); 50 51 isc_result_t 52 dns_rdata_txt_current(dns_rdata_txt_t *, dns_rdata_txt_string_t *); 53 54 #endif /* GENERIC_TXT_16_H */ 55