/* * Copyright (C) 1998-2024 Internet Systems Consortium, Inc. ("ISC") * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. */ /*************** *************** *************** THIS FILE IS AUTOMATICALLY GENERATED BY gen.c. *************** DO NOT EDIT! *************** ***************/ /*! \file */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once #include #include #include #include ISC_LANG_BEGINDECLS typedef struct dns_rdatacommon { dns_rdataclass_t rdclass; dns_rdatatype_t rdtype; ISC_LINK(struct dns_rdatacommon) link; } dns_rdatacommon_t; #define DNS_RDATACOMMON_INIT(_data, _rdtype, _rdclass) \ do { \ (_data)->common.rdtype = (_rdtype); \ (_data)->common.rdclass = (_rdclass); \ ISC_LINK_INIT(&(_data)->common, link); \ } while (0) /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_in_a { dns_rdatacommon_t common; struct in_addr in_addr; } dns_rdata_in_a_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* by Bjorn.Victor@it.uu.se, 2005-05-07 */ /* Based on generic/mx_15.h */ #pragma once typedef uint16_t ch_addr_t; typedef struct dns_rdata_ch_a { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t ch_addr_dom; /* ch-addr domain for back mapping * */ ch_addr_t ch_addr; /* chaos address (16 bit) network * order */ } dns_rdata_ch_a_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_hs_a { dns_rdatacommon_t common; struct in_addr in_addr; } dns_rdata_hs_a_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_ns { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t name; } dns_rdata_ns_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_md { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t md; } dns_rdata_md_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_mf { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t mf; } dns_rdata_mf_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_cname { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t cname; } dns_rdata_cname_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_soa { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t origin; dns_name_t contact; uint32_t serial; /*%< host order */ uint32_t refresh; /*%< host order */ uint32_t retry; /*%< host order */ uint32_t expire; /*%< host order */ uint32_t minimum; /*%< host order */ } dns_rdata_soa_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_mb { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t mb; } dns_rdata_mb_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_mg { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t mg; } dns_rdata_mg_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_mr { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t mr; } dns_rdata_mr_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_null { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t length; unsigned char *data; } dns_rdata_null_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_in_wks { dns_rdatacommon_t common; isc_mem_t *mctx; struct in_addr in_addr; uint16_t protocol; unsigned char *map; uint16_t map_len; } dns_rdata_in_wks_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_ptr { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t ptr; } dns_rdata_ptr_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_hinfo { dns_rdatacommon_t common; isc_mem_t *mctx; char *cpu; char *os; uint8_t cpu_len; uint8_t os_len; } dns_rdata_hinfo_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_minfo { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t rmailbox; dns_name_t emailbox; } dns_rdata_minfo_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_mx { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t pref; dns_name_t mx; } dns_rdata_mx_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_txt_string { 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; uint16_t txt_len; /* private */ uint16_t offset; } dns_rdata_txt_t; /* * ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS are already done * via rdatastructpre.h and rdatastructsuf.h. */ 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 *); /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1183 */ typedef struct dns_rdata_rp { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t mail; dns_name_t text; } dns_rdata_rp_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1183 */ typedef struct dns_rdata_afsdb { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t subtype; dns_name_t server; } dns_rdata_afsdb_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1183 */ typedef struct dns_rdata_x25 { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *x25; uint8_t x25_len; } dns_rdata_x25_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1183 */ typedef struct dns_rdata_isdn { dns_rdatacommon_t common; isc_mem_t *mctx; char *isdn; char *subaddress; uint8_t isdn_len; uint8_t subaddress_len; } dns_rdata_isdn_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1183 */ typedef struct dns_rdata_rt { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t preference; dns_name_t host; } dns_rdata_rt_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1706 */ typedef struct dns_rdata_in_nsap { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *nsap; uint16_t nsap_len; } dns_rdata_in_nsap_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1348. Obsoleted in RFC 1706 - use PTR instead. */ typedef struct dns_rdata_in_nsap_ptr { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t owner; } dns_rdata_in_nsap_ptr_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC2535 */ typedef struct dns_rdata_sig_t { dns_rdatacommon_t common; isc_mem_t *mctx; dns_rdatatype_t covered; dns_secalg_t algorithm; uint8_t labels; uint32_t originalttl; uint32_t timeexpire; uint32_t timesigned; uint16_t keyid; dns_name_t signer; uint16_t siglen; unsigned char *signature; } dns_rdata_sig_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC2535 */ typedef struct dns_rdata_key { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t flags; dns_secproto_t protocol; dns_secalg_t algorithm; uint16_t datalen; unsigned char *data; } dns_rdata_key_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC2163 */ typedef struct dns_rdata_in_px { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t preference; dns_name_t map822; dns_name_t mapx400; } dns_rdata_in_px_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief per RFC1712 */ typedef struct dns_rdata_gpos { dns_rdatacommon_t common; isc_mem_t *mctx; char *longitude; char *latitude; char *altitude; uint8_t long_len; uint8_t lat_len; uint8_t alt_len; } dns_rdata_gpos_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1886 */ typedef struct dns_rdata_in_aaaa { dns_rdatacommon_t common; struct in6_addr in6_addr; } dns_rdata_in_aaaa_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1876 */ typedef struct dns_rdata_loc_0 { uint8_t version; /* must be first and zero */ uint8_t size; uint8_t horizontal; uint8_t vertical; uint32_t latitude; uint32_t longitude; uint32_t altitude; } dns_rdata_loc_0_t; typedef struct dns_rdata_loc { dns_rdatacommon_t common; union { dns_rdata_loc_0_t v0; } v; } dns_rdata_loc_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief RFC2535 */ typedef struct dns_rdata_nxt { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t next; unsigned char *typebits; uint16_t len; } dns_rdata_nxt_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief http://ana-3.lcs.mit.edu/~jnc/nimrod/dns.txt */ typedef struct dns_rdata_in_eid { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *eid; uint16_t eid_len; } dns_rdata_in_eid_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief http://ana-3.lcs.mit.edu/~jnc/nimrod/dns.txt */ typedef struct dns_rdata_in_nimloc { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *nimloc; uint16_t nimloc_len; } dns_rdata_in_nimloc_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC2782 */ typedef struct dns_rdata_in_srv { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t priority; uint16_t weight; uint16_t port; dns_name_t target; } dns_rdata_in_srv_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC1706 */ typedef struct dns_rdata_in_atma { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char format; unsigned char *atma; uint16_t atma_len; } dns_rdata_in_atma_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC2915 */ typedef struct dns_rdata_naptr { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t order; uint16_t preference; char *flags; uint8_t flags_len; char *service; uint8_t service_len; char *regexp; uint8_t regexp_len; dns_name_t replacement; } dns_rdata_naptr_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC2230 */ typedef struct dns_rdata_in_kx { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t preference; dns_name_t exchange; } dns_rdata_in_kx_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*% RFC2538 */ typedef struct dns_rdata_cert { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t type; uint16_t key_tag; uint8_t algorithm; uint16_t length; unsigned char *certificate; } dns_rdata_cert_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC2874 */ typedef struct dns_rdata_in_a6 { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t prefix; uint8_t prefixlen; struct in6_addr in6_addr; } dns_rdata_in_a6_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief per RFC2672 */ typedef struct dns_rdata_dname { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t dname; } dns_rdata_dname_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_sink_t { dns_rdatacommon_t common; isc_mem_t *mctx; uint8_t meaning; uint8_t coding; uint8_t subcoding; uint16_t datalen; unsigned char *data; } dns_rdata_sink_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC2671 */ typedef struct dns_rdata_opt_opcode { uint16_t opcode; uint16_t length; unsigned char *data; } dns_rdata_opt_opcode_t; typedef struct dns_rdata_opt { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *options; uint16_t length; /* private */ uint16_t offset; } dns_rdata_opt_t; /* * ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS are already done * via rdatastructpre.h and rdatastructsuf.h. */ isc_result_t dns_rdata_opt_first(dns_rdata_opt_t *); isc_result_t dns_rdata_opt_next(dns_rdata_opt_t *); isc_result_t dns_rdata_opt_current(dns_rdata_opt_t *, dns_rdata_opt_opcode_t *); /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_apl_ent { bool negative; uint16_t family; uint8_t prefix; uint8_t length; unsigned char *data; } dns_rdata_apl_ent_t; typedef struct dns_rdata_in_apl { dns_rdatacommon_t common; isc_mem_t *mctx; /* type & class specific elements */ unsigned char *apl; uint16_t apl_len; /* private */ uint16_t offset; } dns_rdata_in_apl_t; /* * ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS are already done * via rdatastructpre.h and rdatastructsuf.h. */ isc_result_t dns_rdata_apl_first(dns_rdata_in_apl_t *); isc_result_t dns_rdata_apl_next(dns_rdata_in_apl_t *); isc_result_t dns_rdata_apl_current(dns_rdata_in_apl_t *, dns_rdata_apl_ent_t *); unsigned int dns_rdata_apl_count(const dns_rdata_in_apl_t *apl); /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief per draft-ietf-dnsext-delegation-signer-05.txt */ typedef struct dns_rdata_ds { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t key_tag; dns_secalg_t algorithm; dns_dsdigest_t digest_type; uint16_t length; unsigned char *digest; } dns_rdata_ds_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /*! * \brief Per RFC 4255 */ #pragma once typedef struct dns_rdata_sshfp { dns_rdatacommon_t common; isc_mem_t *mctx; uint8_t algorithm; uint8_t digest_type; uint16_t length; unsigned char *digest; } dns_rdata_sshfp_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_ipseckey { dns_rdatacommon_t common; isc_mem_t *mctx; uint8_t precedence; uint8_t gateway_type; uint8_t algorithm; struct in_addr in_addr; /* gateway type 1 */ struct in6_addr in6_addr; /* gateway type 2 */ dns_name_t gateway; /* gateway type 3 */ unsigned char *key; uint16_t keylength; } dns_rdata_ipseckey_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC2535 */ typedef struct dns_rdata_rrsig { dns_rdatacommon_t common; isc_mem_t *mctx; dns_rdatatype_t covered; dns_secalg_t algorithm; uint8_t labels; uint32_t originalttl; uint32_t timeexpire; uint32_t timesigned; uint16_t keyid; dns_name_t signer; uint16_t siglen; unsigned char *signature; } dns_rdata_rrsig_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC 3845 */ typedef struct dns_rdata_nsec { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t next; unsigned char *typebits; uint16_t len; } dns_rdata_nsec_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief per RFC2535 */ typedef struct dns_rdata_key dns_rdata_dnskey_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_in_dhcid { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *dhcid; unsigned int length; } dns_rdata_in_dhcid_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC 5155 */ #include typedef struct dns_rdata_nsec3 { dns_rdatacommon_t common; isc_mem_t *mctx; dns_hash_t hash; unsigned char flags; dns_iterations_t iterations; unsigned char salt_length; unsigned char next_length; uint16_t len; unsigned char *salt; unsigned char *next; unsigned char *typebits; } dns_rdata_nsec3_t; /* * The corresponding NSEC3 interval is OPTOUT indicating possible * insecure delegations. */ #define DNS_NSEC3FLAG_OPTOUT 0x01U /*% * The following flags are used in the private-type record (implemented in * lib/dns/private.c) which is used to store NSEC3PARAM data during the * time when it is not legal to have an actual NSEC3PARAM record in the * zone. They are defined here because the private-type record uses the * same flags field for the OPTOUT flag above and for the private flags * below. XXX: This should be considered for refactoring. */ /*% * Non-standard, private type only. * * Create a corresponding NSEC3 chain. * Once the NSEC3 chain is complete this flag will be removed to signal * that there is a complete chain. * * This flag is automatically set when a NSEC3PARAM record is added to * the zone via UPDATE. * * NSEC3PARAM records containing this flag should never be published, * but if they are, they should be ignored by RFC 5155 compliant * nameservers. */ #define DNS_NSEC3FLAG_CREATE 0x80U /*% * Non-standard, private type only. * * The corresponding NSEC3 set is to be removed once the NSEC chain * has been generated. * * This flag is automatically set when the last active NSEC3PARAM record * is removed from the zone via UPDATE. * * NSEC3PARAM records containing this flag should never be published, * but if they are, they should be ignored by RFC 5155 compliant * nameservers. */ #define DNS_NSEC3FLAG_REMOVE 0x40U /*% * Non-standard, private type only. * * When set with the CREATE flag, a corresponding NSEC3 chain will be * created when the zone becomes capable of supporting one (i.e., when it * has a DNSKEY RRset containing at least one NSEC3-capable algorithm). * Without this flag, NSEC3 chain creation would be attempted immediately, * fail, and the private type record would be removed. With it, the NSEC3 * parameters are stored until they can be used. When the zone has the * necessary prerequisites for NSEC3, then the INITIAL flag can be cleared, * and the record will be cleaned up normally. * * NSEC3PARAM records containing this flag should never be published, but * if they are, they should be ignored by RFC 5155 compliant nameservers. */ #define DNS_NSEC3FLAG_INITIAL 0x20U /*% * Non-standard, private type only. * * Prevent the creation of a NSEC chain before the last NSEC3 chain * is removed. This will normally only be set when the zone is * transitioning from secure with NSEC3 chains to insecure. * * NSEC3PARAM records containing this flag should never be published, * but if they are, they should be ignored by RFC 5155 compliant * nameservers. */ #define DNS_NSEC3FLAG_NONSEC 0x10U /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC 5155 */ #include typedef struct dns_rdata_nsec3param { dns_rdatacommon_t common; isc_mem_t *mctx; dns_hash_t hash; unsigned char flags; /* DNS_NSEC3FLAG_* */ dns_iterations_t iterations; unsigned char salt_length; unsigned char *salt; } dns_rdata_nsec3param_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief per rfc6698.txt */ typedef struct dns_rdata_tlsa { dns_rdatacommon_t common; isc_mem_t *mctx; uint8_t usage; uint8_t selector; uint8_t match; uint16_t length; unsigned char *data; } dns_rdata_tlsa_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_tlsa dns_rdata_smimea_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /* RFC 5205 */ typedef struct dns_rdata_hip { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *hit; unsigned char *key; unsigned char *servers; uint8_t algorithm; uint8_t hit_len; uint16_t key_len; uint16_t servers_len; /* Private */ uint16_t offset; } dns_rdata_hip_t; isc_result_t dns_rdata_hip_first(dns_rdata_hip_t *); isc_result_t dns_rdata_hip_next(dns_rdata_hip_t *); void dns_rdata_hip_current(dns_rdata_hip_t *, dns_name_t *); /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_txt_string dns_rdata_ninfo_string_t; typedef struct dns_rdata_txt dns_rdata_ninfo_t; /* * ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS are already done * via rdatastructpre.h and rdatastructsuf.h. */ isc_result_t dns_rdata_ninfo_first(dns_rdata_ninfo_t *); isc_result_t dns_rdata_ninfo_next(dns_rdata_ninfo_t *); isc_result_t dns_rdata_ninfo_current(dns_rdata_ninfo_t *, dns_rdata_ninfo_string_t *); /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_key dns_rdata_rkey_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* * http://www.iana.org/assignments/dns-parameters/TALINK/talink-completed-template */ #pragma once typedef struct dns_rdata_talink { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t prev; dns_name_t next; } dns_rdata_talink_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /* CDS records have the same RDATA fields as DS records. */ typedef struct dns_rdata_ds dns_rdata_cds_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /* CDNSKEY records have the same RDATA fields as DNSKEY records. */ typedef struct dns_rdata_key dns_rdata_cdnskey_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_openpgpkey { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t length; unsigned char *keyring; } dns_rdata_openpgpkey_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per RFC 7477 */ typedef struct dns_rdata_csync { dns_rdatacommon_t common; isc_mem_t *mctx; uint32_t serial; uint16_t flags; unsigned char *typebits; uint16_t len; } dns_rdata_csync_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /* Known digest type(s). */ #define DNS_ZONEMD_DIGEST_SHA384 (1) #define DNS_ZONEMD_DIGEST_SHA512 (2) /* * \brief per RFC 8976 */ typedef struct dns_rdata_zonemd { dns_rdatacommon_t common; isc_mem_t *mctx; uint32_t serial; uint8_t scheme; uint8_t digest_type; unsigned char *digest; uint16_t length; } dns_rdata_zonemd_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per draft-ietf-dnsop-svcb-https-02 */ typedef struct dns_rdata_in_svcb { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t priority; dns_name_t svcdomain; unsigned char *svc; uint16_t svclen; uint16_t offset; } dns_rdata_in_svcb_t; isc_result_t dns_rdata_in_svcb_first(dns_rdata_in_svcb_t *); isc_result_t dns_rdata_in_svcb_next(dns_rdata_in_svcb_t *); void dns_rdata_in_svcb_current(dns_rdata_in_svcb_t *, isc_region_t *); /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per draft-ietf-dnsop-svcb-https-02 */ /* * Wire and presentation formats for HTTPS are identical to SVCB. */ typedef struct dns_rdata_in_svcb dns_rdata_in_https_t; isc_result_t dns_rdata_in_https_first(dns_rdata_in_https_t *); isc_result_t dns_rdata_in_https_next(dns_rdata_in_https_t *); void dns_rdata_in_https_current(dns_rdata_in_https_t *, isc_region_t *); /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_spf_string { uint8_t length; unsigned char *data; } dns_rdata_spf_string_t; typedef struct dns_rdata_spf { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *txt; uint16_t txt_len; /* private */ uint16_t offset; } dns_rdata_spf_t; /* * ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS are already done * via rdatastructpre.h and rdatastructsuf.h. */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_nid { dns_rdatacommon_t common; uint16_t pref; unsigned char nid[8]; } dns_rdata_nid_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_l32 { dns_rdatacommon_t common; uint16_t pref; struct in_addr l32; } dns_rdata_l32_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_l64 { dns_rdatacommon_t common; uint16_t pref; unsigned char l64[8]; } dns_rdata_l64_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_lp { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t pref; dns_name_t lp; } dns_rdata_lp_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_eui48 { dns_rdatacommon_t common; unsigned char eui48[6]; } dns_rdata_eui48_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* */ #pragma once typedef struct dns_rdata_eui64 { dns_rdatacommon_t common; unsigned char eui64[8]; } dns_rdata_eui64_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*! * \brief Per draft-ietf-dnsind-tkey-00.txt */ typedef struct dns_rdata_tkey { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t algorithm; uint32_t inception; uint32_t expire; uint16_t mode; uint16_t error; uint16_t keylen; unsigned char *key; uint16_t otherlen; unsigned char *other; } dns_rdata_tkey_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /*% RFC2845 */ typedef struct dns_rdata_any_tsig { dns_rdatacommon_t common; isc_mem_t *mctx; dns_name_t algorithm; uint64_t timesigned; uint16_t fudge; uint16_t siglen; unsigned char *signature; uint16_t originalid; uint16_t error; uint16_t otherlen; unsigned char *other; } dns_rdata_any_tsig_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_uri { dns_rdatacommon_t common; isc_mem_t *mctx; uint16_t priority; uint16_t weight; unsigned char *target; uint16_t tgt_len; } dns_rdata_uri_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_caa { dns_rdatacommon_t common; isc_mem_t *mctx; uint8_t flags; unsigned char *tag; uint8_t tag_len; unsigned char *value; uint16_t value_len; } dns_rdata_caa_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef dns_rdata_txt_string_t dns_rdata_avc_string_t; typedef struct dns_rdata_avc { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *data; uint16_t length; /* private */ uint16_t offset; } dns_rdata_avc_t; /* * ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS are already done * via rdatastructpre.h and rdatastructsuf.h. */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_doa { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *mediatype; unsigned char *data; uint32_t enterprise; uint32_t type; uint16_t data_len; uint8_t location; uint8_t mediatype_len; } dns_rdata_doa_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_amtrelay { dns_rdatacommon_t common; isc_mem_t *mctx; uint8_t precedence; bool discovery; uint8_t gateway_type; struct in_addr in_addr; /* gateway type 1 */ struct in6_addr in6_addr; /* gateway type 2 */ dns_name_t gateway; /* gateway type 3 */ unsigned char *data; /* gateway type > 3 */ uint16_t length; } dns_rdata_amtrelay_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_resinfo_string { uint8_t length; unsigned char *data; } dns_rdata_resinfo_string_t; typedef struct dns_rdata_resinfo { dns_rdatacommon_t common; isc_mem_t *mctx; unsigned char *txt; uint16_t txt_len; /* private */ uint16_t offset; } dns_rdata_resinfo_t; /* * ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS are already done * via rdatastructpre.h and rdatastructsuf.h. */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once /* * TA records are identical to DS records. */ typedef struct dns_rdata_ds dns_rdata_ta_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* draft-ietf-dnsext-delegation-signer-05.txt */ #pragma once typedef struct dns_rdata_ds dns_rdata_dlv_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #pragma once typedef struct dns_rdata_keydata { dns_rdatacommon_t common; isc_mem_t *mctx; uint32_t refresh; /* Timer for refreshing data */ uint32_t addhd; /* Hold-down timer for adding */ uint32_t removehd; /* Hold-down timer for removing */ uint16_t flags; /* Copy of DNSKEY_48 */ dns_secproto_t protocol; dns_secalg_t algorithm; uint16_t datalen; unsigned char *data; } dns_rdata_keydata_t; /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * SPDX-License-Identifier: MPL-2.0 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ ISC_LANG_ENDDECLS