ReactOS 0.4.15-dev-7788-g1ad9096
arping.c File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <winnls.h>
#include <wincon.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>
#include <ws2def.h>
#include <stdio.h>
#include <stdlib.h>
#include "resource.h"
Include dependency graph for arping.c:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 

Functions

void FormatOutput (UINT uID,...)
 
static VOID Usage (VOID)
 
static BOOL ParseCmdline (int argc, LPWSTR argv[])
 
static BOOL WINAPI StopLoop (DWORD dwCtrlType)
 
static BOOL Setup (VOID)
 
static VOID Cleanup (VOID)
 
static VOID QueryTime (PLARGE_INTEGER Time)
 
static VOID TimeToMsString (LPWSTR String, ULONG Length, LARGE_INTEGER Time)
 
static BOOL Ping (VOID)
 
int wmain (int argc, LPWSTR argv[])
 

Variables

BOOL NeverStop
 
UINT PingCount
 
WCHAR TargetName [256]
 
WCHAR SourceName [256]
 
DWORD SourceAddr
 
DWORD TargetAddr
 
WCHAR TargetIP [16]
 
WCHAR SourceIP [16]
 
SOCKADDR_IN Target
 
HANDLE hStdOutput
 
ULONG Timeout
 
LARGE_INTEGER TicksPerMs
 
LARGE_INTEGER TicksPerUs
 
BOOL UsePerformanceCounter
 
UINT Sent
 
UINT Received
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 16 of file arping.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 9 of file arping.c.

Function Documentation

◆ Cleanup()

static VOID Cleanup ( VOID  )
static

Definition at line 280 of file arping.c.

281{
282 WSACleanup();
283}
int PASCAL FAR WSACleanup(void)
Definition: startup.c:60

◆ FormatOutput()

void FormatOutput ( UINT  uID,
  ... 
)

Definition at line 42 of file arping.c.

43{
45
46 WCHAR Buf[1024];
47 CHAR AnsiBuf[1024];
48 LPWSTR pBuf = Buf;
49 PCHAR pAnsiBuf = AnsiBuf;
50 WCHAR Format[1024];
51 DWORD written;
53 int AnsiLength;
54
56 Format, sizeof(Format) / sizeof(WCHAR)))
57 {
58 return;
59 }
60
61 va_start(valist, uID);
63 sizeof(Buf) / sizeof(WCHAR), &valist);
65
66 if(!DataLength)
67 {
69 {
70 return;
71 }
72
73 va_start(valist, uID);
76 Format, 0, 0, (LPWSTR)&pBuf, 0, &valist);
78 }
79
80 if(!DataLength)
81 {
82 return;
83 }
84
86 {
87 /* Is a console or a printer */
88 WriteConsole(hStdOutput, pBuf, DataLength, &written, NULL);
89 }
90 else
91 {
92 /* Is a pipe, socket, file or other */
93 AnsiLength = WideCharToMultiByte(CP_ACP, 0, pBuf, DataLength,\
94 NULL, 0, NULL, NULL);
95
96 if(AnsiLength >= sizeof(AnsiBuf))
97 pAnsiBuf = (PCHAR)HeapAlloc(GetProcessHeap(), 0, AnsiLength);
98
99 AnsiLength = WideCharToMultiByte(CP_OEMCP, 0, pBuf, DataLength,\
100 pAnsiBuf, AnsiLength, " ", NULL);
101
102 WriteFile(hStdOutput, pAnsiBuf, AnsiLength, &written, NULL);
103
104 if(pAnsiBuf != AnsiBuf)
105 HeapFree(NULL, 0, pAnsiBuf);
106 }
107
108 if(pBuf != Buf)
109 LocalFree(pBuf);
110}
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
HANDLE hStdOutput
Definition: arping.c:34
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
Definition: cdrom.h:1444
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define CP_ACP
Definition: compat.h:109
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define WideCharToMultiByte
Definition: compat.h:111
DWORD WINAPI GetFileType(HANDLE hFile)
Definition: fileinfo.c:269
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
unsigned long DWORD
Definition: ntddk_ex.h:95
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
#define PCHAR
Definition: match.c:90
static __ms_va_list valist
Definition: printf.c:66
unsigned int UINT
Definition: ndis.h:50
char * PCHAR
Definition: typedefs.h:51
#define FormatMessage
Definition: winbase.h:3730
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:421
#define GetModuleHandle
Definition: winbase.h:3762
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:419
#define FILE_TYPE_CHAR
Definition: winbase.h:260
#define WriteConsole
Definition: wincon.h:784
#define CP_OEMCP
Definition: winnls.h:231
#define LoadString
Definition: winuser.h:5819
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
char CHAR
Definition: xmlstorage.h:175

