iparp.h

来自「几个用c语言写的网络协议实践的程序」· C头文件 代码 · 共 31 行

H
31
字号
#ifndef _IPARP_H
#define _IPARP_H

#include <windows.h>
#include <winsock.h>
#include <iphlpapi.h>
#include <assert.h>
#include <stdlib.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <iptypes.h>


void  PrintIpNetTable(PMIB_IPNETTABLE pIpNetTable);
DWORD MyGetIpNetTable(PMIB_IPNETTABLE & pIpArpTab, bool fOrder = FALSE);
DWORD MyGetIpAddrTable(PMIB_IPADDRTABLE& pIpAddrTable, bool fOrder = FALSE);
void  PrintIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable);

void DoGetIpNetTable();
void DoSetIpNetEntry(char* pszDottedInetAddr, char* pszPhysAddr, char* pszInterface = NULL);
void DoDeleteIpNetEntry(char* pszInetAddr, char* pszInterface = NULL);

bool PhysAddrToString(BYTE PhysAddr[], DWORD PhysAddrLen, char str[]);
int  StringToPhysAddr(char* szInEther, char* szOutEther);
bool InterfaceIdxToInterfaceIp(PMIB_IPADDRTABLE pIpAddrTable, DWORD dwIndex, char str[]);


#endif //_IPARP_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?