1 | /*
|
---|
2 | * DNS support
|
---|
3 | *
|
---|
4 | * Copyright (C) 2006 Matthew Kehrer
|
---|
5 | *
|
---|
6 | * This library is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the GNU Lesser General Public
|
---|
8 | * License as published by the Free Software Foundation; either
|
---|
9 | * version 2.1 of the License, or (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This library is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
14 | * Lesser General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU Lesser General Public
|
---|
17 | * License along with this library; if not, write to the Free Software
|
---|
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
19 | */
|
---|
20 |
|
---|
21 | /*
|
---|
22 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
23 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
24 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
25 | * a choice of LGPL license versions is made available with the language indicating
|
---|
26 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
27 | * of the LGPL is applied is otherwise unspecified.
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef __WINE_WINDNS_H
|
---|
31 | #define __WINE_WINDNS_H
|
---|
32 |
|
---|
33 | #ifdef __cplusplus
|
---|
34 | extern "C" {
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | #define DNS_TYPE_ZERO 0x0000
|
---|
38 | #define DNS_TYPE_A 0x0001
|
---|
39 | #define DNS_TYPE_NS 0x0002
|
---|
40 | #define DNS_TYPE_MD 0x0003
|
---|
41 | #define DNS_TYPE_MF 0x0004
|
---|
42 | #define DNS_TYPE_CNAME 0x0005
|
---|
43 | #define DNS_TYPE_SOA 0x0006
|
---|
44 | #define DNS_TYPE_MB 0x0007
|
---|
45 | #define DNS_TYPE_MG 0x0008
|
---|
46 | #define DNS_TYPE_MR 0x0009
|
---|
47 | #define DNS_TYPE_NULL 0x000a
|
---|
48 | #define DNS_TYPE_WKS 0x000b
|
---|
49 | #define DNS_TYPE_PTR 0x000c
|
---|
50 | #define DNS_TYPE_HINFO 0x000d
|
---|
51 | #define DNS_TYPE_MINFO 0x000e
|
---|
52 | #define DNS_TYPE_MX 0x000f
|
---|
53 | #define DNS_TYPE_TEXT 0x0010
|
---|
54 | #define DNS_TYPE_RP 0x0011
|
---|
55 | #define DNS_TYPE_AFSDB 0x0012
|
---|
56 | #define DNS_TYPE_X25 0x0013
|
---|
57 | #define DNS_TYPE_ISDN 0x0014
|
---|
58 | #define DNS_TYPE_RT 0x0015
|
---|
59 | #define DNS_TYPE_NSAP 0x0016
|
---|
60 | #define DNS_TYPE_NSAPPTR 0x0017
|
---|
61 | #define DNS_TYPE_SIG 0x0018
|
---|
62 | #define DNS_TYPE_KEY 0x0019
|
---|
63 | #define DNS_TYPE_PX 0x001a
|
---|
64 | #define DNS_TYPE_GPOS 0x001b
|
---|
65 | #define DNS_TYPE_AAAA 0x001c
|
---|
66 | #define DNS_TYPE_LOC 0x001d
|
---|
67 | #define DNS_TYPE_NXT 0x001e
|
---|
68 | #define DNS_TYPE_EID 0x001f
|
---|
69 | #define DNS_TYPE_NIMLOC 0x0020
|
---|
70 | #define DNS_TYPE_SRV 0x0021
|
---|
71 | #define DNS_TYPE_ATMA 0x0022
|
---|
72 | #define DNS_TYPE_NAPTR 0x0023
|
---|
73 | #define DNS_TYPE_KX 0x0024
|
---|
74 | #define DNS_TYPE_CERT 0x0025
|
---|
75 | #define DNS_TYPE_A6 0x0026
|
---|
76 | #define DNS_TYPE_DNAME 0x0027
|
---|
77 | #define DNS_TYPE_SINK 0x0028
|
---|
78 | #define DNS_TYPE_OPT 0x0029
|
---|
79 | #define DNS_TYPE_UINFO 0x0064
|
---|
80 | #define DNS_TYPE_UID 0x0065
|
---|
81 | #define DNS_TYPE_GID 0x0066
|
---|
82 | #define DNS_TYPE_UNSPEC 0x0067
|
---|
83 | #define DNS_TYPE_ADDRS 0x00f8
|
---|
84 | #define DNS_TYPE_TKEY 0x00f9
|
---|
85 | #define DNS_TYPE_TSIG 0x00fa
|
---|
86 | #define DNS_TYPE_IXFR 0x00fb
|
---|
87 | #define DNS_TYPE_AXFR 0x00fc
|
---|
88 | #define DNS_TYPE_MAILB 0x00fd
|
---|
89 | #define DNS_TYPE_MAILA 0x00fe
|
---|
90 | #define DNS_TYPE_ALL 0x00ff
|
---|
91 | #define DNS_TYPE_ANY 0x00ff
|
---|
92 |
|
---|
93 | #define DNS_TYPE_WINS 0xff01
|
---|
94 | #define DNS_TYPE_WINSR 0xff02
|
---|
95 | #define DNS_TYPE_NBSTAT (DNS_TYPE_WINSR)
|
---|
96 |
|
---|
97 | #define DNS_QUERY_STANDARD 0x00000000
|
---|
98 | #define DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE 0x00000001
|
---|
99 | #define DNS_QUERY_USE_TCP_ONLY 0x00000002
|
---|
100 | #define DNS_QUERY_NO_RECURSION 0x00000004
|
---|
101 | #define DNS_QUERY_BYPASS_CACHE 0x00000008
|
---|
102 | #define DNS_QUERY_NO_WIRE_QUERY 0x00000010
|
---|
103 | #define DNS_QUERY_NO_LOCAL_NAME 0x00000020
|
---|
104 | #define DNS_QUERY_NO_HOSTS_FILE 0x00000040
|
---|
105 | #define DNS_QUERY_NO_NETBT 0x00000080
|
---|
106 | #define DNS_QUERY_WIRE_ONLY 0x00000100
|
---|
107 | #define DNS_QUERY_RETURN_MESSAGE 0x00000200
|
---|
108 | #define DNS_QUERY_TREAT_AS_FQDN 0x00001000
|
---|
109 | #define DNS_QUERY_DONT_RESET_TTL_VALUES 0x00100000
|
---|
110 | #define DNS_QUERY_RESERVED 0xff000000
|
---|
111 |
|
---|
112 | typedef enum _DNS_NAME_FORMAT
|
---|
113 | {
|
---|
114 | DnsNameDomain,
|
---|
115 | DnsNameDomainLabel,
|
---|
116 | DnsNameHostnameFull,
|
---|
117 | DnsNameHostnameLabel,
|
---|
118 | DnsNameWildcard,
|
---|
119 | DnsNameSrvRecord
|
---|
120 | } DNS_NAME_FORMAT;
|
---|
121 |
|
---|
122 | typedef enum _DNS_FREE_TYPE
|
---|
123 | {
|
---|
124 | DnsFreeFlat,
|
---|
125 | DnsFreeRecordList,
|
---|
126 | DnsFreeParsedMessageFields
|
---|
127 | } DNS_FREE_TYPE;
|
---|
128 |
|
---|
129 | typedef enum _DNS_CHARSET
|
---|
130 | {
|
---|
131 | DnsCharSetUnknown,
|
---|
132 | DnsCharSetUnicode,
|
---|
133 | DnsCharSetUtf8,
|
---|
134 | DnsCharSetAnsi
|
---|
135 | } DNS_CHARSET;
|
---|
136 |
|
---|
137 | typedef enum _DNS_CONFIG_TYPE
|
---|
138 | {
|
---|
139 | DnsConfigPrimaryDomainName_W,
|
---|
140 | DnsConfigPrimaryDomainName_A,
|
---|
141 | DnsConfigPrimaryDomainName_UTF8,
|
---|
142 | DnsConfigAdapterDomainName_W,
|
---|
143 | DnsConfigAdapterDomainName_A,
|
---|
144 | DnsConfigAdapterDomainName_UTF8,
|
---|
145 | DnsConfigDnsServerList,
|
---|
146 | DnsConfigSearchList,
|
---|
147 | DnsConfigAdapterInfo,
|
---|
148 | DnsConfigPrimaryHostNameRegistrationEnabled,
|
---|
149 | DnsConfigAdapterHostNameRegistrationEnabled,
|
---|
150 | DnsConfigAddressRegistrationMaxCount,
|
---|
151 | DnsConfigHostName_W,
|
---|
152 | DnsConfigHostName_A,
|
---|
153 | DnsConfigHostName_UTF8,
|
---|
154 | DnsConfigFullHostName_W,
|
---|
155 | DnsConfigFullHostName_A,
|
---|
156 | DnsConfigFullHostName_UTF8
|
---|
157 | } DNS_CONFIG_TYPE;
|
---|
158 |
|
---|
159 | typedef enum _DnsSection
|
---|
160 | {
|
---|
161 | DnsSectionQuestion,
|
---|
162 | DnsSectionAnswer,
|
---|
163 | DnsSectionAuthority,
|
---|
164 | DnsSectionAddtional /* Not a typo, as per Microsoft's headers */
|
---|
165 | } DNS_SECTION;
|
---|
166 |
|
---|
167 | typedef LONG DNS_STATUS, *PDNS_STATUS;
|
---|
168 | typedef DWORD IP4_ADDRESS, *PIP4_ADDRESS;
|
---|
169 |
|
---|
170 | typedef struct
|
---|
171 | {
|
---|
172 | DWORD IP6Dword[4];
|
---|
173 | } IP6_ADDRESS, *PIP6_ADDRESS, DNS_IP6_ADDRESS, *PDNS_IP6_ADDRESS;
|
---|
174 |
|
---|
175 | #define SIZEOF_IP4_ADDRESS 4
|
---|
176 | #define IP4_ADDRESS_STRING_LENGTH 16
|
---|
177 | #define IP6_ADDRESS_STRING_LENGTH 65
|
---|
178 | #define DNS_ADDRESS_STRING_LENGTH IP6_ADDRESS_STRING_LENGTH
|
---|
179 | #define IP4_ADDRESS_STRING_BUFFER_LENGTH IP4_ADDRESS_STRING_LENGTH
|
---|
180 | #define IP6_ADDRESS_STRING_BUFFER_LENGTH IP6_ADDRESS_STRING_LENGTH
|
---|
181 |
|
---|
182 | typedef struct _IP4_ARRAY
|
---|
183 | {
|
---|
184 | DWORD AddrCount;
|
---|
185 | IP4_ADDRESS AddrArray[1];
|
---|
186 | } IP4_ARRAY, *PIP4_ARRAY;
|
---|
187 |
|
---|
188 | typedef struct _DNS_HEADER
|
---|
189 | {
|
---|
190 | WORD Xid;
|
---|
191 | BYTE RecursionDesired;
|
---|
192 | BYTE Truncation;
|
---|
193 | BYTE Authoritative;
|
---|
194 | BYTE Opcode;
|
---|
195 | BYTE IsResponse;
|
---|
196 | BYTE ResponseCode;
|
---|
197 | BYTE Reserved;
|
---|
198 | BYTE RecursionAvailable;
|
---|
199 | WORD QuestionCount;
|
---|
200 | WORD AnswerCount;
|
---|
201 | WORD NameServerCount;
|
---|
202 | WORD AdditionalCount;
|
---|
203 | } DNS_HEADER, *PDNS_HEADER;
|
---|
204 |
|
---|
205 | typedef struct _DNS_MESSAGE_BUFFER
|
---|
206 | {
|
---|
207 | DNS_HEADER MessageHead;
|
---|
208 | CHAR MessageBody[1];
|
---|
209 | } DNS_MESSAGE_BUFFER, *PDNS_MESSAGE_BUFFER;
|
---|
210 |
|
---|
211 | typedef struct
|
---|
212 | {
|
---|
213 | IP4_ADDRESS IpAddress;
|
---|
214 | } DNS_A_DATA, *PDNS_A_DATA;
|
---|
215 |
|
---|
216 | typedef struct _DnsRecordFlags
|
---|
217 | {
|
---|
218 | DWORD Section :2;
|
---|
219 | DWORD Delete :1;
|
---|
220 | DWORD CharSet :2;
|
---|
221 | DWORD Unused :3;
|
---|
222 | DWORD Reserved :24;
|
---|
223 | } DNS_RECORD_FLAGS;
|
---|
224 |
|
---|
225 | typedef struct
|
---|
226 | {
|
---|
227 | PSTR pNamePrimaryServer;
|
---|
228 | PSTR pNameAdministrator;
|
---|
229 | DWORD dwSerialNo;
|
---|
230 | DWORD dwRefresh;
|
---|
231 | DWORD dwRetry;
|
---|
232 | DWORD dwExpire;
|
---|
233 | DWORD dwDefaultTtl;
|
---|
234 | } DNS_SOA_DATAA, *PDNS_SOA_DATAA;
|
---|
235 |
|
---|
236 | typedef struct
|
---|
237 | {
|
---|
238 | PWSTR pNamePrimaryServer;
|
---|
239 | PWSTR pNameAdministrator;
|
---|
240 | DWORD dwSerialNo;
|
---|
241 | DWORD dwRefresh;
|
---|
242 | DWORD dwRetry;
|
---|
243 | DWORD dwExpire;
|
---|
244 | DWORD dwDefaultTtl;
|
---|
245 | } DNS_SOA_DATAW, *PDNS_SOA_DATAW;
|
---|
246 |
|
---|
247 | DECL_WINELIB_TYPE_AW(DNS_SOA_DATA)
|
---|
248 | DECL_WINELIB_TYPE_AW(PDNS_SOA_DATA)
|
---|
249 |
|
---|
250 | typedef struct
|
---|
251 | {
|
---|
252 | PSTR pNameHost;
|
---|
253 | } DNS_PTR_DATAA, *PDNS_PTR_DATAA;
|
---|
254 |
|
---|
255 | typedef struct
|
---|
256 | {
|
---|
257 | PWSTR pNameHost;
|
---|
258 | } DNS_PTR_DATAW, *PDNS_PTR_DATAW;
|
---|
259 |
|
---|
260 | DECL_WINELIB_TYPE_AW(DNS_PTR_DATA)
|
---|
261 | DECL_WINELIB_TYPE_AW(PDNS_PTR_DATA)
|
---|
262 |
|
---|
263 | typedef struct
|
---|
264 | {
|
---|
265 | PSTR pNameMailbox;
|
---|
266 | PSTR pNameErrorsMailbox;
|
---|
267 | } DNS_MINFO_DATAA, *PDNS_MINFO_DATAA;
|
---|
268 |
|
---|
269 | typedef struct
|
---|
270 | {
|
---|
271 | PWSTR pNameMailbox;
|
---|
272 | PWSTR pNameErrorsMailbox;
|
---|
273 | } DNS_MINFO_DATAW, *PDNS_MINFO_DATAW;
|
---|
274 |
|
---|
275 | DECL_WINELIB_TYPE_AW(DNS_MINFO_DATA)
|
---|
276 | DECL_WINELIB_TYPE_AW(PDNS_MINFO_DATA)
|
---|
277 |
|
---|
278 | typedef struct
|
---|
279 | {
|
---|
280 | PSTR pNameExchange;
|
---|
281 | WORD wPreference;
|
---|
282 | WORD Pad;
|
---|
283 | } DNS_MX_DATAA, *PDNS_MX_DATAA;
|
---|
284 |
|
---|
285 | typedef struct
|
---|
286 | {
|
---|
287 | PWSTR pNameExchange;
|
---|
288 | WORD wPreference;
|
---|
289 | WORD Pad;
|
---|
290 | } DNS_MX_DATAW, *PDNS_MX_DATAW;
|
---|
291 |
|
---|
292 | DECL_WINELIB_TYPE_AW(DNS_MX_DATA)
|
---|
293 | DECL_WINELIB_TYPE_AW(PDNS_MX_DATA)
|
---|
294 |
|
---|
295 | typedef struct
|
---|
296 | {
|
---|
297 | DWORD dwStringCount;
|
---|
298 | PSTR pStringArray[1];
|
---|
299 | } DNS_TXT_DATAA, *PDNS_TXT_DATAA;
|
---|
300 |
|
---|
301 | typedef struct
|
---|
302 | {
|
---|
303 | DWORD dwStringCount;
|
---|
304 | PWSTR pStringArray[1];
|
---|
305 | } DNS_TXT_DATAW, *PDNS_TXT_DATAW;
|
---|
306 |
|
---|
307 | DECL_WINELIB_TYPE_AW(DNS_TXT_DATA)
|
---|
308 | DECL_WINELIB_TYPE_AW(PDNS_TXT_DATA)
|
---|
309 |
|
---|
310 | typedef struct
|
---|
311 | {
|
---|
312 | DWORD dwByteCount;
|
---|
313 | BYTE Data[1];
|
---|
314 | } DNS_NULL_DATA, *PDNS_NULL_DATA;
|
---|
315 |
|
---|
316 | typedef struct
|
---|
317 | {
|
---|
318 | IP4_ADDRESS IpAddress;
|
---|
319 | UCHAR chProtocol;
|
---|
320 | BYTE BitMask[1];
|
---|
321 | } DNS_WKS_DATA, *PDNS_WKS_DATA;
|
---|
322 |
|
---|
323 | typedef struct
|
---|
324 | {
|
---|
325 | DNS_IP6_ADDRESS Ip6Address;
|
---|
326 | } DNS_AAAA_DATA, *PDNS_AAAA_DATA;
|
---|
327 |
|
---|
328 | typedef struct
|
---|
329 | {
|
---|
330 | WORD wFlags;
|
---|
331 | BYTE chProtocol;
|
---|
332 | BYTE chAlgorithm;
|
---|
333 | BYTE Key[1];
|
---|
334 | } DNS_KEY_DATA, *PDNS_KEY_DATA;
|
---|
335 |
|
---|
336 | typedef struct
|
---|
337 | {
|
---|
338 | WORD wVersion;
|
---|
339 | WORD wSize;
|
---|
340 | WORD wHorPrec;
|
---|
341 | WORD wVerPrec;
|
---|
342 | DWORD dwLatitude;
|
---|
343 | DWORD dwLongitude;
|
---|
344 | DWORD dwAltitude;
|
---|
345 | } DNS_LOC_DATA, *PDNS_LOC_DATA;
|
---|
346 |
|
---|
347 | typedef struct
|
---|
348 | {
|
---|
349 | PSTR pNameSigner;
|
---|
350 | WORD wTypeCovered;
|
---|
351 | BYTE chAlgorithm;
|
---|
352 | BYTE chLabelCount;
|
---|
353 | DWORD dwOriginalTtl;
|
---|
354 | DWORD dwExpiration;
|
---|
355 | DWORD dwTimeSigned;
|
---|
356 | WORD wKeyTag;
|
---|
357 | WORD Pad;
|
---|
358 | BYTE Signature[1];
|
---|
359 | } DNS_SIG_DATAA, *PDNS_SIG_DATAA;
|
---|
360 |
|
---|
361 | typedef struct
|
---|
362 | {
|
---|
363 | PWSTR pNameSigner;
|
---|
364 | WORD wTypeCovered;
|
---|
365 | BYTE chAlgorithm;
|
---|
366 | BYTE chLabelCount;
|
---|
367 | DWORD dwOriginalTtl;
|
---|
368 | DWORD dwExpiration;
|
---|
369 | DWORD dwTimeSigned;
|
---|
370 | WORD wKeyTag;
|
---|
371 | WORD Pad;
|
---|
372 | BYTE Signature[1];
|
---|
373 | } DNS_SIG_DATAW, *PDNS_SIG_DATAW;
|
---|
374 |
|
---|
375 | DECL_WINELIB_TYPE_AW(DNS_SIG_DATA)
|
---|
376 | DECL_WINELIB_TYPE_AW(PDNS_SIG_DATA)
|
---|
377 |
|
---|
378 | #define DNS_ATMA_MAX_ADDR_LENGTH 20
|
---|
379 |
|
---|
380 | typedef struct
|
---|
381 | {
|
---|
382 | BYTE AddressType;
|
---|
383 | BYTE Address[DNS_ATMA_MAX_ADDR_LENGTH];
|
---|
384 | } DNS_ATMA_DATA, *PDNS_ATMA_DATA;
|
---|
385 |
|
---|
386 | typedef struct
|
---|
387 | {
|
---|
388 | PSTR pNameNext;
|
---|
389 | WORD wNumTypes;
|
---|
390 | WORD wTypes[1];
|
---|
391 | } DNS_NXT_DATAA, *PDNS_NXT_DATAA;
|
---|
392 |
|
---|
393 | typedef struct
|
---|
394 | {
|
---|
395 | PWSTR pNameNext;
|
---|
396 | WORD wNumTypes;
|
---|
397 | WORD wTypes[1];
|
---|
398 | } DNS_NXT_DATAW, *PDNS_NXT_DATAW;
|
---|
399 |
|
---|
400 | DECL_WINELIB_TYPE_AW(DNS_NXT_DATA)
|
---|
401 | DECL_WINELIB_TYPE_AW(PDNS_NXT_DATA)
|
---|
402 |
|
---|
403 | typedef struct
|
---|
404 | {
|
---|
405 | PSTR pNameTarget;
|
---|
406 | WORD wPriority;
|
---|
407 | WORD wWeight;
|
---|
408 | WORD wPort;
|
---|
409 | WORD Pad;
|
---|
410 | } DNS_SRV_DATAA, *PDNS_SRV_DATAA;
|
---|
411 |
|
---|
412 | typedef struct
|
---|
413 | {
|
---|
414 | PWSTR pNameTarget;
|
---|
415 | WORD wPriority;
|
---|
416 | WORD wWeight;
|
---|
417 | WORD wPort;
|
---|
418 | WORD Pad;
|
---|
419 | } DNS_SRV_DATAW, *PDNS_SRV_DATAW;
|
---|
420 |
|
---|
421 | DECL_WINELIB_TYPE_AW(DNS_SRV_DATA)
|
---|
422 | DECL_WINELIB_TYPE_AW(PDNS_SRV_DATA)
|
---|
423 |
|
---|
424 | typedef struct
|
---|
425 | {
|
---|
426 | PSTR pNameAlgorithm;
|
---|
427 | PBYTE pAlgorithmPacket;
|
---|
428 | PBYTE pKey;
|
---|
429 | PBYTE pOtherData;
|
---|
430 | DWORD dwCreateTime;
|
---|
431 | DWORD dwExpireTime;
|
---|
432 | WORD wMode;
|
---|
433 | WORD wError;
|
---|
434 | WORD wKeyLength;
|
---|
435 | WORD wOtherLength;
|
---|
436 | UCHAR cAlgNameLength;
|
---|
437 | BOOL bPacketPointers;
|
---|
438 | } DNS_TKEY_DATAA, *PDNS_TKEY_DATAA;
|
---|
439 |
|
---|
440 | typedef struct
|
---|
441 | {
|
---|
442 | PWSTR pNameAlgorithm;
|
---|
443 | PBYTE pAlgorithmPacket;
|
---|
444 | PBYTE pKey;
|
---|
445 | PBYTE pOtherData;
|
---|
446 | DWORD dwCreateTime;
|
---|
447 | DWORD dwExpireTime;
|
---|
448 | WORD wMode;
|
---|
449 | WORD wError;
|
---|
450 | WORD wKeyLength;
|
---|
451 | WORD wOtherLength;
|
---|
452 | UCHAR cAlgNameLength;
|
---|
453 | BOOL bPacketPointers;
|
---|
454 | } DNS_TKEY_DATAW, *PDNS_TKEY_DATAW;
|
---|
455 |
|
---|
456 | DECL_WINELIB_TYPE_AW(DNS_TKEY_DATA)
|
---|
457 | DECL_WINELIB_TYPE_AW(PDNS_TKEY_DATA)
|
---|
458 |
|
---|
459 | typedef struct
|
---|
460 | {
|
---|
461 | PSTR pNameAlgorithm;
|
---|
462 | PBYTE pAlgorithmPacket;
|
---|
463 | PBYTE pSignature;
|
---|
464 | PBYTE pOtherData;
|
---|
465 | LONGLONG i64CreateTime;
|
---|
466 | WORD wFudgeTime;
|
---|
467 | WORD wOriginalXid;
|
---|
468 | WORD wError;
|
---|
469 | WORD wSigLength;
|
---|
470 | WORD wOtherLength;
|
---|
471 | UCHAR cAlgNameLength;
|
---|
472 | BOOL bPacketPointers;
|
---|
473 | } DNS_TSIG_DATAA, *PDNS_TSIG_DATAA;
|
---|
474 |
|
---|
475 | typedef struct
|
---|
476 | {
|
---|
477 | PWSTR pNameAlgorithm;
|
---|
478 | PBYTE pAlgorithmPacket;
|
---|
479 | PBYTE pSignature;
|
---|
480 | PBYTE pOtherData;
|
---|
481 | LONGLONG i64CreateTime;
|
---|
482 | WORD wFudgeTime;
|
---|
483 | WORD wOriginalXid;
|
---|
484 | WORD wError;
|
---|
485 | WORD wSigLength;
|
---|
486 | WORD wOtherLength;
|
---|
487 | UCHAR cAlgNameLength;
|
---|
488 | BOOL bPacketPointers;
|
---|
489 | } DNS_TSIG_DATAW, *PDNS_TSIG_DATAW;
|
---|
490 |
|
---|
491 | typedef struct
|
---|
492 | {
|
---|
493 | DWORD dwMappingFlag;
|
---|
494 | DWORD dwLookupTimeout;
|
---|
495 | DWORD dwCacheTimeout;
|
---|
496 | DWORD cWinsServerCount;
|
---|
497 | IP4_ADDRESS WinsServers[1];
|
---|
498 | } DNS_WINS_DATA, *PDNS_WINS_DATA;
|
---|
499 |
|
---|
500 | typedef struct
|
---|
501 | {
|
---|
502 | DWORD dwMappingFlag;
|
---|
503 | DWORD dwLookupTimeout;
|
---|
504 | DWORD dwCacheTimeout;
|
---|
505 | PSTR pNameResultDomain;
|
---|
506 | } DNS_WINSR_DATAA, *PDNS_WINSR_DATAA;
|
---|
507 |
|
---|
508 | typedef struct
|
---|
509 | {
|
---|
510 | DWORD dwMappingFlag;
|
---|
511 | DWORD dwLookupTimeout;
|
---|
512 | DWORD dwCacheTimeout;
|
---|
513 | PWSTR pNameResultDomain;
|
---|
514 | } DNS_WINSR_DATAW, *PDNS_WINSR_DATAW;
|
---|
515 |
|
---|
516 | DECL_WINELIB_TYPE_AW(DNS_WINSR_DATA)
|
---|
517 | DECL_WINELIB_TYPE_AW(PDNS_WINSR_DATA)
|
---|
518 |
|
---|
519 | typedef struct _DnsRecordA
|
---|
520 | {
|
---|
521 | struct _DnsRecordA *pNext;
|
---|
522 | PSTR pName;
|
---|
523 | WORD wType;
|
---|
524 | WORD wDataLength;
|
---|
525 | union
|
---|
526 | {
|
---|
527 | DWORD DW;
|
---|
528 | DNS_RECORD_FLAGS S;
|
---|
529 | } Flags;
|
---|
530 | DWORD dwTtl;
|
---|
531 | DWORD dwReserved;
|
---|
532 | union
|
---|
533 | {
|
---|
534 | DNS_A_DATA A;
|
---|
535 | DNS_SOA_DATAA SOA, Soa;
|
---|
536 | DNS_PTR_DATAA PTR, Ptr, NS, Ns, CNAME, Cname, MB, Mb, MD, Md, MF, Mf, MG, Mg, MR, Mr;
|
---|
537 | DNS_MINFO_DATAA MINFO, Minfo, RP, Rp;
|
---|
538 | DNS_MX_DATAA MX, Mx, AFSDB, Afsdb, RT, Rt;
|
---|
539 | DNS_TXT_DATAA HINFO, Hinfo, ISDN, Isdn, TXT, Txt, X25;
|
---|
540 | DNS_NULL_DATA Null;
|
---|
541 | DNS_WKS_DATA WKS, Wks;
|
---|
542 | DNS_AAAA_DATA AAAA;
|
---|
543 | DNS_KEY_DATA KEY, Key;
|
---|
544 | DNS_SIG_DATAA SIG, Sig;
|
---|
545 | DNS_ATMA_DATA ATMA, Atma;
|
---|
546 | DNS_NXT_DATAA NXT, Nxt;
|
---|
547 | DNS_SRV_DATAA SRV, Srv;
|
---|
548 | DNS_TKEY_DATAA TKEY, Tkey;
|
---|
549 | DNS_TSIG_DATAA TSIG, Tsig;
|
---|
550 | DNS_WINS_DATA WINS, Wins;
|
---|
551 | DNS_WINSR_DATAA WINSR, WinsR, NBSTAT, Nbstat;
|
---|
552 | } Data;
|
---|
553 | } DNS_RECORDA, *PDNS_RECORDA;
|
---|
554 |
|
---|
555 | typedef struct _DnsRecordW
|
---|
556 | {
|
---|
557 | struct _DnsRecordW *pNext;
|
---|
558 | PWSTR pName;
|
---|
559 | WORD wType;
|
---|
560 | WORD wDataLength;
|
---|
561 | union
|
---|
562 | {
|
---|
563 | DWORD DW;
|
---|
564 | DNS_RECORD_FLAGS S;
|
---|
565 | } Flags;
|
---|
566 | DWORD dwTtl;
|
---|
567 | DWORD dwReserved;
|
---|
568 | union
|
---|
569 | {
|
---|
570 | DNS_A_DATA A;
|
---|
571 | DNS_SOA_DATAW SOA, Soa;
|
---|
572 | DNS_PTR_DATAW PTR, Ptr, NS, Ns, CNAME, Cname, MB, Mb, MD, Md, MF, Mf, MG, Mg, MR, Mr;
|
---|
573 | DNS_MINFO_DATAW MINFO, Minfo, RP, Rp;
|
---|
574 | DNS_MX_DATAW MX, Mx, AFSDB, Afsdb, RT, Rt;
|
---|
575 | DNS_TXT_DATAW HINFO, Hinfo, ISDN, Isdn, TXT, Txt, X25;
|
---|
576 | DNS_NULL_DATA Null;
|
---|
577 | DNS_WKS_DATA WKS, Wks;
|
---|
578 | DNS_AAAA_DATA AAAA;
|
---|
579 | DNS_KEY_DATA KEY, Key;
|
---|
580 | DNS_SIG_DATAW SIG, Sig;
|
---|
581 | DNS_ATMA_DATA ATMA, Atma;
|
---|
582 | DNS_NXT_DATAW NXT, Nxt;
|
---|
583 | DNS_SRV_DATAW SRV, Srv;
|
---|
584 | DNS_TKEY_DATAW TKEY, Tkey;
|
---|
585 | DNS_TSIG_DATAW TSIG, Tsig;
|
---|
586 | DNS_WINS_DATA WINS, Wins;
|
---|
587 | DNS_WINSR_DATAW WINSR, WinsR, NBSTAT, Nbstat;
|
---|
588 | } Data;
|
---|
589 | } DNS_RECORDW, *PDNS_RECORDW;
|
---|
590 |
|
---|
591 | #if defined(__WINESRC__) || defined(UNICODE)
|
---|
592 | typedef DNS_RECORDW DNS_RECORD;
|
---|
593 | typedef PDNS_RECORDW PDNS_RECORD;
|
---|
594 | #else
|
---|
595 | typedef DNS_RECORDA DNS_RECORD;
|
---|
596 | typedef PDNS_RECORDA PDNS_RECORD;
|
---|
597 | #endif
|
---|
598 |
|
---|
599 | typedef struct _DnsRRSet
|
---|
600 | {
|
---|
601 | PDNS_RECORD pFirstRR;
|
---|
602 | PDNS_RECORD pLastRR;
|
---|
603 | } DNS_RRSET, *PDNS_RRSET;
|
---|
604 |
|
---|
605 | #define DNS_RRSET_INIT( rrset ) \
|
---|
606 | { \
|
---|
607 | PDNS_RRSET _prrset = &(rrset); \
|
---|
608 | _prrset->pFirstRR = NULL; \
|
---|
609 | _prrset->pLastRR = (PDNS_RECORD) &_prrset->pFirstRR; \
|
---|
610 | }
|
---|
611 |
|
---|
612 | #define DNS_RRSET_ADD( rrset, pnewRR ) \
|
---|
613 | { \
|
---|
614 | PDNS_RRSET _prrset = &(rrset); \
|
---|
615 | PDNS_RECORD _prrnew = (pnewRR); \
|
---|
616 | _prrset->pLastRR->pNext = _prrnew; \
|
---|
617 | _prrset->pLastRR = _prrnew; \
|
---|
618 | }
|
---|
619 |
|
---|
620 | #define DNS_RRSET_TERMINATE( rrset ) \
|
---|
621 | { \
|
---|
622 | PDNS_RRSET _prrset = &(rrset); \
|
---|
623 | _prrset->pLastRR->pNext = NULL; \
|
---|
624 | }
|
---|
625 |
|
---|
626 | DNS_STATUS WINAPI DnsAcquireContextHandle_A(DWORD,PVOID,PHANDLE);
|
---|
627 | DNS_STATUS WINAPI DnsAcquireContextHandle_W(DWORD,PVOID,PHANDLE);
|
---|
628 | #define DnsAcquireContextHandle WINELIB_NAME_AW(DnsAcquireContextHandle_)
|
---|
629 | DNS_STATUS WINAPI DnsExtractRecordsFromMessage_W(PDNS_MESSAGE_BUFFER,WORD,PDNS_RECORDW*);
|
---|
630 | DNS_STATUS WINAPI DnsExtractRecordsFromMessage_UTF8(PDNS_MESSAGE_BUFFER,WORD,PDNS_RECORDA*);
|
---|
631 | DNS_STATUS WINAPI DnsModifyRecordsInSet_A(PDNS_RECORDA,PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID);
|
---|
632 | DNS_STATUS WINAPI DnsModifyRecordsInSet_W(PDNS_RECORDW,PDNS_RECORDW,DWORD,HANDLE,PVOID,PVOID);
|
---|
633 | DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8(PDNS_RECORDA,PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID);
|
---|
634 | #define DnsModifyRecordsInSet WINELIB_NAME_AW(DnsModifyRecordsInSet_)
|
---|
635 | BOOL WINAPI DnsNameCompare_A(PCSTR,PCSTR);
|
---|
636 | BOOL WINAPI DnsNameCompare_W(PCWSTR,PCWSTR);
|
---|
637 | #define DnsNameCompare WINELIB_NAME_AW(DnsNameCompare_)
|
---|
638 | DNS_STATUS WINAPI DnsQuery_A(PCSTR,WORD,DWORD,PVOID,PDNS_RECORDA*,PVOID*);
|
---|
639 | DNS_STATUS WINAPI DnsQuery_W(PCWSTR,WORD,DWORD,PVOID,PDNS_RECORDW*,PVOID*);
|
---|
640 | DNS_STATUS WINAPI DnsQuery_UTF8(PCSTR,WORD,DWORD,PVOID,PDNS_RECORDA*,PVOID*);
|
---|
641 | #define DnsQuery WINELIB_NAME_AW(DnsQuery_)
|
---|
642 | DNS_STATUS WINAPI DnsQueryConfig(DNS_CONFIG_TYPE,DWORD,PCWSTR,PVOID,PVOID,PDWORD);
|
---|
643 | BOOL WINAPI DnsRecordCompare(PDNS_RECORD,PDNS_RECORD);
|
---|
644 | PDNS_RECORD WINAPI DnsRecordCopyEx(PDNS_RECORD,DNS_CHARSET,DNS_CHARSET);
|
---|
645 | VOID WINAPI DnsRecordListFree(PDNS_RECORD,DNS_FREE_TYPE);
|
---|
646 | BOOL WINAPI DnsRecordSetCompare(PDNS_RECORD,PDNS_RECORD,PDNS_RECORD*,PDNS_RECORD*);
|
---|
647 | PDNS_RECORD WINAPI DnsRecordSetCopyEx(PDNS_RECORD,DNS_CHARSET,DNS_CHARSET);
|
---|
648 | PDNS_RECORD WINAPI DnsRecordSetDetach(PDNS_RECORD);
|
---|
649 | void WINAPI DnsReleaseContextHandle(HANDLE);
|
---|
650 | DNS_STATUS WINAPI DnsReplaceRecordSetA(PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID);
|
---|
651 | DNS_STATUS WINAPI DnsReplaceRecordSetW(PDNS_RECORDW,DWORD,HANDLE,PVOID,PVOID);
|
---|
652 | DNS_STATUS WINAPI DnsReplaceRecordSetUTF8(PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID);
|
---|
653 | #define DnsReplaceRecordSet WINELIB_NAME_AW(DnsReplaceRecordSet)
|
---|
654 | DNS_STATUS WINAPI DnsValidateName_A(PCSTR,DNS_NAME_FORMAT);
|
---|
655 | DNS_STATUS WINAPI DnsValidateName_W(PCWSTR, DNS_NAME_FORMAT);
|
---|
656 | DNS_STATUS WINAPI DnsValidateName_UTF8(PCSTR,DNS_NAME_FORMAT);
|
---|
657 | #define DnsValidateName WINELIB_NAME_AW(DnsValidateName_)
|
---|
658 | BOOL WINAPI DnsWriteQuestionToBuffer_W(PDNS_MESSAGE_BUFFER,PDWORD,PCWSTR,WORD,WORD,BOOL);
|
---|
659 | BOOL WINAPI DnsWriteQuestionToBuffer_UTF8(PDNS_MESSAGE_BUFFER,PDWORD,PCSTR,WORD,WORD,BOOL);
|
---|
660 |
|
---|
661 | #ifdef __cplusplus
|
---|
662 | }
|
---|
663 | #endif
|
---|
664 |
|
---|
665 | #endif
|
---|