1 // Copyright 2023 The gRPC Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef GRPC_SRC_CORE_LIB_EVENT_ENGINE_NAMESER_H 16 #define GRPC_SRC_CORE_LIB_EVENT_ENGINE_NAMESER_H 17 18 #include <grpc/support/port_platform.h> 19 20 #include "src/core/lib/iomgr/port.h" 21 22 #ifdef GRPC_HAVE_ARPA_NAMESER 23 24 #include <arpa/nameser.h> // IWYU pragma: keep 25 26 #else // GRPC_HAVE_ARPA_NAMESER 27 28 typedef enum __ns_class { 29 ns_c_invalid = 0, // Cookie. 30 ns_c_in = 1, // Internet. 31 ns_c_2 = 2, // unallocated/unsupported. 32 ns_c_chaos = 3, // MIT Chaos-net. 33 ns_c_hs = 4, // MIT Hesiod. 34 // Query class values which do not appear in resource records 35 ns_c_none = 254, // for prereq. sections in update requests 36 ns_c_any = 255, // Wildcard match. 37 ns_c_max = 65536 38 } ns_class; 39 40 typedef enum __ns_type { 41 ns_t_invalid = 0, // Cookie. 42 ns_t_a = 1, // Host address. 43 ns_t_ns = 2, // Authoritative server. 44 ns_t_md = 3, // Mail destination. 45 ns_t_mf = 4, // Mail forwarder. 46 ns_t_cname = 5, // Canonical name. 47 ns_t_soa = 6, // Start of authority zone. 48 ns_t_mb = 7, // Mailbox domain name. 49 ns_t_mg = 8, // Mail group member. 50 ns_t_mr = 9, // Mail rename name. 51 ns_t_null = 10, // Null resource record. 52 ns_t_wks = 11, // Well known service. 53 ns_t_ptr = 12, // Domain name pointer. 54 ns_t_hinfo = 13, // Host information. 55 ns_t_minfo = 14, // Mailbox information. 56 ns_t_mx = 15, // Mail routing information. 57 ns_t_txt = 16, // Text strings. 58 ns_t_rp = 17, // Responsible person. 59 ns_t_afsdb = 18, // AFS cell database. 60 ns_t_x25 = 19, // X_25 calling address. 61 ns_t_isdn = 20, // ISDN calling address. 62 ns_t_rt = 21, // Router. 63 ns_t_nsap = 22, // NSAP address. 64 ns_t_nsap_ptr = 23, // Reverse NSAP lookup (deprecated). 65 ns_t_sig = 24, // Security signature. 66 ns_t_key = 25, // Security key. 67 ns_t_px = 26, // X.400 mail mapping. 68 ns_t_gpos = 27, // Geographical position (withdrawn). 69 ns_t_aaaa = 28, // Ip6 Address. 70 ns_t_loc = 29, // Location Information. 71 ns_t_nxt = 30, // Next domain (security). 72 ns_t_eid = 31, // Endpoint identifier. 73 ns_t_nimloc = 32, // Nimrod Locator. 74 ns_t_srv = 33, // Server Selection. 75 ns_t_atma = 34, // ATM Address 76 ns_t_naptr = 35, // Naming Authority PoinTeR 77 ns_t_kx = 36, // Key Exchange 78 ns_t_cert = 37, // Certification record 79 ns_t_a6 = 38, // IPv6 address (deprecates AAAA) 80 ns_t_dname = 39, // Non-terminal DNAME (for IPv6) 81 ns_t_sink = 40, // Kitchen sink (experimentatl) 82 ns_t_opt = 41, // EDNS0 option (meta-RR) 83 ns_t_apl = 42, // Address prefix list (RFC3123) 84 ns_t_ds = 43, // Delegation Signer (RFC4034) 85 ns_t_sshfp = 44, // SSH Key Fingerprint (RFC4255) 86 ns_t_rrsig = 46, // Resource Record Signature (RFC4034) 87 ns_t_nsec = 47, // Next Secure (RFC4034) 88 ns_t_dnskey = 48, // DNS Public Key (RFC4034) 89 ns_t_tkey = 249, // Transaction key 90 ns_t_tsig = 250, // Transaction signature. 91 ns_t_ixfr = 251, // Incremental zone transfer. 92 ns_t_axfr = 252, // Transfer zone of authority. 93 ns_t_mailb = 253, // Transfer mailbox records. 94 ns_t_maila = 254, // Transfer mail agent records. 95 ns_t_any = 255, // Wildcard match. 96 ns_t_zxfr = 256, // BIND-specific, nonstandard. 97 ns_t_max = 65536 98 } ns_type; 99 100 #endif // GRPC_HAVE_ARPA_NAMESER 101 102 #endif // GRPC_SRC_CORE_LIB_EVENT_ENGINE_NAMESER_H 103