#include <windef.h>
#include <winsock2.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
◆ _INC_WINDOWS
◆ WIN32_NO_STATUS
◆ cleanup()
| static void cleanup |
( |
int |
iExitCode | ) |
|
|
static |
Definition at line 181 of file whois.c.
182{
185}
int PASCAL FAR WSACleanup(void)
◆ getwhoisserver()
Definition at line 60 of file whois.c.
61{
63
65 {
67 {
69 {
72 }
73 else
74 {
76 }
77 return;
78 }
80 }
83}
_ACRTIMP int __cdecl strcmp(const char *, const char *)
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
Referenced by main().
◆ main()
Definition at line 85 of file whois.c.
86{
92
93 WORD wVersionRequested;
96
100
103
104
105 wVersionRequested =
MAKEWORD( 1, 1 );
108 {
109
110
111 perror(
"whois: WSAStartup failed");
113 }
114
119 }
121
126 }
127
133 }
134
140 }
141
142 sin.sin_port =
sp->s_port;
143
144
146
150 }
151
152
153
154
155
157 {
158
162 }
163
165 send(
s,
"\r\n", 2, 0);
166
167
168 while (
recv(
s, &
ch, 1, 0) == 1)
170
172 return 0;
173}
static void cleanup(void)
void CDECL perror(const char *str)
int WINAPIV fprintf(FILE *file, const char *format,...)
_ACRTIMP double __cdecl sin(double)
_ACRTIMP size_t __cdecl strlen(const char *)
INT WSAAPI recv(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags)
INT WSAAPI send(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
PHOSTENT WSAAPI gethostbyname(IN const char FAR *name)
PSERVENT WSAAPI getservbyname(IN const char FAR *name, IN const char FAR *proto)
#define memcpy(s1, s2, n)
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)
void getwhoisserver(int argc, char **argv)
int PASCAL FAR WSAGetLastError(void)
◆ usage()
◆ host
◆ NICHOST
| char NICHOST[] = "whois.internic.net" |
|
static |
◆ optset