Referenced by ParseCmdline(), Ping(), Setup(), Usage(), and wmain().

◆ ParseCmdline()

static BOOL ParseCmdline ( int  argc,
LPWSTR  argv[] 
)
static

Definition at line 117 of file arping.c.

118{
119 INT i;
120
121 if (argc < 3)
122 {
123 Usage();
124 return FALSE;
125 }
126
127 for (i = 1; i < argc; i++)
128 {
129 if (argv[i][0] == L'-' || argv[i][0] == L'/')
130 {
131 switch (argv[i][1])
132 {
133 case L't': NeverStop = TRUE; break;
134 case L'n':
135 if (i + 1 < argc)
136 {
137 PingCount = wcstoul(argv[++i], NULL, 0);
138
139 if (PingCount == 0)
140 {
142 return FALSE;
143 }
144 }
145 else
146 {
148 return FALSE;
149 }
150 break;
151
152 case L's':
153 if (SourceName[0] != 0)
154 {
156 return FALSE;
157 }
158
159 if (i + 1 < argc)
160 {
161 wcscpy(SourceName, argv[++i]);
162 }
163 else
164 {
166 return FALSE;
167 }
168 break;
169
170 case '?':
171 Usage();
172 return FALSE;
173
174 default:
176 return FALSE;
177 }
178 }
179 else
180 {
181 if (TargetName[0] != 0)
182 {
184 return FALSE;
185 }
186 else
187 {
189 }
190 }
191 }
192
193 if (TargetName[0] == 0)
194 {
196 return FALSE;
197 }
198
199 if (SourceName[0] == 0)
200 {
202 return FALSE;
203 }
204
205 return TRUE;
206}
static int argc
Definition: ServiceArgs.c:12
WCHAR SourceName[256]
Definition: arping.c:28
WCHAR TargetName[256]
Definition: arping.c:27
BOOL NeverStop
Definition: arping.c:25
void FormatOutput(UINT uID,...)
Definition: arping.c:42
UINT PingCount
Definition: arping.c:26
#define IDS_BAD_PARAMETER
Definition: resource.h:10
#define IDS_BAD_OPTION
Definition: resource.h:9
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
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
Definition: glfuncs.h:248
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
#define UINT_MAX
Definition: limits.h:41
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define IDS_SRC_MUST_BE_SPECIFIED
Definition: resource.h:10
#define IDS_BAD_VALUE_OPTION_N
Definition: resource.h:11
#define IDS_DEST_MUST_BE_SPECIFIED
Definition: resource.h:7
#define IDS_BAD_OPTION_FORMAT
Definition: resource.h:4
#define argv
Definition: mplay32.c:18
#define L(x)
Definition: ntvdm.h:50
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
int32_t INT
Definition: typedefs.h:58

Referenced by wmain().

◆ Ping()

static BOOL Ping ( VOID  )
static

Definition at line 325 of file arping.c.

