ReactOS 0.4.15-dev-5667-ged97270
nslookup.h
Go to the documentation of this file.
1#ifndef _NSLOOKUP_H
2#define _NSLOOKUP_H
3
4#include <stdarg.h>
5
6#define WIN32_NO_STATUS
7#include <windef.h>
8#define _INC_WINDOWS
9#include <winsock2.h>
10#include <tchar.h>
11#include <stdio.h>
12
13#define TypeA "A"
14#define TypeAAAA "AAAA"
15#define TypeBoth "A+AAAA"
16#define TypeAny "ANY"
17#define TypeCNAME "CNAME"
18#define TypeMX "MX"
19#define TypeNS "NS"
20#define TypePTR "PTR"
21#define TypeSOA "SOA"
22#define TypeSRV "SRV"
23
24#define TYPE_A 0x01
25#define TYPE_NS 0x02
26#define TYPE_CNAME 0x05
27#define TYPE_SOA 0x06
28#define TYPE_WKS 0x0B
29#define TYPE_PTR 0x0C
30#define TYPE_MX 0x0F
31#define TYPE_ANY 0xFF
32
33#define ClassIN "IN"
34#define ClassAny "ANY"
35
36#define CLASS_IN 0x01
37#define CLASS_ANY 0xFF
38
39#define OPCODE_QUERY 0x00
40#define OPCODE_IQUERY 0x01
41#define OPCODE_STATUS 0x02
42
43#define OpcodeQuery "QUERY"
44#define OpcodeIQuery "IQUERY"
45#define OpcodeStatus "STATUS"
46#define OpcodeReserved "RESERVED"
47
48#define RCODE_NOERROR 0x00
49#define RCODE_FORMERR 0x01
50#define RCODE_FAILURE 0x02
51#define RCODE_NXDOMAIN 0x03
52#define RCODE_NOTIMP 0x04
53#define RCODE_REFUSED 0x05
54
55#define RCodeNOERROR "NOERROR"
56#define RCodeFORMERR "FORMERR"
57#define RCodeFAILURE "FAILURE"
58#define RCodeNXDOMAIN "NXDOMAIN"
59#define RCodeNOTIMP "NOTIMP"
60#define RCodeREFUSED "REFUSED"
61#define RCodeReserved "RESERVED"
62
63#define DEFAULT_ROOT "A.ROOT-SERVERS.NET."
64#define ARPA_SIG ".in-addr.arpa"
65
66typedef struct _STATE
67{
77 CHAR srchlist[6][256];
78 CHAR root[256];
88
89/* nslookup.c */
90
91extern STATE State;
92extern HANDLE ProcessHeap;
93
94/* utility.c */
95
96BOOL SendRequest( PCHAR pInBuffer,
97 ULONG InBufferLength,
98 PCHAR pOutBuffer,
99 PULONG pOutBufferLength );
100
102 PCHAR pOutput,
104 UCHAR Limit );
105
106void ReverseIP( PCHAR pIP, PCHAR pReturn );
107BOOL IsValidIP( PCHAR pInput );
108int ExtractIP( PCHAR pBuffer, PCHAR pOutput, USHORT Offset );
114USHORT TypeNametoTypeID( PCHAR TypeName );
116USHORT ClassNametoClassID( PCHAR ClassName );
117
118#endif /* _NSLOOKUP_H */
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PVOID _In_ ULONG Opcode
Definition: hubbusif.h:331
USHORT ClassNametoClassID(PCHAR ClassName)
Definition: utility.c:848
PCHAR TypeIDtoTypeName(USHORT TypeID)
Definition: utility.c:786
int ExtractIP(PCHAR pBuffer, PCHAR pOutput, USHORT Offset)
Definition: utility.c:397
STATE State
Definition: nslookup.c:14
HANDLE ProcessHeap
Definition: servman.c:15
BOOL SendRequest(PCHAR pInBuffer, ULONG InBufferLength, PCHAR pOutBuffer, PULONG pOutBufferLength)
Definition: utility.c:11
PCHAR RCodeIDtoRCodeName(UCHAR RCode)
Definition: utility.c:759
BOOL IsValidIP(PCHAR pInput)
Definition: utility.c:306
void ReverseIP(PCHAR pIP, PCHAR pReturn)
Definition: utility.c:249
PCHAR OpcodeIDtoOpcodeName(UCHAR Opcode)
Definition: utility.c:741
struct _STATE STATE
void PrintDebug(PCHAR pBuffer, DWORD BufferLength)
Definition: utility.c:510
int ExtractName(PCHAR pBuffer, PCHAR pOutput, USHORT Offset, UCHAR Limit)
Definition: utility.c:343
struct _STATE * PSTATE
USHORT TypeNametoTypeID(PCHAR TypeName)
Definition: utility.c:819
PCHAR ClassIDtoClassName(USHORT ClassID)
Definition: utility.c:833
void PrintD2(PCHAR pBuffer, DWORD BufferLength)
Definition: utility.c:436
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
unsigned short USHORT
Definition: pedump.c:61
PVOID pBuffer
Definition: userinit.h:57
CHAR srchlist[6][256]
Definition: nslookup.h:77
BOOL vc
Definition: nslookup.h:73
BOOL debug
Definition: nslookup.h:68
BOOL search
Definition: nslookup.h:72
USHORT port
Definition: nslookup.h:84
BOOL d2
Definition: nslookup.h:70
BOOL MSxfr
Definition: nslookup.h:75
DWORD ixfrver
Definition: nslookup.h:81
BOOL ignoretc
Definition: nslookup.h:74
CHAR DefaultServerAddress[16]
Definition: nslookup.h:86
BOOL defname
Definition: nslookup.h:69
DWORD retry
Definition: nslookup.h:79
BOOL recurse
Definition: nslookup.h:71
PCHAR Class
Definition: nslookup.h:83
CHAR DefaultServer[256]
Definition: nslookup.h:85
DWORD timeout
Definition: nslookup.h:80
PCHAR type
Definition: nslookup.h:82
Definition: cookie.c:42
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_In_ LONG _In_ LONG Limit
Definition: kefuncs.h:318
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175