forked from MichaCo/DnsClient.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueryType.cs
More file actions
286 lines (245 loc) · 10.3 KB
/
QueryType.cs
File metadata and controls
286 lines (245 loc) · 10.3 KB
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
// Copyright 2024 Michael Conrad.
// Licensed under the Apache License, Version 2.0.
// See LICENSE file for details.
using System;
using DnsClient.Protocol;
namespace DnsClient
{
/*
* RFC 1035 (https://tools.ietf.org/html/rfc1035#section-3.2.3)
* */
/// <summary>
/// The query type field appear in the question part of a query.
/// Query types are a superset of <see cref="ResourceRecordType"/>.
/// </summary>
public enum QueryType
{
/// <summary>
/// Nothing.
/// </summary>
None = 0,
/// <summary>
/// A host address.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035">RFC 1035</seealso>
/// <seealso cref="ARecord"/>
A = ResourceRecordType.A,
/// <summary>
/// An authoritative name server.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.11">RFC 1035</seealso>
/// <seealso cref="NsRecord"/>
NS = ResourceRecordType.NS,
/// <summary>
/// A mail destination (OBSOLETE - use MX).
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035">RFC 1035</seealso>
[Obsolete("Use MX")]
MD = ResourceRecordType.MD,
/// <summary>
/// A mail forwarder (OBSOLETE - use MX).
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035">RFC 1035</seealso>
[Obsolete("Use MX")]
MF = ResourceRecordType.MF,
/// <summary>
/// The canonical name for an alias.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.1">RFC 1035</seealso>
/// <seealso cref="CNameRecord"/>
CNAME = ResourceRecordType.CNAME,
/// <summary>
/// Marks the start of a zone of authority.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.13">RFC 1035</seealso>
/// <seealso cref="SoaRecord"/>
SOA = ResourceRecordType.SOA,
/// <summary>
/// A mailbox domain name (EXPERIMENTAL).
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.3">RFC 1035</seealso>
/// <seealso cref="MbRecord"/>
MB = ResourceRecordType.MB,
/// <summary>
/// A mail group member (EXPERIMENTAL).
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.6">RFC 1035</seealso>
/// <seealso cref="MgRecord"/>
MG = ResourceRecordType.MG,
/// <summary>
/// A mailbox rename domain name (EXPERIMENTAL).
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.8">RFC 1035</seealso>
/// <seealso cref="MrRecord"/>
MR = ResourceRecordType.MR,
/// <summary>
/// A Null resource record (EXPERIMENTAL).
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.8">RFC 1035</seealso>
/// <seealso cref="NullRecord"/>
NULL = ResourceRecordType.NULL,
/// <summary>
/// A well known service description.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc3232">RFC 3232</seealso>
/// <seealso cref="WksRecord"/>
WKS = ResourceRecordType.WKS,
/// <summary>
/// A domain name pointer.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.12">RFC 1035</seealso>
/// <seealso cref="PtrRecord"/>
PTR = ResourceRecordType.PTR,
/// <summary>
/// Host information.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.11">RFC 1035</seealso>
/// <seealso href="https://tools.ietf.org/html/rfc1010">RFC 1010</seealso>
/// <seealso cref="HInfoRecord"/>
HINFO = ResourceRecordType.HINFO,
/// <summary>
/// Mailbox or mail list information.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.11">RFC 1035</seealso>
/// <seealso cref="MInfoRecord"/>
MINFO = ResourceRecordType.MINFO,
/// <summary>
/// Mail exchange.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.9">RFC 1035</seealso>
/// <seealso href="https://tools.ietf.org/html/rfc974">RFC 974</seealso>
/// <seealso cref="MxRecord"/>
MX = ResourceRecordType.MX,
/// <summary>
/// Text resources.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3">RFC 1035</seealso>
/// <seealso href="https://tools.ietf.org/html/rfc1464">RFC 1464</seealso>
/// <seealso cref="TxtRecord"/>
TXT = ResourceRecordType.TXT,
/// <summary>
/// Responsible Person.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1183">RFC 1183</seealso>
/// <seealso cref="RpRecord"/>
RP = ResourceRecordType.RP,
/// <summary>
/// AFS Data Base location.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1183#section-1">RFC 1183</seealso>
/// <seealso href="https://tools.ietf.org/html/rfc5864">RFC 5864</seealso>
/// <seealso cref="AfsDbRecord"/>
AFSDB = ResourceRecordType.AFSDB,
/// <summary>
/// An IPv6 host address.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc3596#section-2.2">RFC 3596</seealso>
/// <seealso cref="AaaaRecord"/>
AAAA = ResourceRecordType.AAAA,
/// <summary>
/// A resource record which specifies the location of the server(s) for a specific protocol and domain.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc2782">RFC 2782</seealso>
/// <seealso cref="SrvRecord"/>
SRV = ResourceRecordType.SRV,
/// <summary>
/// The Naming Authority Pointer rfc2915
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc2915">RFC 2915</seealso>
/// <seealso cref="NAPtrRecord"/>
NAPTR = ResourceRecordType.NAPTR,
/// <summary>
/// Cryptographic public keys are frequently published, and their
/// authenticity is demonstrated by certificates. A CERT resource record
/// (RR) is defined so that such certificates and related certificate
/// revocation lists can be stored in the Domain Name System (DNS).
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc4398">RFC 4398</seealso>
/// <seealso cref="CertRecord"/>
CERT = ResourceRecordType.CERT,
/// <summary>
/// DS rfc4034
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc4034#section-5.1">RFC 4034</seealso>
DS = ResourceRecordType.DS,
/// <summary>
/// RRSIG rfc3755.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc3755">RFC 3755</seealso>
RRSIG = ResourceRecordType.RRSIG,
/// <summary>
/// NSEC rfc4034.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc4034#section-4">RFC 4034</seealso>
NSEC = ResourceRecordType.NSEC,
/// <summary>
/// DNSKEY rfc4034
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc4034#section-2">RFC 4034</seealso>
DNSKEY = ResourceRecordType.DNSKEY,
/// <summary>
/// NSEC3 rfc5155.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc5155">RFC 5155</seealso>
NSEC3 = ResourceRecordType.NSEC3,
/// <summary>
/// NSEC3PARAM rfc5155.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc5155#section-4">RFC 5155</seealso>
NSEC3PARAM = ResourceRecordType.NSEC3PARAM,
/// <summary>
/// TLSA rfc6698
/// </summary>
/// <seealso href="https://https://tools.ietf.org/html/rfc6698">RFC 6698</seealso>
TLSA = ResourceRecordType.TLSA,
/// <summary>
/// TLSA rfc7344.
/// </summary>
/// <seealso href="https://https://tools.ietf.org/html/rfc7344">RFC 7344</seealso>
CDS = ResourceRecordType.CDS,
/// <summary>
/// TLSA rfc7344.
/// </summary>
/// <seealso href="https://https://tools.ietf.org/html/rfc7344">RFC 7344</seealso>
CDNS = ResourceRecordType.CDNS,
/// <summary>
/// SPF records don't officially have a dedicated RR type, <see cref="ResourceRecordType.TXT"/> should be used instead.
/// The behavior of TXT and SPF are the same.
/// </summary>
/// <remarks>
/// This library will return a TXT record but will set the header type to SPF if such a record is returned.
/// </remarks>
/// <seealso href="https://tools.ietf.org/html/rfc7208">RFC 7208</seealso>
SPF = ResourceRecordType.SPF,
/// <summary>
/// DNS zone transfer request.
/// This can be used only if <see cref="DnsQuerySettings.UseTcpOnly"/> is set to true as <c>AXFR</c> is only supported via TCP.
/// <para>
/// The DNS Server might only return results for the request if the client connection/IP is allowed to do so.
/// </para>
/// </summary>
AXFR = 252,
/// <summary>
/// Generic any query *.
/// </summary>
ANY = 255,
/// <summary>
/// A Uniform Resource Identifier (URI) resource record.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc7553">RFC 7553</seealso>
/// <seealso cref="UriRecord"/>
URI = ResourceRecordType.URI,
/// <summary>
/// A certification authority authorization.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc6844">RFC 6844</seealso>
/// <seealso cref="CaaRecord"/>
CAA = ResourceRecordType.CAA,
/// <summary>
/// A SSH Fingerprint resource record.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc4255">RFC 4255</seealso>
/// <seealso cref="SshfpRecord"/>
SSHFP = ResourceRecordType.SSHFP,
}
}