ddraw/tests: Add readback tests to test_palette_gdi.
[wine.git] / include / windns.h
blobf150919b42374ab716df7eca8e37b79c000c7bbd
1 /*
2 * DNS support
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.
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.
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
21 #ifndef __WINE_WINDNS_H
22 #define __WINE_WINDNS_H
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 #define DNS_TYPE_ZERO 0x0000
29 #define DNS_TYPE_A 0x0001
30 #define DNS_TYPE_NS 0x0002
31 #define DNS_TYPE_MD 0x0003
32 #define DNS_TYPE_MF 0x0004
33 #define DNS_TYPE_CNAME 0x0005
34 #define DNS_TYPE_SOA 0x0006
35 #define DNS_TYPE_MB 0x0007
36 #define DNS_TYPE_MG 0x0008
37 #define DNS_TYPE_MR 0x0009
38 #define DNS_TYPE_NULL 0x000a
39 #define DNS_TYPE_WKS 0x000b
40 #define DNS_TYPE_PTR 0x000c
41 #define DNS_TYPE_HINFO 0x000d
42 #define DNS_TYPE_MINFO 0x000e
43 #define DNS_TYPE_MX 0x000f
44 #define DNS_TYPE_TEXT 0x0010
45 #define DNS_TYPE_RP 0x0011
46 #define DNS_TYPE_AFSDB 0x0012
47 #define DNS_TYPE_X25 0x0013
48 #define DNS_TYPE_ISDN 0x0014
49 #define DNS_TYPE_RT 0x0015
50 #define DNS_TYPE_NSAP 0x0016
51 #define DNS_TYPE_NSAPPTR 0x0017
52 #define DNS_TYPE_SIG 0x0018
53 #define DNS_TYPE_KEY 0x0019
54 #define DNS_TYPE_PX 0x001a
55 #define DNS_TYPE_GPOS 0x001b
56 #define DNS_TYPE_AAAA 0x001c
57 #define DNS_TYPE_LOC 0x001d
58 #define DNS_TYPE_NXT 0x001e
59 #define DNS_TYPE_EID 0x001f
60 #define DNS_TYPE_NIMLOC 0x0020
61 #define DNS_TYPE_SRV 0x0021
62 #define DNS_TYPE_ATMA 0x0022
63 #define DNS_TYPE_NAPTR 0x0023
64 #define DNS_TYPE_KX 0x0024
65 #define DNS_TYPE_CERT 0x0025
66 #define DNS_TYPE_A6 0x0026
67 #define DNS_TYPE_DNAME 0x0027
68 #define DNS_TYPE_SINK 0x0028
69 #define DNS_TYPE_OPT 0x0029
70 #define DNS_TYPE_UINFO 0x0064
71 #define DNS_TYPE_UID 0x0065
72 #define DNS_TYPE_GID 0x0066
73 #define DNS_TYPE_UNSPEC 0x0067
74 #define DNS_TYPE_ADDRS 0x00f8
75 #define DNS_TYPE_TKEY 0x00f9
76 #define DNS_TYPE_TSIG 0x00fa
77 #define DNS_TYPE_IXFR 0x00fb
78 #define DNS_TYPE_AXFR 0x00fc
79 #define DNS_TYPE_MAILB 0x00fd
80 #define DNS_TYPE_MAILA 0x00fe
81 #define DNS_TYPE_ALL 0x00ff
82 #define DNS_TYPE_ANY 0x00ff
84 #define DNS_TYPE_WINS 0xff01
85 #define DNS_TYPE_WINSR 0xff02
86 #define DNS_TYPE_NBSTAT (DNS_TYPE_WINSR)
88 #define DNS_QUERY_STANDARD 0x00000000
89 #define DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE 0x00000001
90 #define DNS_QUERY_USE_TCP_ONLY 0x00000002
91 #define DNS_QUERY_NO_RECURSION 0x00000004
92 #define DNS_QUERY_BYPASS_CACHE 0x00000008
93 #define DNS_QUERY_NO_WIRE_QUERY 0x00000010
94 #define DNS_QUERY_NO_LOCAL_NAME 0x00000020
95 #define DNS_QUERY_NO_HOSTS_FILE 0x00000040
96 #define DNS_QUERY_NO_NETBT 0x00000080
97 #define DNS_QUERY_WIRE_ONLY 0x00000100
98 #define DNS_QUERY_RETURN_MESSAGE 0x00000200
99 #define DNS_QUERY_MULTICAST_ONLY 0x00000400
100 #define DNS_QUERY_NO_MULTICAST 0x00000800
101 #define DNS_QUERY_TREAT_AS_FQDN 0x00001000
102 #define DNS_QUERY_ADDRCONFIG 0x00002000
103 #define DNS_QUERY_DUAL_ADDR 0x00004000
104 #define DNS_QUERY_DONT_RESET_TTL_VALUES 0x00100000
105 #define DNS_QUERY_DISABLE_IDN_ENCODING 0x00200000
106 #define DNS_QUERY_APPEND_MULTILABEL 0x00800000
107 #define DNS_QUERY_DNSSEC_OK 0x01000000
108 #define DNS_QUERY_DNSSEC_CHECKING_DISABLED 0x02000000
109 #define DNS_QUERY_RESERVED 0xff000000
111 typedef enum _DNS_NAME_FORMAT
113 DnsNameDomain,
114 DnsNameDomainLabel,
115 DnsNameHostnameFull,
116 DnsNameHostnameLabel,
117 DnsNameWildcard,
118 DnsNameSrvRecord
119 } DNS_NAME_FORMAT;
121 typedef enum _DNS_FREE_TYPE
123 DnsFreeFlat,
124 DnsFreeRecordList,
125 DnsFreeParsedMessageFields
126 } DNS_FREE_TYPE;
128 typedef enum _DNS_CHARSET
130 DnsCharSetUnknown,
131 DnsCharSetUnicode,
132 DnsCharSetUtf8,
133 DnsCharSetAnsi
134 } DNS_CHARSET;
136 typedef enum _DNS_CONFIG_TYPE
138 DnsConfigPrimaryDomainName_W,
139 DnsConfigPrimaryDomainName_A,
140 DnsConfigPrimaryDomainName_UTF8,
141 DnsConfigAdapterDomainName_W,
142 DnsConfigAdapterDomainName_A,
143 DnsConfigAdapterDomainName_UTF8,
144 DnsConfigDnsServerList,
145 DnsConfigSearchList,
146 DnsConfigAdapterInfo,
147 DnsConfigPrimaryHostNameRegistrationEnabled,
148 DnsConfigAdapterHostNameRegistrationEnabled,
149 DnsConfigAddressRegistrationMaxCount,
150 DnsConfigHostName_W,
151 DnsConfigHostName_A,
152 DnsConfigHostName_UTF8,
153 DnsConfigFullHostName_W,
154 DnsConfigFullHostName_A,
155 DnsConfigFullHostName_UTF8
156 } DNS_CONFIG_TYPE;
158 typedef enum _DnsSection
160 DnsSectionQuestion,
161 DnsSectionAnswer,
162 DnsSectionAuthority,
163 DnsSectionAddtional /* Not a typo, as per Microsoft's headers */
164 } DNS_SECTION;
166 typedef LONG DNS_STATUS, *PDNS_STATUS;
167 typedef DWORD IP4_ADDRESS, *PIP4_ADDRESS;
169 typedef struct
171 DWORD IP6Dword[4];
172 } IP6_ADDRESS, *PIP6_ADDRESS, DNS_IP6_ADDRESS, *PDNS_IP6_ADDRESS;
174 #define SIZEOF_IP4_ADDRESS 4
175 #define IP4_ADDRESS_STRING_LENGTH 16
176 #define IP6_ADDRESS_STRING_LENGTH 65
177 #define DNS_ADDRESS_STRING_LENGTH IP6_ADDRESS_STRING_LENGTH
178 #define IP4_ADDRESS_STRING_BUFFER_LENGTH IP4_ADDRESS_STRING_LENGTH
179 #define IP6_ADDRESS_STRING_BUFFER_LENGTH IP6_ADDRESS_STRING_LENGTH
181 typedef struct _IP4_ARRAY
183 DWORD AddrCount;
184 IP4_ADDRESS AddrArray[1];
185 } IP4_ARRAY, *PIP4_ARRAY;
187 #include <pshpack1.h>
188 typedef struct _DNS_HEADER
190 WORD Xid;
191 BYTE RecursionDesired:1;
192 BYTE Truncation:1;
193 BYTE Authoritative:1;
194 BYTE Opcode:4;
195 BYTE IsResponse:1;
196 BYTE ResponseCode:4;
197 BYTE CheckingDisabled:1;
198 BYTE AuthenticatedData:1;
199 BYTE Reserved:1;
200 BYTE RecursionAvailable:1;
201 WORD QuestionCount;
202 WORD AnswerCount;
203 WORD NameServerCount;
204 WORD AdditionalCount;
205 } DNS_HEADER, *PDNS_HEADER;
206 #include <poppack.h>
208 typedef struct _DNS_MESSAGE_BUFFER
210 DNS_HEADER MessageHead;
211 CHAR MessageBody[1];
212 } DNS_MESSAGE_BUFFER, *PDNS_MESSAGE_BUFFER;
214 typedef struct
216 IP4_ADDRESS IpAddress;
217 } DNS_A_DATA, *PDNS_A_DATA;
219 typedef struct _DnsRecordFlags
221 DWORD Section :2;
222 DWORD Delete :1;
223 DWORD CharSet :2;
224 DWORD Unused :3;
225 DWORD Reserved :24;
226 } DNS_RECORD_FLAGS;
228 typedef struct
230 PSTR pNamePrimaryServer;
231 PSTR pNameAdministrator;
232 DWORD dwSerialNo;
233 DWORD dwRefresh;
234 DWORD dwRetry;
235 DWORD dwExpire;
236 DWORD dwDefaultTtl;
237 } DNS_SOA_DATAA, *PDNS_SOA_DATAA;
239 typedef struct
241 PWSTR pNamePrimaryServer;
242 PWSTR pNameAdministrator;
243 DWORD dwSerialNo;
244 DWORD dwRefresh;
245 DWORD dwRetry;
246 DWORD dwExpire;
247 DWORD dwDefaultTtl;
248 } DNS_SOA_DATAW, *PDNS_SOA_DATAW;
250 DECL_WINELIB_TYPE_AW(DNS_SOA_DATA)
251 DECL_WINELIB_TYPE_AW(PDNS_SOA_DATA)
253 typedef struct
255 PSTR pNameHost;
256 } DNS_PTR_DATAA, *PDNS_PTR_DATAA;
258 typedef struct
260 PWSTR pNameHost;
261 } DNS_PTR_DATAW, *PDNS_PTR_DATAW;
263 DECL_WINELIB_TYPE_AW(DNS_PTR_DATA)
264 DECL_WINELIB_TYPE_AW(PDNS_PTR_DATA)
266 typedef struct
268 PSTR pNameMailbox;
269 PSTR pNameErrorsMailbox;
270 } DNS_MINFO_DATAA, *PDNS_MINFO_DATAA;
272 typedef struct
274 PWSTR pNameMailbox;
275 PWSTR pNameErrorsMailbox;
276 } DNS_MINFO_DATAW, *PDNS_MINFO_DATAW;
278 DECL_WINELIB_TYPE_AW(DNS_MINFO_DATA)
279 DECL_WINELIB_TYPE_AW(PDNS_MINFO_DATA)
281 typedef struct
283 PSTR pNameExchange;
284 WORD wPreference;
285 WORD Pad;
286 } DNS_MX_DATAA, *PDNS_MX_DATAA;
288 typedef struct
290 PWSTR pNameExchange;
291 WORD wPreference;
292 WORD Pad;
293 } DNS_MX_DATAW, *PDNS_MX_DATAW;
295 DECL_WINELIB_TYPE_AW(DNS_MX_DATA)
296 DECL_WINELIB_TYPE_AW(PDNS_MX_DATA)
298 typedef struct
300 DWORD dwStringCount;
301 PSTR pStringArray[1];
302 } DNS_TXT_DATAA, *PDNS_TXT_DATAA;
304 typedef struct
306 DWORD dwStringCount;
307 PWSTR pStringArray[1];
308 } DNS_TXT_DATAW, *PDNS_TXT_DATAW;
310 DECL_WINELIB_TYPE_AW(DNS_TXT_DATA)
311 DECL_WINELIB_TYPE_AW(PDNS_TXT_DATA)
313 typedef struct
315 DWORD dwByteCount;
316 BYTE Data[1];
317 } DNS_NULL_DATA, *PDNS_NULL_DATA;
319 typedef struct
321 IP4_ADDRESS IpAddress;
322 UCHAR chProtocol;
323 BYTE BitMask[1];
324 } DNS_WKS_DATA, *PDNS_WKS_DATA;
326 typedef struct
328 DNS_IP6_ADDRESS Ip6Address;
329 } DNS_AAAA_DATA, *PDNS_AAAA_DATA;
331 typedef struct
333 WORD wFlags;
334 BYTE chProtocol;
335 BYTE chAlgorithm;
336 BYTE Key[1];
337 } DNS_KEY_DATA, *PDNS_KEY_DATA;
339 typedef struct
341 WORD wVersion;
342 WORD wSize;
343 WORD wHorPrec;
344 WORD wVerPrec;
345 DWORD dwLatitude;
346 DWORD dwLongitude;
347 DWORD dwAltitude;
348 } DNS_LOC_DATA, *PDNS_LOC_DATA;
350 typedef struct
352 PSTR pNameSigner;
353 WORD wTypeCovered;
354 BYTE chAlgorithm;
355 BYTE chLabelCount;
356 DWORD dwOriginalTtl;
357 DWORD dwExpiration;
358 DWORD dwTimeSigned;
359 WORD wKeyTag;
360 WORD Pad;
361 BYTE Signature[1];
362 } DNS_SIG_DATAA, *PDNS_SIG_DATAA;
364 typedef struct
366 PWSTR pNameSigner;
367 WORD wTypeCovered;
368 BYTE chAlgorithm;
369 BYTE chLabelCount;
370 DWORD dwOriginalTtl;
371 DWORD dwExpiration;
372 DWORD dwTimeSigned;
373 WORD wKeyTag;
374 WORD Pad;
375 BYTE Signature[1];
376 } DNS_SIG_DATAW, *PDNS_SIG_DATAW;
378 DECL_WINELIB_TYPE_AW(DNS_SIG_DATA)
379 DECL_WINELIB_TYPE_AW(PDNS_SIG_DATA)
381 #define DNS_ATMA_MAX_ADDR_LENGTH 20
383 typedef struct
385 BYTE AddressType;
386 BYTE Address[DNS_ATMA_MAX_ADDR_LENGTH];
387 } DNS_ATMA_DATA, *PDNS_ATMA_DATA;
389 typedef struct
391 PSTR pNameNext;
392 WORD wNumTypes;
393 WORD wTypes[1];
394 } DNS_NXT_DATAA, *PDNS_NXT_DATAA;
396 typedef struct
398 PWSTR pNameNext;
399 WORD wNumTypes;
400 WORD wTypes[1];
401 } DNS_NXT_DATAW, *PDNS_NXT_DATAW;
403 DECL_WINELIB_TYPE_AW(DNS_NXT_DATA)
404 DECL_WINELIB_TYPE_AW(PDNS_NXT_DATA)
406 typedef struct
408 PSTR pNameTarget;
409 WORD wPriority;
410 WORD wWeight;
411 WORD wPort;
412 WORD Pad;
413 } DNS_SRV_DATAA, *PDNS_SRV_DATAA;
415 typedef struct
417 PWSTR pNameTarget;
418 WORD wPriority;
419 WORD wWeight;
420 WORD wPort;
421 WORD Pad;
422 } DNS_SRV_DATAW, *PDNS_SRV_DATAW;
424 DECL_WINELIB_TYPE_AW(DNS_SRV_DATA)
425 DECL_WINELIB_TYPE_AW(PDNS_SRV_DATA)
427 typedef struct
429 PSTR pNameAlgorithm;
430 PBYTE pAlgorithmPacket;
431 PBYTE pKey;
432 PBYTE pOtherData;
433 DWORD dwCreateTime;
434 DWORD dwExpireTime;
435 WORD wMode;
436 WORD wError;
437 WORD wKeyLength;
438 WORD wOtherLength;
439 UCHAR cAlgNameLength;
440 BOOL bPacketPointers;
441 } DNS_TKEY_DATAA, *PDNS_TKEY_DATAA;
443 typedef struct
445 PWSTR pNameAlgorithm;
446 PBYTE pAlgorithmPacket;
447 PBYTE pKey;
448 PBYTE pOtherData;
449 DWORD dwCreateTime;
450 DWORD dwExpireTime;
451 WORD wMode;
452 WORD wError;
453 WORD wKeyLength;
454 WORD wOtherLength;
455 UCHAR cAlgNameLength;
456 BOOL bPacketPointers;
457 } DNS_TKEY_DATAW, *PDNS_TKEY_DATAW;
459 DECL_WINELIB_TYPE_AW(DNS_TKEY_DATA)
460 DECL_WINELIB_TYPE_AW(PDNS_TKEY_DATA)
462 typedef struct
464 PSTR pNameAlgorithm;
465 PBYTE pAlgorithmPacket;
466 PBYTE pSignature;
467 PBYTE pOtherData;
468 LONGLONG i64CreateTime;
469 WORD wFudgeTime;
470 WORD wOriginalXid;
471 WORD wError;
472 WORD wSigLength;
473 WORD wOtherLength;
474 UCHAR cAlgNameLength;
475 BOOL bPacketPointers;
476 } DNS_TSIG_DATAA, *PDNS_TSIG_DATAA;
478 typedef struct
480 PWSTR pNameAlgorithm;
481 PBYTE pAlgorithmPacket;
482 PBYTE pSignature;
483 PBYTE pOtherData;
484 LONGLONG i64CreateTime;
485 WORD wFudgeTime;
486 WORD wOriginalXid;
487 WORD wError;
488 WORD wSigLength;
489 WORD wOtherLength;
490 UCHAR cAlgNameLength;
491 BOOL bPacketPointers;
492 } DNS_TSIG_DATAW, *PDNS_TSIG_DATAW;
494 typedef struct
496 DWORD dwMappingFlag;
497 DWORD dwLookupTimeout;
498 DWORD dwCacheTimeout;
499 DWORD cWinsServerCount;
500 IP4_ADDRESS WinsServers[1];
501 } DNS_WINS_DATA, *PDNS_WINS_DATA;
503 typedef struct
505 DWORD dwMappingFlag;
506 DWORD dwLookupTimeout;
507 DWORD dwCacheTimeout;
508 PSTR pNameResultDomain;
509 } DNS_WINSR_DATAA, *PDNS_WINSR_DATAA;
511 typedef struct
513 DWORD dwMappingFlag;
514 DWORD dwLookupTimeout;
515 DWORD dwCacheTimeout;
516 PWSTR pNameResultDomain;
517 } DNS_WINSR_DATAW, *PDNS_WINSR_DATAW;
519 DECL_WINELIB_TYPE_AW(DNS_WINSR_DATA)
520 DECL_WINELIB_TYPE_AW(PDNS_WINSR_DATA)
522 typedef struct _DnsRecordA
524 struct _DnsRecordA *pNext;
525 PSTR pName;
526 WORD wType;
527 WORD wDataLength;
528 union
530 DWORD DW;
531 DNS_RECORD_FLAGS S;
532 } Flags;
533 DWORD dwTtl;
534 DWORD dwReserved;
535 union
537 DNS_A_DATA A;
538 DNS_SOA_DATAA SOA, Soa;
539 DNS_PTR_DATAA PTR, Ptr, NS, Ns, CNAME, Cname, MB, Mb, MD, Md, MF, Mf, MG, Mg, MR, Mr;
540 DNS_MINFO_DATAA MINFO, Minfo, RP, Rp;
541 DNS_MX_DATAA MX, Mx, AFSDB, Afsdb, RT, Rt;
542 DNS_TXT_DATAA HINFO, Hinfo, ISDN, Isdn, TXT, Txt, X25;
543 DNS_NULL_DATA Null;
544 DNS_WKS_DATA WKS, Wks;
545 DNS_AAAA_DATA AAAA;
546 DNS_KEY_DATA KEY, Key;
547 DNS_SIG_DATAA SIG, Sig;
548 DNS_ATMA_DATA ATMA, Atma;
549 DNS_NXT_DATAA NXT, Nxt;
550 DNS_SRV_DATAA SRV, Srv;
551 DNS_TKEY_DATAA TKEY, Tkey;
552 DNS_TSIG_DATAA TSIG, Tsig;
553 DNS_WINS_DATA WINS, Wins;
554 DNS_WINSR_DATAA WINSR, WinsR, NBSTAT, Nbstat;
555 } Data;
556 } DNS_RECORDA, *PDNS_RECORDA;
558 typedef struct _DnsRecordW
560 struct _DnsRecordW *pNext;
561 PWSTR pName;
562 WORD wType;
563 WORD wDataLength;
564 union
566 DWORD DW;
567 DNS_RECORD_FLAGS S;
568 } Flags;
569 DWORD dwTtl;
570 DWORD dwReserved;
571 union
573 DNS_A_DATA A;
574 DNS_SOA_DATAW SOA, Soa;
575 DNS_PTR_DATAW PTR, Ptr, NS, Ns, CNAME, Cname, MB, Mb, MD, Md, MF, Mf, MG, Mg, MR, Mr;
576 DNS_MINFO_DATAW MINFO, Minfo, RP, Rp;
577 DNS_MX_DATAW MX, Mx, AFSDB, Afsdb, RT, Rt;
578 DNS_TXT_DATAW HINFO, Hinfo, ISDN, Isdn, TXT, Txt, X25;
579 DNS_NULL_DATA Null;
580 DNS_WKS_DATA WKS, Wks;
581 DNS_AAAA_DATA AAAA;
582 DNS_KEY_DATA KEY, Key;
583 DNS_SIG_DATAW SIG, Sig;
584 DNS_ATMA_DATA ATMA, Atma;
585 DNS_NXT_DATAW NXT, Nxt;
586 DNS_SRV_DATAW SRV, Srv;
587 DNS_TKEY_DATAW TKEY, Tkey;
588 DNS_TSIG_DATAW TSIG, Tsig;
589 DNS_WINS_DATA WINS, Wins;
590 DNS_WINSR_DATAW WINSR, WinsR, NBSTAT, Nbstat;
591 } Data;
592 } DNS_RECORDW, *PDNS_RECORDW;
594 #if defined(__WINESRC__) || defined(UNICODE)
595 typedef DNS_RECORDW DNS_RECORD;
596 typedef PDNS_RECORDW PDNS_RECORD;
597 #else
598 typedef DNS_RECORDA DNS_RECORD;
599 typedef PDNS_RECORDA PDNS_RECORD;
600 #endif
602 typedef struct _DnsRRSet
604 PDNS_RECORD pFirstRR;
605 PDNS_RECORD pLastRR;
606 } DNS_RRSET, *PDNS_RRSET;
608 #define DNS_RRSET_INIT( rrset ) \
610 PDNS_RRSET _prrset = &(rrset); \
611 _prrset->pFirstRR = NULL; \
612 _prrset->pLastRR = (PDNS_RECORD) &_prrset->pFirstRR; \
615 #define DNS_RRSET_ADD( rrset, pnewRR ) \
617 PDNS_RRSET _prrset = &(rrset); \
618 PDNS_RECORD _prrnew = (pnewRR); \
619 _prrset->pLastRR->pNext = _prrnew; \
620 _prrset->pLastRR = _prrnew; \
623 #define DNS_RRSET_TERMINATE( rrset ) \
625 PDNS_RRSET _prrset = &(rrset); \
626 _prrset->pLastRR->pNext = NULL; \
629 #define DNS_ADDR_MAX_SOCKADDR_LENGTH 32
631 #include <pshpack1.h>
633 typedef struct _DnsAddr
635 char MaxSa[DNS_ADDR_MAX_SOCKADDR_LENGTH];
636 union {
637 DWORD DnsAddrUserDword[8];
638 } Data;
639 } DNS_ADDR, *PDNS_ADDR;
641 typedef struct _DnsAddrArray
643 DWORD MaxCount;
644 DWORD AddrCount;
645 DWORD Tag;
646 WORD Family;
647 WORD WordReserved;
648 DWORD Flags;
649 DWORD MatchFlag;
650 DWORD Reserved1;
651 DWORD Reserved2;
652 DNS_ADDR AddrArray[1];
653 } DNS_ADDR_ARRAY, *PDNS_ADDR_ARRAY;
655 #include <poppack.h>
657 #define DNS_QUERY_RESULTS_VERSION1 0x1
659 typedef struct _DNS_QUERY_RESULT
661 ULONG Version;
662 DNS_STATUS QueryStatus;
663 ULONG64 QueryOptions;
664 DNS_RECORD *pQueryRecords;
665 void *Reserved;
666 } DNS_QUERY_RESULT, *PDNS_QUERY_RESULT;
668 typedef void WINAPI DNS_QUERY_COMPLETION_ROUTINE(void*,DNS_QUERY_RESULT*);
669 typedef DNS_QUERY_COMPLETION_ROUTINE *PDNS_QUERY_COMPLETION_ROUTINE;
671 #define DNS_QUERY_REQUEST_VERSION1 0x1
673 typedef struct _DNS_QUERY_REQUEST
675 ULONG Version;
676 const WCHAR *QueryName;
677 WORD QueryType;
678 ULONG64 QueryOptions;
679 PDNS_ADDR_ARRAY pDnsServerList;
680 ULONG InterfaceIndex;
681 PDNS_QUERY_COMPLETION_ROUTINE pQueryCompletionCallback;
682 void *pQueryContext;
683 } DNS_QUERY_REQUEST, *PDNS_QUERY_REQUEST;
685 typedef struct _DNS_QUERY_CANCEL
687 char Reserved[32];
688 } DNS_QUERY_CANCEL, *PDNS_QUERY_CANCEL;
690 DNS_STATUS WINAPI DnsAcquireContextHandle_A(DWORD,PVOID,PHANDLE);
691 DNS_STATUS WINAPI DnsAcquireContextHandle_W(DWORD,PVOID,PHANDLE);
692 #define DnsAcquireContextHandle WINELIB_NAME_AW(DnsAcquireContextHandle_)
693 DNS_STATUS WINAPI DnsExtractRecordsFromMessage_W(PDNS_MESSAGE_BUFFER,WORD,PDNS_RECORDW*);
694 DNS_STATUS WINAPI DnsExtractRecordsFromMessage_UTF8(PDNS_MESSAGE_BUFFER,WORD,PDNS_RECORDA*);
695 VOID WINAPI DnsFree(PVOID,DNS_FREE_TYPE);
696 DNS_STATUS WINAPI DnsModifyRecordsInSet_A(PDNS_RECORDA,PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID);
697 DNS_STATUS WINAPI DnsModifyRecordsInSet_W(PDNS_RECORDW,PDNS_RECORDW,DWORD,HANDLE,PVOID,PVOID);
698 DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8(PDNS_RECORDA,PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID);
699 #define DnsModifyRecordsInSet WINELIB_NAME_AW(DnsModifyRecordsInSet_)
700 BOOL WINAPI DnsNameCompare_A(PCSTR,PCSTR);
701 BOOL WINAPI DnsNameCompare_W(PCWSTR,PCWSTR);
702 #define DnsNameCompare WINELIB_NAME_AW(DnsNameCompare_)
703 DNS_STATUS WINAPI DnsQuery_A(PCSTR,WORD,DWORD,PVOID,PDNS_RECORDA*,PVOID*);
704 DNS_STATUS WINAPI DnsQuery_W(PCWSTR,WORD,DWORD,PVOID,PDNS_RECORDW*,PVOID*);
705 DNS_STATUS WINAPI DnsQuery_UTF8(PCSTR,WORD,DWORD,PVOID,PDNS_RECORDA*,PVOID*);
706 #define DnsQuery WINELIB_NAME_AW(DnsQuery_)
707 DNS_STATUS WINAPI DnsQueryEx(DNS_QUERY_REQUEST*,DNS_QUERY_RESULT*,DNS_QUERY_CANCEL*);
708 DNS_STATUS WINAPI DnsCancelQuery(DNS_QUERY_CANCEL*);
709 DNS_STATUS WINAPI DnsQueryConfig(DNS_CONFIG_TYPE,DWORD,PCWSTR,PVOID,PVOID,PDWORD);
710 BOOL WINAPI DnsRecordCompare(PDNS_RECORD,PDNS_RECORD);
711 PDNS_RECORD WINAPI DnsRecordCopyEx(PDNS_RECORD,DNS_CHARSET,DNS_CHARSET);
712 VOID WINAPI DnsRecordListFree(PDNS_RECORD,DNS_FREE_TYPE);
713 BOOL WINAPI DnsRecordSetCompare(PDNS_RECORD,PDNS_RECORD,PDNS_RECORD*,PDNS_RECORD*);
714 PDNS_RECORD WINAPI DnsRecordSetCopyEx(PDNS_RECORD,DNS_CHARSET,DNS_CHARSET);
715 PDNS_RECORD WINAPI DnsRecordSetDetach(PDNS_RECORD);
716 void WINAPI DnsReleaseContextHandle(HANDLE);
717 DNS_STATUS WINAPI DnsReplaceRecordSetA(PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID);
718 DNS_STATUS WINAPI DnsReplaceRecordSetW(PDNS_RECORDW,DWORD,HANDLE,PVOID,PVOID);
719 DNS_STATUS WINAPI DnsReplaceRecordSetUTF8(PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID);
720 #define DnsReplaceRecordSet WINELIB_NAME_AW(DnsReplaceRecordSet)
721 DNS_STATUS WINAPI DnsValidateName_A(PCSTR,DNS_NAME_FORMAT);
722 DNS_STATUS WINAPI DnsValidateName_W(PCWSTR, DNS_NAME_FORMAT);
723 DNS_STATUS WINAPI DnsValidateName_UTF8(PCSTR,DNS_NAME_FORMAT);
724 #define DnsValidateName WINELIB_NAME_AW(DnsValidateName_)
725 BOOL WINAPI DnsWriteQuestionToBuffer_W(PDNS_MESSAGE_BUFFER,PDWORD,PCWSTR,WORD,WORD,BOOL);
726 BOOL WINAPI DnsWriteQuestionToBuffer_UTF8(PDNS_MESSAGE_BUFFER,PDWORD,PCSTR,WORD,WORD,BOOL);
728 #ifdef __cplusplus
730 #endif
732 #endif