31#define WIN32_NO_STATUS
160 _stprintf(cMacAddr,
_T(
"%02x-%02x-%02x-%02x-%02x-%02x"),
170 switch (pIpAddRow->
dwType)
208 struct in_addr inaddr, inaddr2;
210 TCHAR szIntIpAddr[20];
220 if (pIpNetTable ==
NULL)
227 ZeroMemory(pIpNetTable,
sizeof(*pIpNetTable));
232 _tprintf(
_T(
"GetIpNetTable failed: %lu\n"), dwError);
252 if (pIpAddrTable ==
NULL)
259 ZeroMemory(pIpAddrTable,
sizeof(*pIpAddrTable));
264 _tprintf(
_T(
"GetIpAddrTable failed: %lu\n"), dwError);
276 strcpy(szIntIpAddr, pszIpAddr);
292 if (
strcmp(pszIpAddr, pszInetAddr) == 0)
324 if (
strcmp(pszIpAddr, pszInetAddr) == 0)
333 if (pIpNetTable !=
NULL)
335 if (pIpAddrTable !=
NULL)
361 if (pszInetAddr ==
NULL)
375 if (
strlen(pszEthAddr) != 17)
381 for (
i = 0;
i < 17;
i++)
399 if (pIpNetTable ==
NULL)
406 ZeroMemory(pIpNetTable,
sizeof(*pIpNetTable));
411 _tprintf(
_T(
"GetIpNetTable failed: %lu\n"), dwError);
418 if (pAddHost ==
NULL)
449 for (
i = 0;
i < 6;
i++)
463 pAddHost->
dwAddr = dwIpAddr;
479 if (pIpNetTable !=
NULL)
481 if (pAddHost !=
NULL)
507 if (pszInetAddr ==
NULL)
514 if (
strncmp(pszInetAddr,
"*", 1) == 0)
534 if (pIpNetTable ==
NULL)
541 ZeroMemory(pIpNetTable,
sizeof(*pIpNetTable));
546 _tprintf(
_T(
"GetIpNetTable failed: %lu\n"), dwError);
553 if (pDelHost ==
NULL)
578 if (bFlushTable !=
FALSE)
591 pDelHost->
dwAddr = dwIpAddr;
603 if (pIpNetTable !=
NULL)
605 if (pDelHost !=
NULL)
637 if (
argv[1][0] !=
'-')
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
VOID PrintMessage(DWORD dwMessage)
DWORD DisplayArpEntries(PTCHAR pszInetAddr, PTCHAR pszIfAddr)
VOID PrintMessageV(DWORD dwMessage,...)
DWORD DoFormatMessage(VOID)
DWORD Addhost(PTCHAR pszInetAddr, PTCHAR pszEthAddr, PTCHAR pszIfAddr)
DWORD PrintEntries(PMIB_IPNETROW pIpAddRow)
DWORD Deletehost(PTCHAR pszInetAddr, PTCHAR pszIfAddr)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
static void cleanup(void)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
DWORD WINAPI DeleteIpNetEntry(PMIB_IPNETROW pArpEntry)
DWORD WINAPI FlushIpNetTable(DWORD dwIfIndex)
DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOrder)
DWORD WINAPI SetIpNetEntry(PMIB_IPNETROW pArpEntry)
DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL bOrder)
struct _MIB_IPNETTABLE * PMIB_IPNETTABLE
struct _MIB_IPNETROW MIB_IPNETROW
struct _MIB_IPNETROW * PMIB_IPNETROW
struct _MIB_IPADDRTABLE * PMIB_IPADDRTABLE
_In_ NDIS_ERROR_CODE ErrorCode
BYTE bPhysAddr[MAXLEN_PHYSADDR]
union in_addr::@1029 S_un
#define LANG_USER_DEFAULT
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
DWORD WINAPI GetLastError(void)
#define FORMAT_MESSAGE_IGNORE_INSERTS
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
#define FORMAT_MESSAGE_FROM_HMODULE