326{
327 LARGE_INTEGER RelativeTime;
328 LARGE_INTEGER LargeTime;
329 LARGE_INTEGER SentTime;
330 DWORD Ret;
331 BYTE TargetHW[6];
332 ULONG Size;
333 WCHAR Sign[2];
334 WCHAR Time[100];
335 WCHAR StrHwAddr[18];
336
337 QueryTime(&SentTime);
338 Size = sizeof(TargetHW);
339 memset(TargetHW, 0xff, Size);
340 ++Sent;
341 Ret = SendARP(TargetAddr, SourceAddr, (PULONG)TargetHW, &Size);
342 if (Ret == ERROR_SUCCESS)
343 {
344 QueryTime(&LargeTime);
345
346 RelativeTime.QuadPart = (LargeTime.QuadPart - SentTime.QuadPart);
347
348 if ((RelativeTime.QuadPart / TicksPerMs.QuadPart) < 1)
349 {
350 wcscpy(Sign, L"<");
351 LoadString(GetModuleHandle(NULL), IDS_1MS, Time, sizeof(Time) / sizeof(WCHAR));
352 }
353 else
354 {
355 wcscpy(Sign, L"=");
356 TimeToMsString(Time, sizeof(Time) / sizeof(WCHAR), RelativeTime);
357 }
358
359 swprintf(StrHwAddr, L"%02x:%02x:%02x:%02x:%02x:%02x", TargetHW[0], TargetHW[1],
360 TargetHW[2], TargetHW[3],
361 TargetHW[4], TargetHW[5]);
363 Received++;
364
365 return TRUE;
366 }
367
368 return FALSE;
369}
UINT Received
Definition: arping.c:40
DWORD TargetAddr
Definition: arping.c:30
static VOID QueryTime(PLARGE_INTEGER Time)
Definition: arping.c:285
WCHAR TargetIP[16]
Definition: arping.c:31
static VOID TimeToMsString(LPWSTR String, ULONG Length, LARGE_INTEGER Time)
Definition: arping.c:311
LARGE_INTEGER TicksPerMs
Definition: arping.c:36
UINT Sent
Definition: arping.c:39
DWORD SourceAddr
Definition: arping.c:29
#define IDS_REPLY_FROM
Definition: resource.h:18
#define ERROR_SUCCESS
Definition: deptool.c:10
@ Sign
Definition: msg.c:1064
#define swprintf
Definition: precomp.h:40
DWORD WINAPI SendARP(IPAddr DestIP, IPAddr SrcIP, PULONG pMacAddr, PULONG PhyAddrLen)
#define IDS_1MS
Definition: resource.h:14
static PLARGE_INTEGER Time
Definition: time.c:105
#define memset(x, y, z)
Definition: compat.h:39
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
LONGLONG QuadPart
Definition: typedefs.h:114
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
unsigned char BYTE
Definition: xxhash.c:193

◆ QueryTime()

static VOID QueryTime ( PLARGE_INTEGER  Time)
static

Definition at line 285 of file arping.c.

286{
288 {
290 {
291 /* This should not happen, but we fall
292 back to GetCurrentTick() if it does */
293 Time->u.LowPart = (ULONG)GetTickCount();
294 Time->u.HighPart = 0;
295
296 /* 1 tick per millisecond for GetCurrentTick() */
298 /* GetCurrentTick() cannot handle microseconds */
300
302 }
303 }
304 else
305 {
306 Time->u.LowPart = (ULONG)GetTickCount();
307 Time->u.HighPart = 0;
308 }
309}
BOOL UsePerformanceCounter
Definition: arping.c:38
LARGE_INTEGER TicksPerUs
Definition: arping.c:37
BOOL WINAPI QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount)
Definition: perfcnt.c:23
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
struct _LARGE_INTEGER::@2290 u

Referenced by Ping().

◆ Setup()

static BOOL Setup ( VOID  )
static

Definition at line 216 of file arping.c.

