1 /* $NetBSD: txt_16.h,v 1.5 2021/02/19 16:42:17 christos Exp $ */ 2 3 /* 4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 5 * 6 * This Source Code Form is subject to the terms of the Mozilla Public 7 * License, v. 2.0. If a copy of the MPL was not distributed with this 8 * file, you can obtain one at https://mozilla.org/MPL/2.0/. 9 * 10 * See the COPYRIGHT file distributed with this work for additional 11 * information regarding copyright ownership. 12 */ 13 14 /* */ 15 #ifndef GENERIC_TXT_16_H 16 #define GENERIC_TXT_16_H 1 17 18 typedef struct dns_rdata_txt_string { 19 uint8_t length; 20 unsigned char *data; 21 } dns_rdata_txt_string_t; 22 23 typedef struct dns_rdata_txt { 24 dns_rdatacommon_t common; 25 isc_mem_t *mctx; 26 unsigned char *txt; 27 uint16_t txt_len; 28 /* private */ 29 uint16_t offset; 30 } dns_rdata_txt_t; 31 32 /* 33 * ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS are already done 34 * via rdatastructpre.h and rdatastructsuf.h. 35 */ 36 37 isc_result_t 38 dns_rdata_txt_first(dns_rdata_txt_t *); 39 40 isc_result_t 41 dns_rdata_txt_next(dns_rdata_txt_t *); 42 43 isc_result_t 44 dns_rdata_txt_current(dns_rdata_txt_t *, dns_rdata_txt_string_t *); 45 46 #endif /* GENERIC_TXT_16_H */ 47