ReactOS  0.4.12-dev-919-gfc3b8d5
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 
15 typedef enum _DNS_STRING_TYPE
16 {
21 
22 #define IpV4Address 3
23 
24 /* TYPES *********************************************************************/
25 
26 typedef struct _DNS_IPV6_ADDRESS
27 {
36 
37 typedef struct _DNS_ADDRESS
38 {
39  union
40  {
41  struct
42  {
46  };
49  };
54 
55 typedef struct _DNS_ARRAY
56 {
59  ULONG Unknown[0x6];
62 
63 typedef struct _DNS_BLOB
64 {
72 
73 typedef struct _DNS_FAMILY_INFO
74 {
81 
82 typedef struct _FLATBUFF
83 {
90 
91 /*
92  * memory.c
93  */
94 VOID
95 WINAPI
97 
98 PVOID
99 WINAPI
101 
102 /*
103  * addr.c
104  */
106 WINAPI
108 
109 /*
110  * dnsaddr.c
111  */
112 VOID
113 WINAPI
115  IN PDNS_ADDRESS DnsAddress,
117  IN WORD Unknown
118 );
119 
120 VOID
121 WINAPI
123  IN PDNS_ADDRESS DnsAddress,
125  IN ULONG ScopeId,
126  IN WORD Port
127 );
128 
130 WINAPI
132 
133 BOOL
134 WINAPI
136  IN PDNS_ARRAY DnsAddrArray,
137  IN PDNS_ADDRESS DnsAddress,
139  IN DWORD AddressType OPTIONAL
140 );
141 
142 VOID
143 WINAPI
144 DnsAddrArray_Free(IN PDNS_ARRAY DnsAddrArray);
145 
146 BOOL
147 WINAPI
149  IN PDNS_ARRAY DnsAddrArray,
151  IN DWORD AddressType
152 );
153 
154 BOOL
155 WINAPI
157  IN PDNS_ARRAY DnsAddrArray,
158  IN PDNS_ADDRESS DnsAddress,
159  IN DWORD AddressType
160 );
161 
162 BOOLEAN
163 WINAPI
165  IN PDNS_RECORD DnsRecord,
166  OUT PDNS_ADDRESS DnsAddr
167 );
168 
169 /*
170  * hostent.c
171  */
172 PHOSTENT
173 WINAPI
175  IN PVOID *Buffer,
177  IN ULONG AddressSize,
178  IN ULONG AddressCount,
179  IN ULONG AliasCount
180 );
181 
182 VOID
183 WINAPI
185 
186 /*
187  * flatbuf.c
188  */
189 VOID
190 WINAPI
192  IN PFLATBUFF FlatBuffer,
193  IN PVOID Buffer,
194  IN SIZE_T Size
195 );
196 
197 PVOID
198 WINAPI
201  IN OUT PSIZE_T FreeSize,
202  IN PVOID Buffer,
203  IN SIZE_T Size,
204  IN ULONG Align
205 );
206 
207 PVOID
208 WINAPI
211  IN OUT PSIZE_T FreeSize,
212  IN SIZE_T Size,
213  IN ULONG Align
214 );
215 
216 PVOID
217 WINAPI
220  IN OUT PSIZE_T FreeSize,
221  IN PVOID String,
222  IN BOOLEAN IsUnicode
223 );
224 
225 /*
226  * sablob.c
227  */
228 PDNS_BLOB
229 WINAPI
231  IN ULONG Count
232 );
233 
234 PDNS_BLOB
235 WINAPI
237  IN LPWSTR Name,
238  IN ULONG Count,
239  IN PIN_ADDR AddressArray
240 );
241 
242 VOID
243 WINAPI
244 SaBlob_Free(IN PDNS_BLOB Blob);
245 
246 PHOSTENT
247 WINAPI
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 
258 INT
259 WINAPI
261  IN PDNS_BLOB Blob,
262  IN LPWSTR String,
263  IN BOOLEAN IsAlias
264 );
265 
266 PDNS_BLOB
267 WINAPI
269  IN LPWSTR Name,
270  IN WORD DnsType,
271  IN ULONG Flags,
272  IN PVOID *Reserved,
274 );
275 
276 /*
277  * string.c
278  */
279 ULONG
280 WINAPI
283  IN OUT PULONG DestinationSize,
284  IN PVOID String,
285  IN ULONG StringSize OPTIONAL,
286  IN DWORD InputType,
287  IN DWORD OutputType
288 );
289 
290 LPWSTR
291 WINAPI
293 
294 ULONG
295 WINAPI
297  IN PVOID String,
299  IN DWORD InputType,
300  IN DWORD OutputType
301 );
302 
303 /*
304  * straddr.c
305  */
306 BOOLEAN
307 WINAPI
309  OUT PVOID Address,
310  IN OUT PULONG AddressSize,
311  IN LPWSTR AddressName,
313 );
314 
315 LPWSTR
316 WINAPI
318  OUT LPWSTR Name,
320 );
321 
322 LPWSTR
323 WINAPI
325  OUT LPWSTR Name,
327 );
328 
329 BOOLEAN
330 WINAPI
332  OUT PDNS_ADDRESS DnsAddr,
333  IN LPWSTR Name
334 );
335 
336 BOOLEAN
337 WINAPI
340  IN LPWSTR Name
341 );
CPPORT Port[4]
Definition: headless.c:34
#define IN
Definition: typedefs.h:38
VOID WINAPI FlatBuf_Init(IN PFLATBUFF FlatBuffer, IN PVOID Buffer, IN SIZE_T Size)
Definition: flatbuf.c:17
struct _DNS_ADDRESS DNS_ADDRESS
IN PCO_ADDRESS_FAMILY AddressFamily
Definition: ndis.h:1888
DWORD Reserved
Definition: dnslib.h:33
LPWSTR Name
Definition: dnslib.h:65
struct _DNS_FAMILY_INFO * PDNS_FAMILY_INFO
LPWSTR WINAPI Dns_Ip4AddressToReverseName_W(OUT LPWSTR Name, IN IN_ADDR Address)
Definition: straddr.c:26
WORD AddressFamily
Definition: dnslib.h:43
ULONG_PTR BufferPos
Definition: dnslib.h:86
static COORD Position
Definition: mouse.c:34
ULONG Unknown4
Definition: dnslib.h:32
DNS_ADDRESS Addresses[1]
Definition: dnslib.h:60
struct _DNS_IPV6_ADDRESS * PDNS_IPV6_ADDRESS
VOID WINAPI SaBlob_Free(IN PDNS_BLOB Blob)
Definition: sablob.c:103
ULONG AllocatedAddresses
Definition: dnslib.h:57
SIZE_T BufferFreeSize
Definition: dnslib.h:88
PVOID WINAPI Dns_AllocZero(IN SIZE_T Size)
Definition: memory.c:42
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
PDNS_ARRAY DnsAddrArray
Definition: dnslib.h:66
static WCHAR String[]
Definition: stringtable.c:55
PDNS_BLOB WINAPI SaBlob_Query(IN LPWSTR Name, IN WORD DnsType, IN ULONG Flags, IN PVOID *Reserved, IN DWORD AddressFamily)
Definition: sablob.c:545
PDNS_FAMILY_INFO WINAPI FamilyInfo_GetForFamily(IN WORD AddressFamily)
Definition: addr.c:42
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
ULONG AliasCount
Definition: dnslib.h:68
VOID WINAPI Dns_Free(IN PVOID Address)
Definition: memory.c:25
int32_t INT
Definition: typedefs.h:56
INT WINAPI SaBlob_WriteNameOrAlias(IN PDNS_BLOB Blob, IN LPWSTR String, IN BOOLEAN IsAlias)
Definition: sablob.c:294
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
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
VOID WINAPI DnsAddr_BuildFromIp6(IN PDNS_ADDRESS DnsAddress, IN PIN6_ADDR Address, IN ULONG ScopeId, IN WORD Port)
Definition: dnsaddr.c:116
struct _DNS_BLOB * PDNS_BLOB
uint32_t ULONG_PTR
Definition: typedefs.h:63
ULONG Unknown2
Definition: dnslib.h:29
struct _DNS_BLOB DNS_BLOB
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
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
ULONG_PTR * PSIZE_T
Definition: typedefs.h:78
unsigned int BOOL
Definition: ntddk_ex.h:94
ULONG Flag
Definition: dnslib.h:52
ULONG UsedAddresses
Definition: dnslib.h:58
DWORD Sub
Definition: dnslib.h:51
unsigned char BOOLEAN
static WCHAR Address[46]
Definition: ping.c:68
DWORD SockaddrSize
Definition: dnslib.h:78
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
PVOID BufferEnd
Definition: dnslib.h:85
Definition: bufpool.h:45
#define PDNS_RECORD
Definition: windns.h:636
BOOL WINAPI DnsAddrArray_AddIp4(IN PDNS_ARRAY DnsAddrArray, IN IN_ADDR Address, IN DWORD AddressType)
Definition: dnsaddr.c:42
PVOID Buffer
Definition: dnslib.h:84
SOCKADDR_IN6 Ip6Address
Definition: dnslib.h:48
WORD DnsType
Definition: dnslib.h:76
struct _DNS_IPV6_ADDRESS DNS_IPV6_ADDRESS
DWORD AddressOffset
Definition: dnslib.h:79
Definition: tcpip.h:125
#define WINAPI
Definition: msvc.h:8
LPWSTR WINAPI Dns_CreateStringCopy_W(IN LPWSTR Name)
Definition: string.c:141
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
ULONG Unknown
Definition: dnslib.h:69
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2875
ULONG Unknown3
Definition: dnslib.h:31
BOOL WINAPI DnsAddrArray_ContainsAddr(IN PDNS_ARRAY DnsAddrArray, IN PDNS_ADDRESS DnsAddress, IN DWORD AddressType)
Definition: dnsaddr.c:193
ULONG AddressLength
Definition: dnslib.h:50
PDNS_ARRAY WINAPI DnsAddrArray_Create(ULONG Count)
Definition: dnsaddr.c:17
BOOLEAN WINAPI Dns_StringToAddressW(OUT PVOID Address, IN OUT PULONG AddressSize, IN LPWSTR AddressName, IN OUT PDWORD AddressFamily)
Definition: straddr.c:303
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
struct _FLATBUFF * PFLATBUFF
IP6_ADDRESS Address
Definition: dnslib.h:30
BOOLEAN WINAPI Dns_ReverseNameToDnsAddr_W(OUT PDNS_ADDRESS DnsAddr, IN LPWSTR Name)
Definition: straddr.c:452
struct _DNS_ARRAY * PDNS_ARRAY
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
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
BOOLEAN WINAPI Dns_Ip4ReverseNameToAddress_W(OUT PIN_ADDR Address, IN LPWSTR Name)
Definition: straddr.c:136
SOCKADDR_IN Ip4Address
Definition: dnslib.h:47
struct _FLATBUFF FLATBUFF
VOID WINAPI Hostent_ConvertToOffsets(IN PHOSTENT Hostent)
Definition: hostent.c:71
ULONG_PTR SIZE_T
Definition: typedefs.h:78
DWORD AddressSize
Definition: dnslib.h:77
ATM_ADDRESS AtmAddress
Definition: dnslib.h:45
ULONG Unknown5
Definition: dnslib.h:34
BOOL WINAPI DnsAddrArray_AddAddr(IN PDNS_ARRAY DnsAddrArray, IN PDNS_ADDRESS DnsAddress, IN WORD AddressFamily OPTIONAL, IN DWORD AddressType OPTIONAL)
Definition: dnsaddr.c:57
VOID WINAPI DnsAddr_BuildFromIp4(IN PDNS_ADDRESS DnsAddress, IN IN_ADDR Address, IN WORD Unknown)
Definition: dnsaddr.c:100
unsigned int * PULONG
Definition: retypes.h:1
DWORD * PDWORD
Definition: pedump.c:68
ULONG WINAPI Dns_GetBufferLengthForStringCopy(IN PVOID String, IN ULONG Size OPTIONAL, IN DWORD InputType, IN DWORD OutputType)
Definition: string.c:176
struct _DNS_ARRAY DNS_ARRAY
PHOSTENT Hostent
Definition: dnslib.h:67
#define OUT
Definition: typedefs.h:39
struct _DNS_FAMILY_INFO DNS_FAMILY_INFO
unsigned int ULONG
Definition: retypes.h:1
struct _DNS_ADDRESS * PDNS_ADDRESS
_DNS_STRING_TYPE
Definition: dnslib.h:15
uint32_t * PULONG_PTR
Definition: typedefs.h:63
WORD AddrType
Definition: dnslib.h:75
ULONG Unknown
Definition: dnslib.h:28
LPWSTR Aliases[8]
Definition: dnslib.h:70
WCHAR * LPWSTR
Definition: xmlstorage.h:184
SIZE_T BufferSize
Definition: dnslib.h:87
enum _DNS_STRING_TYPE DNS_STRING_TYPE
PDNS_BLOB WINAPI SaBlob_CreateFromIp4(IN LPWSTR Name, IN ULONG Count, IN PIN_ADDR AddressArray)
Definition: sablob.c:61
ULONG Unknown[0x6]
Definition: dnslib.h:59
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 DnsAddrArray_Free(IN PDNS_ARRAY DnsAddrArray)
Definition: dnsaddr.c:34
BOOLEAN WINAPI DnsAddr_BuildFromDnsRecord(IN PDNS_RECORD DnsRecord, OUT PDNS_ADDRESS DnsAddr)
Definition: dnsaddr.c:155
WORD Port
Definition: dnslib.h:44
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68