-
Notifications
You must be signed in to change notification settings - Fork 2
/
const.go
194 lines (173 loc) · 7.62 KB
/
const.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
package getdns
// #include <getdns/getdns_extra.h>
import "C"
// Result codes.returned by getdns.
type ReturnCode int
const (
RETURN_GOOD ReturnCode = C.GETDNS_RETURN_GOOD
RETURN_GENERIC_ERROR = C.GETDNS_RETURN_GENERIC_ERROR
RETURN_BAD_DOMAIN_NAME = C.GETDNS_RETURN_BAD_DOMAIN_NAME
RETURN_BAD_CONTEXT = C.GETDNS_RETURN_BAD_CONTEXT
RETURN_UPDATE_FAIL = C.GETDNS_RETURN_CONTEXT_UPDATE_FAIL
RETURN_UNKNOWN_TRANSACTION = C.GETDNS_RETURN_UNKNOWN_TRANSACTION
RETURN_NO_SUCH_LIST_ITEM = C.GETDNS_RETURN_NO_SUCH_LIST_ITEM
RETURN_NO_SUCH_DICT_NAME = C.GETDNS_RETURN_NO_SUCH_DICT_NAME
RETURN_WRONG_TYPE_REQUESTED = C.GETDNS_RETURN_WRONG_TYPE_REQUESTED
RETURN_NO_SUCH_EXTENSION = C.GETDNS_RETURN_NO_SUCH_EXTENSION
RETURN_EXTENSION_MISFORMAT = C.GETDNS_RETURN_EXTENSION_MISFORMAT
RETURN_DNSSEC_WITH_STUB_DISALLOWED = C.GETDNS_RETURN_DNSSEC_WITH_STUB_DISALLOWED
RETURN_MEMORY_ERROR = C.GETDNS_RETURN_MEMORY_ERROR
RETURN_INVALID_PARAMETER = C.GETDNS_RETURN_INVALID_PARAMETER
RETURN_NOT_IMPLEMENTED = C.GETDNS_RETURN_NOT_IMPLEMENTED
)
// Response status codes set by getdns.
const (
RESPSTATUS_GOOD = C.GETDNS_RESPSTATUS_GOOD
RESPSTATUS_NO_NAME = C.GETDNS_RESPSTATUS_NO_NAME
RESPSTATUS_ALL_TIMEOUT = C.GETDNS_RESPSTATUS_ALL_TIMEOUT
RESPSTATUS_NO_SECURE_ANSWERS = C.GETDNS_RESPSTATUS_NO_SECURE_ANSWERS
RESPSTATUS_NO_ALL_BOGUS_ANSWERS = C.GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS
)
// Response anwer types.
type Nametype int
const (
NAMETYPE_DNS Nametype = C.GETDNS_NAMETYPE_DNS
NAMETYPE_WINS = C.GETDNS_NAMETYPE_WINS
)
// Extension request values.
const (
EXTENSION_TRUE = C.GETDNS_EXTENSION_TRUE
EXTENSION_FALSE = C.GETDNS_EXTENSION_FALSE
)
// Extension response values.
const (
BAD_DNS_CNAME_IN_TARGET = C.GETDNS_BAD_DNS_CNAME_IN_TARGET
BAD_DNS_ALL_NUMERIC_LABEL = C.GETDNS_BAD_DNS_ALL_NUMERIC_LABEL
BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE = C.GETDNS_BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE
)
// RR Types
const (
RRTYPE_A = C.GETDNS_RRTYPE_A
RRTYPE_NS = C.GETDNS_RRTYPE_NS
RRTYPE_MD = C.GETDNS_RRTYPE_MD
RRTYPE_MF = C.GETDNS_RRTYPE_MF
RRTYPE_CNAME = C.GETDNS_RRTYPE_CNAME
RRTYPE_SOA = C.GETDNS_RRTYPE_SOA
RRTYPE_MB = C.GETDNS_RRTYPE_MB
RRTYPE_MG = C.GETDNS_RRTYPE_MG
RRTYPE_MR = C.GETDNS_RRTYPE_MR
RRTYPE_NULL = C.GETDNS_RRTYPE_NULL
RRTYPE_WKS = C.GETDNS_RRTYPE_WKS
RRTYPE_PTR = C.GETDNS_RRTYPE_PTR
RRTYPE_HINFO = C.GETDNS_RRTYPE_HINFO
RRTYPE_MINFO = C.GETDNS_RRTYPE_MINFO
RRTYPE_MX = C.GETDNS_RRTYPE_MX
RRTYPE_TXT = C.GETDNS_RRTYPE_TXT
RRTYPE_RP = C.GETDNS_RRTYPE_RP
RRTYPE_AFSDB = C.GETDNS_RRTYPE_AFSDB
RRTYPE_X25 = C.GETDNS_RRTYPE_X25
RRTYPE_ISDN = C.GETDNS_RRTYPE_ISDN
RRTYPE_RT = C.GETDNS_RRTYPE_RT
RRTYPE_NSAP = C.GETDNS_RRTYPE_NSAP
RRTYPE_SIG = C.GETDNS_RRTYPE_SIG
RRTYPE_KEY = C.GETDNS_RRTYPE_KEY
RRTYPE_PX = C.GETDNS_RRTYPE_PX
RRTYPE_GPOS = C.GETDNS_RRTYPE_GPOS
RRTYPE_AAAA = C.GETDNS_RRTYPE_AAAA
RRTYPE_LOC = C.GETDNS_RRTYPE_LOC
RRTYPE_NXT = C.GETDNS_RRTYPE_NXT
RRTYPE_EID = C.GETDNS_RRTYPE_EID
RRTYPE_NIMLOC = C.GETDNS_RRTYPE_NIMLOC
RRTYPE_SRV = C.GETDNS_RRTYPE_SRV
RRTYPE_ATMA = C.GETDNS_RRTYPE_ATMA
RRTYPE_NAPTR = C.GETDNS_RRTYPE_NAPTR
RRTYPE_KX = C.GETDNS_RRTYPE_KX
RRTYPE_CERT = C.GETDNS_RRTYPE_CERT
RRTYPE_A6 = C.GETDNS_RRTYPE_A6
RRTYPE_DNAME = C.GETDNS_RRTYPE_DNAME
RRTYPE_SINK = C.GETDNS_RRTYPE_SINK
RRTYPE_OPT = C.GETDNS_RRTYPE_OPT
RRTYPE_APL = C.GETDNS_RRTYPE_APL
RRTYPE_DS = C.GETDNS_RRTYPE_DS
RRTYPE_SSHFP = C.GETDNS_RRTYPE_SSHFP
RRTYPE_IPSECKEY = C.GETDNS_RRTYPE_IPSECKEY
RRTYPE_RRSIG = C.GETDNS_RRTYPE_RRSIG
RRTYPE_NSEC = C.GETDNS_RRTYPE_NSEC
RRTYPE_DNSKEY = C.GETDNS_RRTYPE_DNSKEY
RRTYPE_DHCID = C.GETDNS_RRTYPE_DHCID
RRTYPE_NSEC3 = C.GETDNS_RRTYPE_NSEC3
RRTYPE_NSEC3PARAM = C.GETDNS_RRTYPE_NSEC3PARAM
RRTYPE_TLSA = C.GETDNS_RRTYPE_TLSA
RRTYPE_HIP = C.GETDNS_RRTYPE_HIP
RRTYPE_NINFO = C.GETDNS_RRTYPE_NINFO
RRTYPE_RKEY = C.GETDNS_RRTYPE_RKEY
RRTYPE_TALINK = C.GETDNS_RRTYPE_TALINK
RRTYPE_CDS = C.GETDNS_RRTYPE_CDS
RRTYPE_CDNSKEY = C.GETDNS_RRTYPE_CDNSKEY
RRTYPE_OPENPGPKEY = C.GETDNS_RRTYPE_OPENPGPKEY
RRTYPE_CSYNC = C.GETDNS_RRTYPE_CSYNC
RRTYPE_SPF = C.GETDNS_RRTYPE_SPF
RRTYPE_UINFO = C.GETDNS_RRTYPE_UINFO
RRTYPE_UID = C.GETDNS_RRTYPE_UID
RRTYPE_GID = C.GETDNS_RRTYPE_GID
RRTYPE_UNSPEC = C.GETDNS_RRTYPE_UNSPEC
RRTYPE_NID = C.GETDNS_RRTYPE_NID
RRTYPE_L32 = C.GETDNS_RRTYPE_L32
RRTYPE_L64 = C.GETDNS_RRTYPE_L64
RRTYPE_LP = C.GETDNS_RRTYPE_LP
RRTYPE_EUI48 = C.GETDNS_RRTYPE_EUI48
RRTYPE_EUI64 = C.GETDNS_RRTYPE_EUI64
RRTYPE_TKEY = C.GETDNS_RRTYPE_TKEY
RRTYPE_TSIG = C.GETDNS_RRTYPE_TSIG
RRTYPE_IXFR = C.GETDNS_RRTYPE_IXFR
RRTYPE_AXFR = C.GETDNS_RRTYPE_AXFR
RRTYPE_MAILB = C.GETDNS_RRTYPE_MAILB
RRTYPE_MAILA = C.GETDNS_RRTYPE_MAILA
RRTYPE_ANY = C.GETDNS_RRTYPE_ANY
RRTYPE_URI = C.GETDNS_RRTYPE_URI
RRTYPE_CAA = C.GETDNS_RRTYPE_CAA
RRTYPE_TA = C.GETDNS_RRTYPE_TA
RRTYPE_DLV = C.GETDNS_RRTYPE_DLV
)
// Context append name options.
type AppendName int
const (
APPEND_NAME_ALWAYS AppendName = C.GETDNS_APPEND_NAME_ALWAYS
APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE = C.GETDNS_APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE
APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE = C.GETDNS_APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE
APPEND_NAME_NEVER = C.GETDNS_APPEND_NAME_NEVER
)
// Context transport list options.
type Transport int
const (
TRANSPORT_UDP Transport = C.GETDNS_TRANSPORT_UDP
TRANSPORT_TCP = C.GETDNS_TRANSPORT_TCP
TRANSPORT_TLS = C.GETDNS_TRANSPORT_TLS
)
// Context redirects follow options.
type Redirects int
const (
REDIRECTS_FOLLOW Redirects = C.GETDNS_REDIRECTS_FOLLOW
REDIRECTS_DO_NOT_FOLLOW = C.GETDNS_REDIRECTS_DO_NOT_FOLLOW
)
// Context namespace types.
type Namespace int
const (
NAMESPACE_DNS Namespace = C.GETDNS_NAMESPACE_DNS
NAMESPACE_LOCALNAMES = C.GETDNS_NAMESPACE_LOCALNAMES
NAMESPACE_NETBIOS = C.GETDNS_NAMESPACE_NETBIOS
NAMESPACE_MDNS = C.GETDNS_NAMESPACE_MDNS
NAMESPACE_NIS = C.GETDNS_NAMESPACE_NIS
)
// Context resolution types.
type Resolution int
const (
RESOLUTION_STUB Resolution = C.GETDNS_RESOLUTION_STUB
RESOLUTION_RECURSING = C.GETDNS_RESOLUTION_RECURSING
)
// Context authentication options when using TLS.
type TLSAuthentication int
const (
AUTHENTICATION_NONE TLSAuthentication = C.GETDNS_AUTHENTICATION_NONE
AUTHENTICATION_REQUIRED = C.GETDNS_AUTHENTICATION_REQUIRED
)