透析ICMP协议(3): 应用篇ping(ICMP.dll)
2006-04-04 11:09:38 来源:WEB开发网==================主函数==================
int main(int argc, char* argv[])
{
WSAData wsaData;
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
return 255;
}
int retval = doit(argc, argv);
WSACleanup();
return retval;
}
==================头文件==================
icmpdefs.h
//ICMP.DLL 函数中需要的结构
typedef struct {
unsigned char Ttl; // Time To Live
unsigned char Tos; // Type Of Service
unsigned char Flags; // IP header flags
unsigned char OptionsSize; // Size in bytes of options data
unsigned char *OptionsData; // Pointer to options data
} IP_OPTION_INFORMATION, * PIP_OPTION_INFORMATION;
typedef struct {
DWORD Address; // Replying address
unsigned long Status; // Reply status
unsigned long RoundTripTime; // RTT in milliseconds
unsigned short DataSize; // Echo data size
unsigned short Reserved; // Reserved for system use
void *Data; // Pointer to the echo data
IP_OPTION_INFORMATION Options; // Reply options
} IP_ECHO_REPLY, * PIP_ECHO_REPLY;
- ››协议显示苹果可随意屏蔽 iPhone 应用
- ››透析ICMP协议:协议原理
- ››透析ICMP协议(2):Windows Socket简介
- ››透析ICMP协议(3):应用篇ping(ICMP.dll)
- ››透析ICMP协议(4):应用篇ping(RAW Socket)
- ››透析:开放云计算宣言
- ››透析黑客攻击 抵御Web威胁十大妙招
- ››透析Photoshop的极坐标滤镜
- ››透析ICMP协议(2): Windows Socket 简介
- ››透析ICMP协议: 协议原理
- ››透析ICMP协议(3): 应用篇ping(ICMP.dll)
- ››透析ICMP协议(4): 应用篇ping(RAW Socket)
更多精彩
赞助商链接