ReactOS 0.4.15-dev-5664-g3bf4ef6
dnslib.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Ancillary Function Driver DLL
4 * FILE: include/mswsock.h
5 * PURPOSE: Ancillary Function Driver DLL header
6 */
7
8#pragma once
9
10/* INCLUDES ******************************************************************/
11#include <ws2atm.h>
12
13/* ENUMERATIONS **************************************************************/
14
15typedef enum _DNS_STRING_TYPE
16{
21
22#define IpV4Address 3
23
24/* TYPES *********************************************************************/
25
26typedef struct _DNS_IPV6_ADDRESS
27{
36
37typedef struct _DNS_ADDRESS
38{
39 union
40 {
41 struct
42 {
46 };
49 };
54
55typedef struct _DNS_ARRAY
56{
62
63typedef struct _DNS_BLOB
64{
72
73typedef struct _DNS_FAMILY_INFO
74{
81
82typedef struct _FLATBUFF
83{
90
91/*
92 * memory.c
93 */
94VOID
97
101
102/*
103 * addr.c
104 */
106WINAPI
108
109/*
110 * dnsaddr.c
111 */
112VOID
113WINAPI
115 IN PDNS_ADDRESS DnsAddress,
118);
119
120VOID
121WINAPI
123 IN PDNS_ADDRESS DnsAddress,
125 IN ULONG ScopeId,
126 IN WORD Port
127);
128
130WINAPI
132
133BOOL
134WINAPI
136 IN PDNS_ARRAY DnsAddrArray,
137 IN PDNS_ADDRESS DnsAddress,
139 IN DWORD AddressType OPTIONAL
140);
141
142VOID
143WINAPI
144DnsAddrArray_Free(IN PDNS_ARRAY DnsAddrArray);
145
146BOOL
147WINAPI
149 IN PDNS_ARRAY DnsAddrArray,
151 IN DWORD AddressType
152);
153
154BOOL
155WINAPI
157 IN PDNS_ARRAY DnsAddrArray,
158 IN PDNS_ADDRESS DnsAddress,
159 IN DWORD AddressType
160);
161
163WINAPI
165 IN PDNS_RECORD DnsRecord,
166 OUT PDNS_ADDRESS DnsAddr
167);
168
169/*
170 * hostent.c
171 */
173WINAPI
175 IN PVOID *Buffer,
177 IN ULONG AddressSize,
178 IN ULONG AddressCount,
179 IN ULONG AliasCount
180);
181
182VOID
183WINAPI
185
186/*
187 * flatbuf.c
188 */
189VOID
190WINAPI
192 IN PFLATBUFF FlatBuffer,
195);
196
197PVOID
198WINAPI
201 IN OUT PSIZE_T FreeSize,
203 IN SIZE_T Size,
205);
206
207PVOID
208WINAPI
211 IN OUT PSIZE_T FreeSize,
212 IN SIZE_T Size,
214);
215
216PVOID
217WINAPI
220 IN OUT PSIZE_T FreeSize,
222 IN BOOLEAN IsUnicode
223);
224
225/*
226 * sablob.c
227 */
229WINAPI
232);
233
235WINAPI
237 IN LPWSTR Name,
238 IN ULONG Count,
239 IN PIN_ADDR AddressArray
240);
241
242VOID
243WINAPI
245
247WINAPI
249 IN OUT PULONG_PTR BufferPosition,
250 IN OUT PSIZE_T RemainingBufferSpace,
251 IN OUT PSIZE_T HostEntrySize,
252 IN PDNS_BLOB Blob,
253 IN DWORD StringType,
254 IN BOOLEAN Relative,
255 IN BOOLEAN BufferAllocated
256);
257
258INT
259WINAPI
261 IN PDNS_BLOB Blob,
263 IN BOOLEAN IsAlias
264);
265
267WINAPI
269 IN LPWSTR Name,
270 IN WORD DnsType,
271 IN ULONG Flags,
274);
275
276/*
277 * string.c
278 */
279ULONG
280WINAPI
283 IN OUT PULONG DestinationSize,
285 IN ULONG StringSize OPTIONAL,
286 IN DWORD InputType,
287 IN DWORD OutputType
288);
289
290LPWSTR
291WINAPI
293
294ULONG
295WINAPI
299 IN DWORD InputType,
300 IN DWORD OutputType
301);
302
303/*
304 * straddr.c
305 */
307WINAPI
310 IN OUT PULONG AddressSize,
311 IN LPWSTR AddressName,
313);
314
315LPWSTR
316WINAPI
320);
321
322LPWSTR
323WINAPI
327);
328
330WINAPI
332 OUT PDNS_ADDRESS DnsAddr,
334);
335
337WINAPI
341);
unsigned char BOOLEAN
Definition: bufpool.h:45
BOOL WINAPI DnsAddrArray_AddIp4(IN PDNS_ARRAY DnsAddrArray, IN IN_ADDR Address, IN DWORD AddressType)
Definition: dnsaddr.c:42
INT WINAPI SaBlob_WriteNameOrAlias(IN PDNS_BLOB Blob, IN LPWSTR String, IN BOOLEAN IsAlias)
Definition: sablob.c:294
BOOLEAN WINAPI Dns_Ip4ReverseNameToAddress_W(OUT PIN_ADDR Address, IN LPWSTR Name)
Definition: straddr.c:136
struct _DNS_ADDRESS * PDNS_ADDRESS
BOOLEAN WINAPI DnsAddr_BuildFromDnsRecord(IN PDNS_RECORD DnsRecord, OUT PDNS_ADDRESS DnsAddr)
Definition: dnsaddr.c:155
BOOLEAN WINAPI Dns_ReverseNameToDnsAddr_W(OUT PDNS_ADDRESS DnsAddr, IN LPWSTR Name)
Definition: straddr.c:452
PDNS_BLOB WINAPI SaBlob_CreateFromIp4(IN LPWSTR Name, IN ULONG Count, IN PIN_ADDR AddressArray)
Definition: sablob.c:61
PVOID WINAPI FlatBuf_Arg_Reserve(IN OUT PULONG_PTR Position, IN OUT PSIZE_T FreeSize, IN SIZE_T Size, IN ULONG Align)
Definition: flatbuf.c:32
ULONG WINAPI Dns_StringCopy(OUT PVOID Destination, IN OUT PULONG DestinationSize, IN PVOID String, IN ULONG StringSize OPTIONAL, IN DWORD InputType, IN DWORD OutputType)
Definition: string.c:17
struct _DNS_ARRAY DNS_ARRAY
LPWSTR WINAPI Dns_Ip4AddressToReverseName_W(OUT LPWSTR Name, IN IN_ADDR Address)
Definition: straddr.c:26
VOID WINAPI DnsAddr_BuildFromIp4(IN PDNS_ADDRESS DnsAddress, IN IN_ADDR Address, IN WORD Unknown)
Definition: dnsaddr.c:100
VOID WINAPI DnsAddrArray_Free(IN PDNS_ARRAY DnsAddrArray)
Definition: dnsaddr.c:34
struct _FLATBUFF FLATBUFF
PDNS_BLOB WINAPI SaBlob_Query(IN LPWSTR Name, IN WORD DnsType, IN ULONG Flags, IN PVOID *Reserved, IN DWORD AddressFamily)
Definition: sablob.c:545
struct _DNS_BLOB * PDNS_BLOB
struct _DNS_IPV6_ADDRESS * PDNS_IPV6_ADDRESS
BOOL WINAPI DnsAddrArray_ContainsAddr(IN PDNS_ARRAY DnsAddrArray, IN PDNS_ADDRESS DnsAddress, IN DWORD AddressType)
Definition: dnsaddr.c:193
PVOID WINAPI FlatBuf_Arg_CopyMemory(IN OUT PULONG_PTR Position, IN OUT PSIZE_T FreeSize, IN PVOID Buffer, IN SIZE_T Size, IN ULONG Align)
Definition: flatbuf.c:60
_DNS_STRING_TYPE
Definition: dnslib.h:16
@ Utf8String
Definition: dnslib.h:18
@ AnsiString
Definition: dnslib.h:19
BOOL WINAPI DnsAddrArray_AddAddr(IN PDNS_ARRAY DnsAddrArray, IN PDNS_ADDRESS DnsAddress, IN WORD AddressFamily OPTIONAL, IN DWORD AddressType OPTIONAL)
Definition: dnsaddr.c:57
PVOID WINAPI Dns_AllocZero(IN SIZE_T Size)
Definition: memory.c:42
ULONG WINAPI Dns_GetBufferLengthForStringCopy(IN PVOID String, IN ULONG Size OPTIONAL, IN DWORD InputType, IN DWORD OutputType)
Definition: string.c:176
struct _DNS_FAMILY_INFO * PDNS_FAMILY_INFO
PDNS_ARRAY WINAPI DnsAddrArray_Create(ULONG Count)
Definition: dnsaddr.c:17
struct _DNS_ARRAY * PDNS_ARRAY
BOOLEAN WINAPI Dns_StringToAddressW(OUT PVOID Address, IN OUT PULONG AddressSize, IN LPWSTR AddressName, IN OUT PDWORD AddressFamily)
Definition: straddr.c:303
struct _DNS_ADDRESS DNS_ADDRESS
VOID WINAPI FlatBuf_Init(IN PFLATBUFF FlatBuffer, IN PVOID Buffer, IN SIZE_T Size)
Definition: flatbuf.c:17
PDNS_FAMILY_INFO WINAPI FamilyInfo_GetForFamily(IN WORD AddressFamily)
Definition: addr.c:42
struct _DNS_IPV6_ADDRESS DNS_IPV6_ADDRESS
PHOSTENT WINAPI Hostent_Init(IN PVOID *Buffer, IN WORD AddressFamily, IN ULONG AddressSize, IN ULONG AddressCount, IN ULONG AliasCount)
Definition: hostent.c:17
VOID WINAPI DnsAddr_BuildFromIp6(IN PDNS_ADDRESS DnsAddress, IN PIN6_ADDR Address, IN ULONG ScopeId, IN WORD Port)
Definition: dnsaddr.c:116
struct _FLATBUFF * PFLATBUFF
struct _DNS_BLOB DNS_BLOB
struct _DNS_FAMILY_INFO DNS_FAMILY_INFO
VOID WINAPI Dns_Free(IN PVOID Address)
Definition: memory.c:25
PDNS_BLOB WINAPI SaBlob_Create(IN ULONG Count)
Definition: sablob.c:27
LPWSTR WINAPI Dns_Ip6AddressToReverseName_W(OUT LPWSTR Name, IN IN6_ADDR Address)
Definition: straddr.c:17
enum _DNS_STRING_TYPE DNS_STRING_TYPE
PVOID WINAPI FlatBuf_Arg_WriteString(IN OUT PULONG_PTR Position, IN OUT PSIZE_T FreeSize, IN PVOID String, IN BOOLEAN IsUnicode)
Definition: flatbuf.c:82
VOID WINAPI SaBlob_Free(IN PDNS_BLOB Blob)
Definition: sablob.c:103
VOID WINAPI Hostent_ConvertToOffsets(IN PHOSTENT Hostent)
Definition: hostent.c:71
PHOSTENT WINAPI SaBlob_CreateHostent(IN OUT PULONG_PTR BufferPosition, IN OUT PSIZE_T RemainingBufferSpace, IN OUT PSIZE_T HostEntrySize, IN PDNS_BLOB Blob, IN DWORD StringType, IN BOOLEAN Relative, IN BOOLEAN BufferAllocated)
Definition: sablob.c:131
LPWSTR WINAPI Dns_CreateStringCopy_W(IN LPWSTR Name)
Definition: string.c:141
int Align(int arg)
Definition: ehframes.cpp:89
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
CPPORT Port[4]
Definition: headless.c:35
@ Unknown
Definition: i8042prt.h:114
unsigned int * PULONG
Definition: retypes.h:1
unsigned int ULONG
Definition: retypes.h:1
IN PCO_ADDRESS_FAMILY AddressFamily
Definition: ndis.h:1906
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2992
int Count
Definition: noreturn.cpp:7
DWORD * PDWORD
Definition: pedump.c:68
static WCHAR Address[46]
Definition: ping.c:68
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
SOCKADDR_IN Ip4Address
Definition: dnslib.h:47
WORD Port
Definition: dnslib.h:44
WORD AddressFamily
Definition: dnslib.h:43
ATM_ADDRESS AtmAddress
Definition: dnslib.h:45
ULONG AddressLength
Definition: dnslib.h:50
SOCKADDR_IN6 Ip6Address
Definition: dnslib.h:48
DWORD Sub
Definition: dnslib.h:51
ULONG Flag
Definition: dnslib.h:52
ULONG Unknown[0x6]
Definition: dnslib.h:59
ULONG UsedAddresses
Definition: dnslib.h:58
DNS_ADDRESS Addresses[1]
Definition: dnslib.h:60
ULONG AllocatedAddresses
Definition: dnslib.h:57
ULONG AliasCount
Definition: dnslib.h:68
LPWSTR Aliases[8]
Definition: dnslib.h:70
LPWSTR Name
Definition: dnslib.h:65
PDNS_ARRAY DnsAddrArray
Definition: dnslib.h:66
PHOSTENT Hostent
Definition: dnslib.h:67
ULONG Unknown
Definition: dnslib.h:69
DWORD AddressSize
Definition: dnslib.h:77
WORD AddrType
Definition: dnslib.h:75
DWORD AddressOffset
Definition: dnslib.h:79
WORD DnsType
Definition: dnslib.h:76
DWORD SockaddrSize
Definition: dnslib.h:78
IP6_ADDRESS Address
Definition: dnslib.h:30
ULONG Unknown2
Definition: dnslib.h:29
ULONG Unknown5
Definition: dnslib.h:34
ULONG Unknown4
Definition: dnslib.h:32
ULONG Unknown
Definition: dnslib.h:28
ULONG Unknown3
Definition: dnslib.h:31
DWORD Reserved
Definition: dnslib.h:33
SIZE_T BufferFreeSize
Definition: dnslib.h:88
SIZE_T BufferSize
Definition: dnslib.h:87
ULONG_PTR BufferPos
Definition: dnslib.h:86
PVOID BufferEnd
Definition: dnslib.h:85
PVOID Buffer
Definition: dnslib.h:84
Definition: tcpip.h:126
static COORD Position
Definition: mouse.c:34
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
uint32_t * PULONG_PTR
Definition: typedefs.h:65
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define PDNS_RECORD
Definition: windns.h:636
#define WINAPI
Definition: msvc.h:6
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
WCHAR * LPWSTR
Definition: xmlstorage.h:184