217{
218 WORD wVersionRequested;
219 WSADATA WsaData;
220 INT Status;
221 PHOSTENT phe;
222 CHAR aTargetName[256];
224
225 wVersionRequested = MAKEWORD(2, 2);
226
227 Status = WSAStartup(wVersionRequested, &WsaData);
228 if (Status != 0)
229 {
231 return FALSE;
232 }
233
234 if (!WideCharToMultiByte(CP_ACP, 0, TargetName, -1, aTargetName,
235 sizeof(aTargetName), NULL, NULL))
236 {
238 return FALSE;
239 }
240
241 phe = NULL;
242 TargetAddr = inet_addr(aTargetName);
243 if (TargetAddr == INADDR_NONE)
244 {
245 phe = gethostbyname(aTargetName);
246 if (phe == NULL)
247 {
249 return FALSE;
250 }
251
252 CopyMemory(&TargetAddr, phe->h_addr, phe->h_length);
253 }
254
255 Target.S_un.S_addr = TargetAddr;
256 swprintf(TargetIP, L"%d.%d.%d.%d", Target.S_un.S_un_b.s_b1,
257 Target.S_un.S_un_b.s_b2,
258 Target.S_un.S_un_b.s_b3,
259 Target.S_un.S_un_b.s_b4);
260
261 if (!WideCharToMultiByte(CP_ACP, 0, SourceName, -1, aTargetName,
262 sizeof(aTargetName), NULL, NULL))
263 {
265 return FALSE;
266 }
267
268 SourceAddr = inet_addr(aTargetName);
269 if (SourceAddr == INADDR_NONE)
270 {
272 return FALSE;
273 }
274
276
277 return TRUE;
278}
static BOOL WINAPI StopLoop(DWORD dwCtrlType)
Definition: arping.c:208
SOCKADDR_IN Target
Definition: arping.c:33
#define INADDR_NONE
Definition: tcp.c:42
#define IDS_UNKNOWN_HOST
Definition: resource.h:13
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine, BOOL Add)
Definition: console.c:2109
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
Definition: startup.c:113
unsigned short WORD
Definition: ntddk_ex.h:93
Status
Definition: gdiplustypes.h:25
PHOSTENT WSAAPI gethostbyname(IN const char FAR *name)
Definition: getxbyxx.c:221
#define inet_addr(cp)
Definition: inet.h:98
#define IDS_COULD_NOT_INIT_WINSOCK
Definition: resource.h:8
short h_length
Definition: winsock.h:137
Definition: tcpip.h:126
#define MAKEWORD(a, b)
Definition: typedefs.h:248
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
#define CopyMemory
Definition: winbase.h:1710

◆ StopLoop()

static BOOL WINAPI StopLoop ( DWORD  dwCtrlType)
static

Definition at line 208 of file arping.c.

209{
211 PingCount = 0;
212
213 return TRUE;
214}

Referenced by Setup().

◆ TimeToMsString()

static VOID TimeToMsString ( LPWSTR  String,
ULONG  Length,
LARGE_INTEGER  Time 
)
static

Definition at line 311 of file arping.c.

312{
313 WCHAR Convstr[40];
314 LARGE_INTEGER LargeTime;
315 LPWSTR ms;
316
318
319 _i64tow(LargeTime.QuadPart, Convstr, 10);
320 wcscpy(String, Convstr);
321 ms = String + wcslen(String);
323}
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
wchar_t *CDECL _i64tow(__int64 value, wchar_t *string, int radix)
Definition: itow.c:17
#define IDS_MS
Definition: resource.h:13
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433

Referenced by Ping().

◆ Usage()

static VOID Usage ( VOID  )
static

Definition at line 112 of file arping.c.

113{
115}
#define IDS_USAGE
Definition: resource.h:3

◆ wmain()

int wmain ( int  argc,
LPWSTR  argv[] 
)

Definition at line 371 of file arping.c.

