11cb0ef41Sopenharmony_ci/* MIT License 21cb0ef41Sopenharmony_ci * 31cb0ef41Sopenharmony_ci * Copyright (c) Massachusetts Institute of Technology 41cb0ef41Sopenharmony_ci * Copyright (c) Daniel Stenberg 51cb0ef41Sopenharmony_ci * 61cb0ef41Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a copy 71cb0ef41Sopenharmony_ci * of this software and associated documentation files (the "Software"), to deal 81cb0ef41Sopenharmony_ci * in the Software without restriction, including without limitation the rights 91cb0ef41Sopenharmony_ci * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 101cb0ef41Sopenharmony_ci * copies of the Software, and to permit persons to whom the Software is 111cb0ef41Sopenharmony_ci * furnished to do so, subject to the following conditions: 121cb0ef41Sopenharmony_ci * 131cb0ef41Sopenharmony_ci * The above copyright notice and this permission notice (including the next 141cb0ef41Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 151cb0ef41Sopenharmony_ci * Software. 161cb0ef41Sopenharmony_ci * 171cb0ef41Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 181cb0ef41Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 191cb0ef41Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 201cb0ef41Sopenharmony_ci * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 211cb0ef41Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 221cb0ef41Sopenharmony_ci * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 231cb0ef41Sopenharmony_ci * SOFTWARE. 241cb0ef41Sopenharmony_ci * 251cb0ef41Sopenharmony_ci * SPDX-License-Identifier: MIT 261cb0ef41Sopenharmony_ci */ 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ci#ifndef ARES_NAMESER_H 291cb0ef41Sopenharmony_ci#define ARES_NAMESER_H 301cb0ef41Sopenharmony_ci 311cb0ef41Sopenharmony_ci#include "ares_build.h" 321cb0ef41Sopenharmony_ci 331cb0ef41Sopenharmony_ci#ifdef CARES_HAVE_ARPA_NAMESER_H 341cb0ef41Sopenharmony_ci# include <arpa/nameser.h> 351cb0ef41Sopenharmony_ci#endif 361cb0ef41Sopenharmony_ci#ifdef CARES_HAVE_ARPA_NAMESER_COMPAT_H 371cb0ef41Sopenharmony_ci# include <arpa/nameser_compat.h> 381cb0ef41Sopenharmony_ci#endif 391cb0ef41Sopenharmony_ci 401cb0ef41Sopenharmony_ci/* ============================================================================ 411cb0ef41Sopenharmony_ci * arpa/nameser.h may or may not provide ALL of the below defines, so check 421cb0ef41Sopenharmony_ci * each one individually and set if not 431cb0ef41Sopenharmony_ci * ============================================================================ 441cb0ef41Sopenharmony_ci */ 451cb0ef41Sopenharmony_ci 461cb0ef41Sopenharmony_ci#ifndef NS_PACKETSZ 471cb0ef41Sopenharmony_ci# define NS_PACKETSZ 512 /* maximum packet size */ 481cb0ef41Sopenharmony_ci#endif 491cb0ef41Sopenharmony_ci 501cb0ef41Sopenharmony_ci#ifndef NS_MAXDNAME 511cb0ef41Sopenharmony_ci# define NS_MAXDNAME 256 /* maximum domain name */ 521cb0ef41Sopenharmony_ci#endif 531cb0ef41Sopenharmony_ci 541cb0ef41Sopenharmony_ci#ifndef NS_MAXCDNAME 551cb0ef41Sopenharmony_ci# define NS_MAXCDNAME 255 /* maximum compressed domain name */ 561cb0ef41Sopenharmony_ci#endif 571cb0ef41Sopenharmony_ci 581cb0ef41Sopenharmony_ci#ifndef NS_MAXLABEL 591cb0ef41Sopenharmony_ci# define NS_MAXLABEL 63 601cb0ef41Sopenharmony_ci#endif 611cb0ef41Sopenharmony_ci 621cb0ef41Sopenharmony_ci#ifndef NS_HFIXEDSZ 631cb0ef41Sopenharmony_ci# define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */ 641cb0ef41Sopenharmony_ci#endif 651cb0ef41Sopenharmony_ci 661cb0ef41Sopenharmony_ci#ifndef NS_QFIXEDSZ 671cb0ef41Sopenharmony_ci# define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */ 681cb0ef41Sopenharmony_ci#endif 691cb0ef41Sopenharmony_ci 701cb0ef41Sopenharmony_ci#ifndef NS_RRFIXEDSZ 711cb0ef41Sopenharmony_ci# define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */ 721cb0ef41Sopenharmony_ci#endif 731cb0ef41Sopenharmony_ci 741cb0ef41Sopenharmony_ci#ifndef NS_INT16SZ 751cb0ef41Sopenharmony_ci# define NS_INT16SZ 2 761cb0ef41Sopenharmony_ci#endif 771cb0ef41Sopenharmony_ci 781cb0ef41Sopenharmony_ci#ifndef NS_INADDRSZ 791cb0ef41Sopenharmony_ci# define NS_INADDRSZ 4 801cb0ef41Sopenharmony_ci#endif 811cb0ef41Sopenharmony_ci 821cb0ef41Sopenharmony_ci#ifndef NS_IN6ADDRSZ 831cb0ef41Sopenharmony_ci# define NS_IN6ADDRSZ 16 841cb0ef41Sopenharmony_ci#endif 851cb0ef41Sopenharmony_ci 861cb0ef41Sopenharmony_ci#ifndef NS_CMPRSFLGS 871cb0ef41Sopenharmony_ci# define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */ 881cb0ef41Sopenharmony_ci#endif 891cb0ef41Sopenharmony_ci 901cb0ef41Sopenharmony_ci#ifndef NS_DEFAULTPORT 911cb0ef41Sopenharmony_ci# define NS_DEFAULTPORT 53 /* For both TCP and UDP. */ 921cb0ef41Sopenharmony_ci#endif 931cb0ef41Sopenharmony_ci 941cb0ef41Sopenharmony_ci/* ============================================================================ 951cb0ef41Sopenharmony_ci * arpa/nameser.h should provide these enumerations always, so if not found, 961cb0ef41Sopenharmony_ci * provide them 971cb0ef41Sopenharmony_ci * ============================================================================ 981cb0ef41Sopenharmony_ci */ 991cb0ef41Sopenharmony_ci#ifndef CARES_HAVE_ARPA_NAMESER_H 1001cb0ef41Sopenharmony_ci 1011cb0ef41Sopenharmony_citypedef enum __ns_class { 1021cb0ef41Sopenharmony_ci ns_c_invalid = 0, /* Cookie. */ 1031cb0ef41Sopenharmony_ci ns_c_in = 1, /* Internet. */ 1041cb0ef41Sopenharmony_ci ns_c_2 = 2, /* unallocated/unsupported. */ 1051cb0ef41Sopenharmony_ci ns_c_chaos = 3, /* MIT Chaos-net. */ 1061cb0ef41Sopenharmony_ci ns_c_hs = 4, /* MIT Hesiod. */ 1071cb0ef41Sopenharmony_ci /* Query class values which do not appear in resource records */ 1081cb0ef41Sopenharmony_ci ns_c_none = 254, /* for prereq. sections in update requests */ 1091cb0ef41Sopenharmony_ci ns_c_any = 255, /* Wildcard match. */ 1101cb0ef41Sopenharmony_ci ns_c_max = 65536 1111cb0ef41Sopenharmony_ci} ns_class; 1121cb0ef41Sopenharmony_ci 1131cb0ef41Sopenharmony_citypedef enum __ns_type { 1141cb0ef41Sopenharmony_ci ns_t_invalid = 0, /* Cookie. */ 1151cb0ef41Sopenharmony_ci ns_t_a = 1, /* Host address. */ 1161cb0ef41Sopenharmony_ci ns_t_ns = 2, /* Authoritative server. */ 1171cb0ef41Sopenharmony_ci ns_t_md = 3, /* Mail destination. */ 1181cb0ef41Sopenharmony_ci ns_t_mf = 4, /* Mail forwarder. */ 1191cb0ef41Sopenharmony_ci ns_t_cname = 5, /* Canonical name. */ 1201cb0ef41Sopenharmony_ci ns_t_soa = 6, /* Start of authority zone. */ 1211cb0ef41Sopenharmony_ci ns_t_mb = 7, /* Mailbox domain name. */ 1221cb0ef41Sopenharmony_ci ns_t_mg = 8, /* Mail group member. */ 1231cb0ef41Sopenharmony_ci ns_t_mr = 9, /* Mail rename name. */ 1241cb0ef41Sopenharmony_ci ns_t_null = 10, /* Null resource record. */ 1251cb0ef41Sopenharmony_ci ns_t_wks = 11, /* Well known service. */ 1261cb0ef41Sopenharmony_ci ns_t_ptr = 12, /* Domain name pointer. */ 1271cb0ef41Sopenharmony_ci ns_t_hinfo = 13, /* Host information. */ 1281cb0ef41Sopenharmony_ci ns_t_minfo = 14, /* Mailbox information. */ 1291cb0ef41Sopenharmony_ci ns_t_mx = 15, /* Mail routing information. */ 1301cb0ef41Sopenharmony_ci ns_t_txt = 16, /* Text strings. */ 1311cb0ef41Sopenharmony_ci ns_t_rp = 17, /* Responsible person. */ 1321cb0ef41Sopenharmony_ci ns_t_afsdb = 18, /* AFS cell database. */ 1331cb0ef41Sopenharmony_ci ns_t_x25 = 19, /* X_25 calling address. */ 1341cb0ef41Sopenharmony_ci ns_t_isdn = 20, /* ISDN calling address. */ 1351cb0ef41Sopenharmony_ci ns_t_rt = 21, /* Router. */ 1361cb0ef41Sopenharmony_ci ns_t_nsap = 22, /* NSAP address. */ 1371cb0ef41Sopenharmony_ci ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ 1381cb0ef41Sopenharmony_ci ns_t_sig = 24, /* Security signature. */ 1391cb0ef41Sopenharmony_ci ns_t_key = 25, /* Security key. */ 1401cb0ef41Sopenharmony_ci ns_t_px = 26, /* X.400 mail mapping. */ 1411cb0ef41Sopenharmony_ci ns_t_gpos = 27, /* Geographical position (withdrawn). */ 1421cb0ef41Sopenharmony_ci ns_t_aaaa = 28, /* Ip6 Address. */ 1431cb0ef41Sopenharmony_ci ns_t_loc = 29, /* Location Information. */ 1441cb0ef41Sopenharmony_ci ns_t_nxt = 30, /* Next domain (security). */ 1451cb0ef41Sopenharmony_ci ns_t_eid = 31, /* Endpoint identifier. */ 1461cb0ef41Sopenharmony_ci ns_t_nimloc = 32, /* Nimrod Locator. */ 1471cb0ef41Sopenharmony_ci ns_t_srv = 33, /* Server Selection. */ 1481cb0ef41Sopenharmony_ci ns_t_atma = 34, /* ATM Address */ 1491cb0ef41Sopenharmony_ci ns_t_naptr = 35, /* Naming Authority PoinTeR */ 1501cb0ef41Sopenharmony_ci ns_t_kx = 36, /* Key Exchange */ 1511cb0ef41Sopenharmony_ci ns_t_cert = 37, /* Certification record */ 1521cb0ef41Sopenharmony_ci ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */ 1531cb0ef41Sopenharmony_ci ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */ 1541cb0ef41Sopenharmony_ci ns_t_sink = 40, /* Kitchen sink (experimental) */ 1551cb0ef41Sopenharmony_ci ns_t_opt = 41, /* EDNS0 option (meta-RR) */ 1561cb0ef41Sopenharmony_ci ns_t_apl = 42, /* Address prefix list (RFC3123) */ 1571cb0ef41Sopenharmony_ci ns_t_ds = 43, /* Delegation Signer (RFC4034) */ 1581cb0ef41Sopenharmony_ci ns_t_sshfp = 44, /* SSH Key Fingerprint (RFC4255) */ 1591cb0ef41Sopenharmony_ci ns_t_rrsig = 46, /* Resource Record Signature (RFC4034) */ 1601cb0ef41Sopenharmony_ci ns_t_nsec = 47, /* Next Secure (RFC4034) */ 1611cb0ef41Sopenharmony_ci ns_t_dnskey = 48, /* DNS Public Key (RFC4034) */ 1621cb0ef41Sopenharmony_ci ns_t_tkey = 249, /* Transaction key */ 1631cb0ef41Sopenharmony_ci ns_t_tsig = 250, /* Transaction signature. */ 1641cb0ef41Sopenharmony_ci ns_t_ixfr = 251, /* Incremental zone transfer. */ 1651cb0ef41Sopenharmony_ci ns_t_axfr = 252, /* Transfer zone of authority. */ 1661cb0ef41Sopenharmony_ci ns_t_mailb = 253, /* Transfer mailbox records. */ 1671cb0ef41Sopenharmony_ci ns_t_maila = 254, /* Transfer mail agent records. */ 1681cb0ef41Sopenharmony_ci ns_t_any = 255, /* Wildcard match. */ 1691cb0ef41Sopenharmony_ci ns_t_uri = 256, /* Uniform Resource Identifier (RFC7553) */ 1701cb0ef41Sopenharmony_ci ns_t_caa = 257, /* Certification Authority Authorization. */ 1711cb0ef41Sopenharmony_ci ns_t_max = 65536 1721cb0ef41Sopenharmony_ci} ns_type; 1731cb0ef41Sopenharmony_ci 1741cb0ef41Sopenharmony_citypedef enum __ns_opcode { 1751cb0ef41Sopenharmony_ci ns_o_query = 0, /* Standard query. */ 1761cb0ef41Sopenharmony_ci ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */ 1771cb0ef41Sopenharmony_ci ns_o_status = 2, /* Name server status query (unsupported). */ 1781cb0ef41Sopenharmony_ci /* Opcode 3 is undefined/reserved. */ 1791cb0ef41Sopenharmony_ci ns_o_notify = 4, /* Zone change notification. */ 1801cb0ef41Sopenharmony_ci ns_o_update = 5, /* Zone update message. */ 1811cb0ef41Sopenharmony_ci ns_o_max = 6 1821cb0ef41Sopenharmony_ci} ns_opcode; 1831cb0ef41Sopenharmony_ci 1841cb0ef41Sopenharmony_citypedef enum __ns_rcode { 1851cb0ef41Sopenharmony_ci ns_r_noerror = 0, /* No error occurred. */ 1861cb0ef41Sopenharmony_ci ns_r_formerr = 1, /* Format error. */ 1871cb0ef41Sopenharmony_ci ns_r_servfail = 2, /* Server failure. */ 1881cb0ef41Sopenharmony_ci ns_r_nxdomain = 3, /* Name error. */ 1891cb0ef41Sopenharmony_ci ns_r_notimpl = 4, /* Unimplemented. */ 1901cb0ef41Sopenharmony_ci ns_r_refused = 5, /* Operation refused. */ 1911cb0ef41Sopenharmony_ci /* these are for BIND_UPDATE */ 1921cb0ef41Sopenharmony_ci ns_r_yxdomain = 6, /* Name exists */ 1931cb0ef41Sopenharmony_ci ns_r_yxrrset = 7, /* RRset exists */ 1941cb0ef41Sopenharmony_ci ns_r_nxrrset = 8, /* RRset does not exist */ 1951cb0ef41Sopenharmony_ci ns_r_notauth = 9, /* Not authoritative for zone */ 1961cb0ef41Sopenharmony_ci ns_r_notzone = 10, /* Zone of record different from zone section */ 1971cb0ef41Sopenharmony_ci ns_r_max = 11, 1981cb0ef41Sopenharmony_ci /* The following are TSIG extended errors */ 1991cb0ef41Sopenharmony_ci ns_r_badsig = 16, 2001cb0ef41Sopenharmony_ci ns_r_badkey = 17, 2011cb0ef41Sopenharmony_ci ns_r_badtime = 18 2021cb0ef41Sopenharmony_ci} ns_rcode; 2031cb0ef41Sopenharmony_ci 2041cb0ef41Sopenharmony_ci#endif /* CARES_HAVE_ARPA_NAMESER_H */ 2051cb0ef41Sopenharmony_ci 2061cb0ef41Sopenharmony_ci 2071cb0ef41Sopenharmony_ci/* ============================================================================ 2081cb0ef41Sopenharmony_ci * arpa/nameser_compat.h typically sets these. However on some systems 2091cb0ef41Sopenharmony_ci * arpa/nameser.h does, but may not set all of them. Lets conditionally 2101cb0ef41Sopenharmony_ci * define each 2111cb0ef41Sopenharmony_ci * ============================================================================ 2121cb0ef41Sopenharmony_ci */ 2131cb0ef41Sopenharmony_ci 2141cb0ef41Sopenharmony_ci#ifndef PACKETSZ 2151cb0ef41Sopenharmony_ci# define PACKETSZ NS_PACKETSZ 2161cb0ef41Sopenharmony_ci#endif 2171cb0ef41Sopenharmony_ci 2181cb0ef41Sopenharmony_ci#ifndef MAXDNAME 2191cb0ef41Sopenharmony_ci# define MAXDNAME NS_MAXDNAME 2201cb0ef41Sopenharmony_ci#endif 2211cb0ef41Sopenharmony_ci 2221cb0ef41Sopenharmony_ci#ifndef MAXCDNAME 2231cb0ef41Sopenharmony_ci# define MAXCDNAME NS_MAXCDNAME 2241cb0ef41Sopenharmony_ci#endif 2251cb0ef41Sopenharmony_ci 2261cb0ef41Sopenharmony_ci#ifndef MAXLABEL 2271cb0ef41Sopenharmony_ci# define MAXLABEL NS_MAXLABEL 2281cb0ef41Sopenharmony_ci#endif 2291cb0ef41Sopenharmony_ci 2301cb0ef41Sopenharmony_ci#ifndef HFIXEDSZ 2311cb0ef41Sopenharmony_ci# define HFIXEDSZ NS_HFIXEDSZ 2321cb0ef41Sopenharmony_ci#endif 2331cb0ef41Sopenharmony_ci 2341cb0ef41Sopenharmony_ci#ifndef QFIXEDSZ 2351cb0ef41Sopenharmony_ci# define QFIXEDSZ NS_QFIXEDSZ 2361cb0ef41Sopenharmony_ci#endif 2371cb0ef41Sopenharmony_ci 2381cb0ef41Sopenharmony_ci#ifndef RRFIXEDSZ 2391cb0ef41Sopenharmony_ci# define RRFIXEDSZ NS_RRFIXEDSZ 2401cb0ef41Sopenharmony_ci#endif 2411cb0ef41Sopenharmony_ci 2421cb0ef41Sopenharmony_ci#ifndef INDIR_MASK 2431cb0ef41Sopenharmony_ci# define INDIR_MASK NS_CMPRSFLGS 2441cb0ef41Sopenharmony_ci#endif 2451cb0ef41Sopenharmony_ci 2461cb0ef41Sopenharmony_ci#ifndef NAMESERVER_PORT 2471cb0ef41Sopenharmony_ci# define NAMESERVER_PORT NS_DEFAULTPORT 2481cb0ef41Sopenharmony_ci#endif 2491cb0ef41Sopenharmony_ci 2501cb0ef41Sopenharmony_ci 2511cb0ef41Sopenharmony_ci/* opcodes */ 2521cb0ef41Sopenharmony_ci#ifndef O_QUERY 2531cb0ef41Sopenharmony_ci# define O_QUERY 0 /* ns_o_query */ 2541cb0ef41Sopenharmony_ci#endif 2551cb0ef41Sopenharmony_ci#ifndef O_IQUERY 2561cb0ef41Sopenharmony_ci# define O_IQUERY 1 /* ns_o_iquery */ 2571cb0ef41Sopenharmony_ci#endif 2581cb0ef41Sopenharmony_ci#ifndef O_STATUS 2591cb0ef41Sopenharmony_ci# define O_STATUS 2 /* ns_o_status */ 2601cb0ef41Sopenharmony_ci#endif 2611cb0ef41Sopenharmony_ci#ifndef O_NOTIFY 2621cb0ef41Sopenharmony_ci# define O_NOTIFY 4 /* ns_o_notify */ 2631cb0ef41Sopenharmony_ci#endif 2641cb0ef41Sopenharmony_ci#ifndef O_UPDATE 2651cb0ef41Sopenharmony_ci# define O_UPDATE 5 /* ns_o_update */ 2661cb0ef41Sopenharmony_ci#endif 2671cb0ef41Sopenharmony_ci 2681cb0ef41Sopenharmony_ci 2691cb0ef41Sopenharmony_ci/* response codes */ 2701cb0ef41Sopenharmony_ci#ifndef SERVFAIL 2711cb0ef41Sopenharmony_ci# define SERVFAIL ns_r_servfail 2721cb0ef41Sopenharmony_ci#endif 2731cb0ef41Sopenharmony_ci#ifndef NOTIMP 2741cb0ef41Sopenharmony_ci# define NOTIMP ns_r_notimpl 2751cb0ef41Sopenharmony_ci#endif 2761cb0ef41Sopenharmony_ci#ifndef REFUSED 2771cb0ef41Sopenharmony_ci# define REFUSED ns_r_refused 2781cb0ef41Sopenharmony_ci#endif 2791cb0ef41Sopenharmony_ci#if defined(_WIN32) && !defined(HAVE_ARPA_NAMESER_COMPAT_H) && defined(NOERROR) 2801cb0ef41Sopenharmony_ci# undef NOERROR /* it seems this is already defined in winerror.h */ 2811cb0ef41Sopenharmony_ci#endif 2821cb0ef41Sopenharmony_ci#ifndef NOERROR 2831cb0ef41Sopenharmony_ci# define NOERROR ns_r_noerror 2841cb0ef41Sopenharmony_ci#endif 2851cb0ef41Sopenharmony_ci#ifndef FORMERR 2861cb0ef41Sopenharmony_ci# define FORMERR ns_r_formerr 2871cb0ef41Sopenharmony_ci#endif 2881cb0ef41Sopenharmony_ci#ifndef NXDOMAIN 2891cb0ef41Sopenharmony_ci# define NXDOMAIN ns_r_nxdomain 2901cb0ef41Sopenharmony_ci#endif 2911cb0ef41Sopenharmony_ci/* Non-standard response codes, use numeric values */ 2921cb0ef41Sopenharmony_ci#ifndef YXDOMAIN 2931cb0ef41Sopenharmony_ci# define YXDOMAIN 6 /* ns_r_yxdomain */ 2941cb0ef41Sopenharmony_ci#endif 2951cb0ef41Sopenharmony_ci#ifndef YXRRSET 2961cb0ef41Sopenharmony_ci# define YXRRSET 7 /* ns_r_yxrrset */ 2971cb0ef41Sopenharmony_ci#endif 2981cb0ef41Sopenharmony_ci#ifndef NXRRSET 2991cb0ef41Sopenharmony_ci# define NXRRSET 8 /* ns_r_nxrrset */ 3001cb0ef41Sopenharmony_ci#endif 3011cb0ef41Sopenharmony_ci#ifndef NOTAUTH 3021cb0ef41Sopenharmony_ci# define NOTAUTH 9 /* ns_r_notauth */ 3031cb0ef41Sopenharmony_ci#endif 3041cb0ef41Sopenharmony_ci#ifndef NOTZONE 3051cb0ef41Sopenharmony_ci# define NOTZONE 10 /* ns_r_notzone */ 3061cb0ef41Sopenharmony_ci#endif 3071cb0ef41Sopenharmony_ci#ifndef TSIG_BADSIG 3081cb0ef41Sopenharmony_ci# define TSIG_BADSIG 16 /* ns_r_badsig */ 3091cb0ef41Sopenharmony_ci#endif 3101cb0ef41Sopenharmony_ci#ifndef TSIG_BADKEY 3111cb0ef41Sopenharmony_ci# define TSIG_BADKEY 17 /* ns_r_badkey */ 3121cb0ef41Sopenharmony_ci#endif 3131cb0ef41Sopenharmony_ci#ifndef TSIG_BADTIME 3141cb0ef41Sopenharmony_ci# define TSIG_BADTIME 18 /* ns_r_badtime */ 3151cb0ef41Sopenharmony_ci#endif 3161cb0ef41Sopenharmony_ci 3171cb0ef41Sopenharmony_ci 3181cb0ef41Sopenharmony_ci/* classes */ 3191cb0ef41Sopenharmony_ci#ifndef C_IN 3201cb0ef41Sopenharmony_ci# define C_IN 1 /* ns_c_in */ 3211cb0ef41Sopenharmony_ci#endif 3221cb0ef41Sopenharmony_ci#ifndef C_CHAOS 3231cb0ef41Sopenharmony_ci# define C_CHAOS 3 /* ns_c_chaos */ 3241cb0ef41Sopenharmony_ci#endif 3251cb0ef41Sopenharmony_ci#ifndef C_HS 3261cb0ef41Sopenharmony_ci# define C_HS 4 /* ns_c_hs */ 3271cb0ef41Sopenharmony_ci#endif 3281cb0ef41Sopenharmony_ci#ifndef C_NONE 3291cb0ef41Sopenharmony_ci# define C_NONE 254 /* ns_c_none */ 3301cb0ef41Sopenharmony_ci#endif 3311cb0ef41Sopenharmony_ci#ifndef C_ANY 3321cb0ef41Sopenharmony_ci# define C_ANY 255 /* ns_c_any */ 3331cb0ef41Sopenharmony_ci#endif 3341cb0ef41Sopenharmony_ci 3351cb0ef41Sopenharmony_ci 3361cb0ef41Sopenharmony_ci/* types */ 3371cb0ef41Sopenharmony_ci#ifndef T_A 3381cb0ef41Sopenharmony_ci# define T_A 1 /* ns_t_a */ 3391cb0ef41Sopenharmony_ci#endif 3401cb0ef41Sopenharmony_ci#ifndef T_NS 3411cb0ef41Sopenharmony_ci# define T_NS 2 /* ns_t_ns */ 3421cb0ef41Sopenharmony_ci#endif 3431cb0ef41Sopenharmony_ci#ifndef T_MD 3441cb0ef41Sopenharmony_ci# define T_MD 3 /* ns_t_md */ 3451cb0ef41Sopenharmony_ci#endif 3461cb0ef41Sopenharmony_ci#ifndef T_MF 3471cb0ef41Sopenharmony_ci# define T_MF 4 /* ns_t_mf */ 3481cb0ef41Sopenharmony_ci#endif 3491cb0ef41Sopenharmony_ci#ifndef T_CNAME 3501cb0ef41Sopenharmony_ci# define T_CNAME 5 /* ns_t_cname */ 3511cb0ef41Sopenharmony_ci#endif 3521cb0ef41Sopenharmony_ci#ifndef T_SOA 3531cb0ef41Sopenharmony_ci# define T_SOA 6 /* ns_t_soa */ 3541cb0ef41Sopenharmony_ci#endif 3551cb0ef41Sopenharmony_ci#ifndef T_MB 3561cb0ef41Sopenharmony_ci# define T_MB 7 /* ns_t_mb */ 3571cb0ef41Sopenharmony_ci#endif 3581cb0ef41Sopenharmony_ci#ifndef T_MG 3591cb0ef41Sopenharmony_ci# define T_MG 8 /* ns_t_mg */ 3601cb0ef41Sopenharmony_ci#endif 3611cb0ef41Sopenharmony_ci#ifndef T_MR 3621cb0ef41Sopenharmony_ci# define T_MR 9 /* ns_t_mr */ 3631cb0ef41Sopenharmony_ci#endif 3641cb0ef41Sopenharmony_ci#ifndef T_NULL 3651cb0ef41Sopenharmony_ci# define T_NULL 10 /* ns_t_null */ 3661cb0ef41Sopenharmony_ci#endif 3671cb0ef41Sopenharmony_ci#ifndef T_WKS 3681cb0ef41Sopenharmony_ci# define T_WKS 11 /* ns_t_wks */ 3691cb0ef41Sopenharmony_ci#endif 3701cb0ef41Sopenharmony_ci#ifndef T_PTR 3711cb0ef41Sopenharmony_ci# define T_PTR 12 /* ns_t_ptr */ 3721cb0ef41Sopenharmony_ci#endif 3731cb0ef41Sopenharmony_ci#ifndef T_HINFO 3741cb0ef41Sopenharmony_ci# define T_HINFO 13 /* ns_t_hinfo */ 3751cb0ef41Sopenharmony_ci#endif 3761cb0ef41Sopenharmony_ci#ifndef T_MINFO 3771cb0ef41Sopenharmony_ci# define T_MINFO 14 /* ns_t_minfo */ 3781cb0ef41Sopenharmony_ci#endif 3791cb0ef41Sopenharmony_ci#ifndef T_MX 3801cb0ef41Sopenharmony_ci# define T_MX 15 /* ns_t_mx */ 3811cb0ef41Sopenharmony_ci#endif 3821cb0ef41Sopenharmony_ci#ifndef T_TXT 3831cb0ef41Sopenharmony_ci# define T_TXT 16 /* ns_t_txt */ 3841cb0ef41Sopenharmony_ci#endif 3851cb0ef41Sopenharmony_ci#ifndef T_RP 3861cb0ef41Sopenharmony_ci# define T_RP 17 /* ns_t_rp */ 3871cb0ef41Sopenharmony_ci#endif 3881cb0ef41Sopenharmony_ci#ifndef T_AFSDB 3891cb0ef41Sopenharmony_ci# define T_AFSDB 18 /* ns_t_afsdb */ 3901cb0ef41Sopenharmony_ci#endif 3911cb0ef41Sopenharmony_ci#ifndef T_X25 3921cb0ef41Sopenharmony_ci# define T_X25 19 /* ns_t_x25 */ 3931cb0ef41Sopenharmony_ci#endif 3941cb0ef41Sopenharmony_ci#ifndef T_ISDN 3951cb0ef41Sopenharmony_ci# define T_ISDN 20 /* ns_t_isdn */ 3961cb0ef41Sopenharmony_ci#endif 3971cb0ef41Sopenharmony_ci#ifndef T_RT 3981cb0ef41Sopenharmony_ci# define T_RT 21 /* ns_t_rt */ 3991cb0ef41Sopenharmony_ci#endif 4001cb0ef41Sopenharmony_ci#ifndef T_NSAP 4011cb0ef41Sopenharmony_ci# define T_NSAP 22 /* ns_t_nsap */ 4021cb0ef41Sopenharmony_ci#endif 4031cb0ef41Sopenharmony_ci#ifndef T_NSAP_PTR 4041cb0ef41Sopenharmony_ci# define T_NSAP_PTR 23 /* ns_t_nsap_ptr */ 4051cb0ef41Sopenharmony_ci#endif 4061cb0ef41Sopenharmony_ci#ifndef T_SIG 4071cb0ef41Sopenharmony_ci# define T_SIG 24 /* ns_t_sig */ 4081cb0ef41Sopenharmony_ci#endif 4091cb0ef41Sopenharmony_ci#ifndef T_KEY 4101cb0ef41Sopenharmony_ci# define T_KEY 25 /* ns_t_key */ 4111cb0ef41Sopenharmony_ci#endif 4121cb0ef41Sopenharmony_ci#ifndef T_PX 4131cb0ef41Sopenharmony_ci# define T_PX 26 /* ns_t_px */ 4141cb0ef41Sopenharmony_ci#endif 4151cb0ef41Sopenharmony_ci#ifndef T_GPOS 4161cb0ef41Sopenharmony_ci# define T_GPOS 27 /* ns_t_gpos */ 4171cb0ef41Sopenharmony_ci#endif 4181cb0ef41Sopenharmony_ci#ifndef T_AAAA 4191cb0ef41Sopenharmony_ci# define T_AAAA 28 /* ns_t_aaaa */ 4201cb0ef41Sopenharmony_ci#endif 4211cb0ef41Sopenharmony_ci#ifndef T_LOC 4221cb0ef41Sopenharmony_ci# define T_LOC 29 /* ns_t_loc */ 4231cb0ef41Sopenharmony_ci#endif 4241cb0ef41Sopenharmony_ci#ifndef T_NXT 4251cb0ef41Sopenharmony_ci# define T_NXT 30 /* ns_t_nxt */ 4261cb0ef41Sopenharmony_ci#endif 4271cb0ef41Sopenharmony_ci#ifndef T_EID 4281cb0ef41Sopenharmony_ci# define T_EID 31 /* ns_t_eid */ 4291cb0ef41Sopenharmony_ci#endif 4301cb0ef41Sopenharmony_ci#ifndef T_NIMLOC 4311cb0ef41Sopenharmony_ci# define T_NIMLOC 32 /* ns_t_nimloc */ 4321cb0ef41Sopenharmony_ci#endif 4331cb0ef41Sopenharmony_ci#ifndef T_SRV 4341cb0ef41Sopenharmony_ci# define T_SRV 33 /* ns_t_srv */ 4351cb0ef41Sopenharmony_ci#endif 4361cb0ef41Sopenharmony_ci#ifndef T_ATMA 4371cb0ef41Sopenharmony_ci# define T_ATMA 34 /* ns_t_atma */ 4381cb0ef41Sopenharmony_ci#endif 4391cb0ef41Sopenharmony_ci#ifndef T_NAPTR 4401cb0ef41Sopenharmony_ci# define T_NAPTR 35 /* ns_t_naptr */ 4411cb0ef41Sopenharmony_ci#endif 4421cb0ef41Sopenharmony_ci#ifndef T_KX 4431cb0ef41Sopenharmony_ci# define T_KX 36 /* ns_t_kx */ 4441cb0ef41Sopenharmony_ci#endif 4451cb0ef41Sopenharmony_ci#ifndef T_CERT 4461cb0ef41Sopenharmony_ci# define T_CERT 37 /* ns_t_cert */ 4471cb0ef41Sopenharmony_ci#endif 4481cb0ef41Sopenharmony_ci#ifndef T_A6 4491cb0ef41Sopenharmony_ci# define T_A6 38 /* ns_t_a6 */ 4501cb0ef41Sopenharmony_ci#endif 4511cb0ef41Sopenharmony_ci#ifndef T_DNAME 4521cb0ef41Sopenharmony_ci# define T_DNAME 39 /* ns_t_dname */ 4531cb0ef41Sopenharmony_ci#endif 4541cb0ef41Sopenharmony_ci#ifndef T_SINK 4551cb0ef41Sopenharmony_ci# define T_SINK 40 /* ns_t_sink */ 4561cb0ef41Sopenharmony_ci#endif 4571cb0ef41Sopenharmony_ci#ifndef T_OPT 4581cb0ef41Sopenharmony_ci# define T_OPT 41 /* ns_t_opt */ 4591cb0ef41Sopenharmony_ci#endif 4601cb0ef41Sopenharmony_ci#ifndef T_APL 4611cb0ef41Sopenharmony_ci# define T_APL 42 /* ns_t_apl */ 4621cb0ef41Sopenharmony_ci#endif 4631cb0ef41Sopenharmony_ci#ifndef T_DS 4641cb0ef41Sopenharmony_ci# define T_DS 43 /* ns_t_ds */ 4651cb0ef41Sopenharmony_ci#endif 4661cb0ef41Sopenharmony_ci#ifndef T_SSHFP 4671cb0ef41Sopenharmony_ci# define T_SSHFP 44 /* ns_t_sshfp */ 4681cb0ef41Sopenharmony_ci#endif 4691cb0ef41Sopenharmony_ci#ifndef T_RRSIG 4701cb0ef41Sopenharmony_ci# define T_RRSIG 46 /* ns_t_rrsig */ 4711cb0ef41Sopenharmony_ci#endif 4721cb0ef41Sopenharmony_ci#ifndef T_NSEC 4731cb0ef41Sopenharmony_ci# define T_NSEC 47 /* ns_t_nsec */ 4741cb0ef41Sopenharmony_ci#endif 4751cb0ef41Sopenharmony_ci#ifndef T_DNSKEY 4761cb0ef41Sopenharmony_ci# define T_DNSKEY 48 /* ns_t_dnskey */ 4771cb0ef41Sopenharmony_ci#endif 4781cb0ef41Sopenharmony_ci#ifndef T_TKEY 4791cb0ef41Sopenharmony_ci# define T_TKEY 249 /* ns_t_tkey */ 4801cb0ef41Sopenharmony_ci#endif 4811cb0ef41Sopenharmony_ci#ifndef T_TSIG 4821cb0ef41Sopenharmony_ci# define T_TSIG 250 /* ns_t_tsig */ 4831cb0ef41Sopenharmony_ci#endif 4841cb0ef41Sopenharmony_ci#ifndef T_IXFR 4851cb0ef41Sopenharmony_ci# define T_IXFR 251 /* ns_t_ixfr */ 4861cb0ef41Sopenharmony_ci#endif 4871cb0ef41Sopenharmony_ci#ifndef T_AXFR 4881cb0ef41Sopenharmony_ci# define T_AXFR 252 /* ns_t_axfr */ 4891cb0ef41Sopenharmony_ci#endif 4901cb0ef41Sopenharmony_ci#ifndef T_MAILB 4911cb0ef41Sopenharmony_ci# define T_MAILB 253 /* ns_t_mailb */ 4921cb0ef41Sopenharmony_ci#endif 4931cb0ef41Sopenharmony_ci#ifndef T_MAILA 4941cb0ef41Sopenharmony_ci# define T_MAILA 254 /* ns_t_maila */ 4951cb0ef41Sopenharmony_ci#endif 4961cb0ef41Sopenharmony_ci#ifndef T_ANY 4971cb0ef41Sopenharmony_ci# define T_ANY 255 /* ns_t_any */ 4981cb0ef41Sopenharmony_ci#endif 4991cb0ef41Sopenharmony_ci#ifndef T_URI 5001cb0ef41Sopenharmony_ci# define T_URI 256 /* ns_t_uri */ 5011cb0ef41Sopenharmony_ci#endif 5021cb0ef41Sopenharmony_ci#ifndef T_CAA 5031cb0ef41Sopenharmony_ci# define T_CAA 257 /* ns_t_caa */ 5041cb0ef41Sopenharmony_ci#endif 5051cb0ef41Sopenharmony_ci#ifndef T_MAX 5061cb0ef41Sopenharmony_ci# define T_MAX 65536 /* ns_t_max */ 5071cb0ef41Sopenharmony_ci#endif 5081cb0ef41Sopenharmony_ci 5091cb0ef41Sopenharmony_ci 5101cb0ef41Sopenharmony_ci#endif /* ARES_NAMESER_H */ 511