21 int SendAddrLen =
sizeof(SendAddr);
64 _tprintf(
_T(
"sendto() failed with WSANOTINITIALIZED\n") );
67 _tprintf(
_T(
"sendto() failed with WSAENETDOWN\n") );
70 _tprintf(
_T(
"sendto() failed with WSAEACCES\n") );
73 _tprintf(
_T(
"sendto() failed with WSAEINVAL\n") );
76 _tprintf(
_T(
"sendto() failed with WSAEINTR\n") );
79 _tprintf(
_T(
"sendto() failed with WSAEINPROGRESS\n") );
82 _tprintf(
_T(
"sendto() failed with WSAEFAULT\n") );
85 _tprintf(
_T(
"sendto() failed with WSAENETRESET\n") );
88 _tprintf(
_T(
"sendto() failed with WSAENOBUFS\n") );
91 _tprintf(
_T(
"sendto() failed with WSAENOTCONN\n") );
94 _tprintf(
_T(
"sendto() failed with WSAENOTSOCK\n") );
97 _tprintf(
_T(
"sendto() failed with WSAEOPNOTSUPP\n") );
100 _tprintf(
_T(
"sendto() failed with WSAESHUTDOWN\n") );
103 _tprintf(
_T(
"sendto() failed with WSAEWOULDBLOCK\n") );
106 _tprintf(
_T(
"sendto() failed with WSAEMSGSIZE\n") );
109 _tprintf(
_T(
"sendto() failed with WSAEHOSTUNREACH\n") );
112 _tprintf(
_T(
"sendto() failed with WSAECONNABORTED\n") );
115 _tprintf(
_T(
"sendto() failed with WSAECONNRESET\n") );
118 _tprintf(
_T(
"sendto() failed with WSAEADDRNOTAVAIL\n") );
121 _tprintf(
_T(
"sendto() failed with WSAEAFNOSUPPORT\n") );
124 _tprintf(
_T(
"sendto() failed with WSAEDESTADDRREQ\n") );
127 _tprintf(
_T(
"sendto() failed with WSAENETUNREACH\n") );
130 _tprintf(
_T(
"sendto() failed with WSAETIMEDOUT\n") );
133 _tprintf(
_T(
"sendto() failed with unknown error\n") );
156 _tprintf(
_T(
"recvfrom() failed with WSANOTINITIALIZED\n") );
159 _tprintf(
_T(
"recvfrom() failed with WSAENETDOWN\n") );
162 _tprintf(
_T(
"recvfrom() failed with WSAEACCES\n") );
165 _tprintf(
_T(
"recvfrom() failed with WSAEINVAL\n") );
168 _tprintf(
_T(
"recvfrom() failed with WSAEINTR\n") );
171 _tprintf(
_T(
"recvfrom() failed with WSAEINPROGRESS\n") );
174 _tprintf(
_T(
"recvfrom() failed with WSAEFAULT\n") );
177 _tprintf(
_T(
"recvfrom() failed with WSAENETRESET\n") );
180 _tprintf(
_T(
"recvfrom() failed with WSAENOBUFS\n") );
183 _tprintf(
_T(
"recvfrom() failed with WSAENOTCONN\n") );
186 _tprintf(
_T(
"recvfrom() failed with WSAENOTSOCK\n") );
189 _tprintf(
_T(
"recvfrom() failed with WSAEOPNOTSUPP\n") );
192 _tprintf(
_T(
"recvfrom() failed with WSAESHUTDOWN\n") );
195 _tprintf(
_T(
"recvfrom() failed with WSAEWOULDBLOCK\n") );
198 _tprintf(
_T(
"recvfrom() failed with WSAEMSGSIZE\n") );
201 _tprintf(
_T(
"recvfrom() failed with WSAEHOSTUNREACH\n") );
204 _tprintf(
_T(
"recvfrom() failed with WSAECONNABORTED\n") );
207 _tprintf(
_T(
"recvfrom() failed with WSAECONNRESET\n") );
210 _tprintf(
_T(
"recvfrom() failed with WSAEADDRNOTAVAIL\n") );
213 _tprintf(
_T(
"recvfrom() failed with WSAEAFNOSUPPORT\n") );
216 _tprintf(
_T(
"recvfrom() failed with WSAEDESTADDRREQ\n") );
219 _tprintf(
_T(
"recvfrom() failed with WSAENETUNREACH\n") );
222 _tprintf(
_T(
"recvfrom() failed with WSAETIMEDOUT\n") );
225 _tprintf(
_T(
"recvfrom() failed with unknown error\n") );
244 *pOutBufferLength =
j;
262 for( ;
i > 0;
i -= 1 )
if(
'.' == pIP[
i] )
break;
274 for( ;
i > 0;
i -= 1 )
if(
'.' == pIP[
i] )
break;
286 for( ;
i > 0;
i -= 1 )
if(
'.' == pIP[
i] )
break;
298 for( ;
i > 0;
i -= 1 );
308 int i = 0,
l = 0,
b = 0,
c = 1;
312 if(
l > 15 )
return FALSE;
316 for( ;
i <
l;
i += 1 )
318 if(
'.' == pInput[
i] )
330 if( (pInput[
i] <
'0') || (pInput[
i] >
'9') )
return FALSE;
345 int c = 0,
d = 0,
i = 0,
j = 0,
k = 0,
l = 0,
m = 0;
368 for(
j = 0;
j <
l;
j += 1 )
399 int c = 0,
l = 0,
i = 0,
v = 0;
439 UCHAR Header1, Header2;
440 USHORT NumQuestions, NumAnswers, NumAuthority, NumAdditional;
469 _tprintf(
_T(
" opcode = %s, id = %d, rcode = %s\n"),
475 if( Header1 & 0x01 )
_tprintf(
_T(
", want recursion") );
479 " authority records = %d, additional = %d\n\n"),
483 (
int)NumAdditional );
489 for(
k = 0;
k < NumQuestions;
k += 1 )
513 UCHAR Header1, Header2;
514 USHORT NumQuestions, NumAnswers, NumAuthority, NumAdditional;
518 int d = 0,
i = 0,
k = 0;
544 _tprintf(
_T(
" opcode = %s, id = %d, rcode = %s\n"),
550 if( Header1 & 0x01 )
_tprintf(
_T(
", want recursion") );
551 if( Header2 & 0x80 )
_tprintf(
_T(
", recursion avail.") );
554 _tprintf(
_T(
" questions = %d, answers = %d, "
555 "authority records = %d, additional = %d\n\n"),
559 (
int)NumAdditional );
565 for(
k = 0;
k < NumQuestions;
k += 1 )
587 for(
k = 0;
k < NumAnswers;
k += 1 )
609 _tprintf(
_T(
" type = %s, class = %s, dlen = %d\n"),
636 for(
k = 0;
k < NumAuthority;
k += 1 )
656 _tprintf(
_T(
" type = %s, class = %s, dlen = %d\n"),
700 for(
k = 0;
k < NumAdditional;
k += 1 )
720 _tprintf(
_T(
" type = %s, class = %s, dlen = %d\n"),
761 switch( RCode & 0x0F )
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
ULONG WSAAPI inet_addr(IN CONST CHAR FAR *cp)
USHORT ClassNametoClassID(PCHAR ClassName)
PCHAR TypeIDtoTypeName(USHORT TypeID)
int ExtractIP(PCHAR pBuffer, PCHAR pOutput, USHORT Offset)
BOOL SendRequest(PCHAR pInBuffer, ULONG InBufferLength, PCHAR pOutBuffer, PULONG pOutBufferLength)
PCHAR RCodeIDtoRCodeName(UCHAR RCode)
BOOL IsValidIP(PCHAR pInput)
void ReverseIP(PCHAR pIP, PCHAR pReturn)
PCHAR OpcodeIDtoOpcodeName(UCHAR Opcode)
void PrintDebug(PCHAR pBuffer, DWORD BufferLength)
int ExtractName(PCHAR pBuffer, PCHAR pOutput, USHORT Offset, UCHAR Limit)
USHORT TypeNametoTypeID(PCHAR TypeName)
PCHAR ClassIDtoClassName(USHORT ClassID)
void PrintD2(PCHAR pBuffer, DWORD BufferLength)
INT WSAAPI recvfrom(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags, OUT LPSOCKADDR from, IN OUT INT FAR *fromlen)
INT WSAAPI sendto(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags, IN CONST struct sockaddr *to, IN INT tolen)
GLboolean GLboolean GLboolean b
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
_In_ PVOID _In_ ULONG Opcode
#define sprintf(buf, format,...)
_In_ ULONG _In_ ULONG Offset
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
#define RtlZeroMemory(Destination, Length)
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
#define WSANOTINITIALISED
int PASCAL FAR WSAGetLastError(void)
_In_ LONG _In_ LONG Limit