372{
373 UINT Count;
374 LARGE_INTEGER PerformanceCounterFrequency;
375
376 PingCount = 4;
377 Timeout = 1000;
379
380 UsePerformanceCounter = QueryPerformanceFrequency(&PerformanceCounterFrequency);
381
383 {
384 /* Performance counters may return incorrect results on some multiprocessor
385 platforms so we restrict execution on the first processor. This may fail
386 on Windows NT so we fall back to GetCurrentTick() for timing */
389
390 /* Convert frequency to ticks per millisecond */
391 TicksPerMs.QuadPart = PerformanceCounterFrequency.QuadPart / 1000;
392 /* And to ticks per microsecond */
393 TicksPerUs.QuadPart = PerformanceCounterFrequency.QuadPart / 1000000;
394 }
396 {
397 /* 1 tick per millisecond for GetCurrentTick() */
399 /* GetCurrentTick() cannot handle microseconds */
401 }
402
403 if (!ParseCmdline(argc, argv) || !Setup())
404 {
405 return 1;
406 }
407
409
410 Count = 0;
411 while (Count < PingCount || NeverStop)
412 {
413 Ping();
414 Count++;
415 if (Count < PingCount || NeverStop)
416 Sleep(Timeout);
417 }
418
419 Cleanup();
420
422
423 return 0;
424}
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE ACPI_ADR_SPACE_HANDLER ACPI_ADR_SPACE_SETUP Setup
Definition: acpixf.h:834
ULONG Timeout
Definition: arping.c:35
static BOOL ParseCmdline(int argc, LPWSTR argv[])
Definition: arping.c:117
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
BOOL WINAPI QueryPerformanceFrequency(OUT PLARGE_INTEGER lpFrequency)
Definition: perfcnt.c:45
DWORD_PTR WINAPI SetThreadAffinityMask(IN HANDLE hThread, IN DWORD_PTR dwThreadAffinityMask)
Definition: thread.c:662
static const WCHAR Cleanup[]
Definition: register.c:80
#define IDS_ARPING_STATISTICS
Definition: resource.h:16
#define IDS_ARPING_TO_FROM
Definition: resource.h:12
int Count
Definition: noreturn.cpp:7
static void Ping(void)
Definition: ping.c:419
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
#define STD_OUTPUT_HANDLE
Definition: winbase.h:268
HANDLE WINAPI GetCurrentThread(void)
Definition: proc.c:1148

Variable Documentation

◆ hStdOutput

HANDLE hStdOutput

Definition at line 34 of file arping.c.

Referenced by FormatOutput(), test_pack_STARTUPINFOA(), test_pack_STARTUPINFOW(), and wmain().

◆ NeverStop

BOOL NeverStop

Definition at line 25 of file arping.c.

Referenced by ParseCmdline(), StopLoop(), and wmain().

◆ PingCount

UINT PingCount

Definition at line 26 of file arping.c.

Referenced by ParseCmdline(), StopLoop(), and wmain().

◆ Received

◆ Sent

UINT Sent

Definition at line 39 of file arping.c.

Referenced by handle_gdb_query(), HDA_SendVerbs(), Ping(), send_gdb_partial_binary(), and wmain().

◆ SourceAddr

DWORD SourceAddr

Definition at line 29 of file arping.c.

Referenced by Ping(), and Setup().

◆ SourceIP

WCHAR SourceIP[16]

Definition at line 32 of file arping.c.

◆ SourceName

◆ Target

Definition at line 33 of file arping.c.

Referenced by Setup().

◆ TargetAddr

DWORD TargetAddr

Definition at line 30 of file arping.c.

Referenced by Ping(), and Setup().

◆ TargetIP

WCHAR TargetIP[16]

Definition at line 31 of file arping.c.

Referenced by Ping(), Setup(), and wmain().

◆ TargetName

WCHAR TargetName[256]

Definition at line 27 of file arping.c.

Referenced by ParseCmdline(), and Setup().

◆ TicksPerMs

LARGE_INTEGER TicksPerMs

Definition at line 36 of file arping.c.

Referenced by Ping(), QueryTime(), TimeToMsString(), and wmain().

◆ TicksPerUs

LARGE_INTEGER TicksPerUs

Definition at line 37 of file arping.c.

Referenced by QueryTime(), and wmain().

◆ Timeout

Definition at line 35 of file arping.c.

Referenced by wmain().

◆ UsePerformanceCounter

BOOL UsePerformanceCounter

Definition at line 38 of file arping.c.

Referenced by QueryTime(), and wmain().