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