文件名称:简单的发包程序,可以发送TCCP,UDP,ICMP等数据包 WinSock-NDIS 网络编程
文件大小:305KB
文件格式:ZIP
更新时间:2016-11-29 06:35:11
TCCP UDP ICMP WinSock NDIS
构造等都写好了,你只需使用即可 #define ICMP 0x01 #define IGMP 0x02 #define TCP 0x06 #define UDP 0x11 typedef struct lp_interface { char in_protocol; char in_destaddr[16]; UINT in_destport; }LP_INTER; //_________________________________________________________________ class CSendIpPack { public: CSendIpPack(); virtual ~CSendIpPack(); LP_INTER m_p; UINT SendIP(DWORD m_sleep,int m_speed); UINT SendIP(int m_speed); UINT SendIP(); protected: LPSTR GetLocalIpAddr(); USHORT CheckSum(USHORT *buffer, int size); ////////////////////////////////////// protected: typedef struct ip_hdr { unsigned char ip_verlen; unsigned char ip_tos; unsigned short ip_totallength; unsigned short ip_id; unsigned short ip_offset; unsigned char ip_ttl; unsigned char ip_protocol; unsigned short ip_checksum; unsigned int ip_srcaddr; unsigned int ip_destaddr; }IP_HDR; typedef struct udp_hdr { unsigned short src_portno; unsigned short dst_portno; unsigned short udp_length; unsigned short udp_checksum; }UDP_HDR; };
【文件预览】:
MainDlg.cpp
s_020UY.BMP
Release
----IdsTest.exe(204KB)
IdsTest.rc
SendIpPack.cpp
SndipDlg.h
IdsTest.dsw
ndis说明.txt
icon1.ico
IdsTest.h
SetmemDlg.cpp
SndipDlg.cpp
IdsTest.ncb
IdsTest.cpp
SendIpPack.h
www.pudn.com.txt
IdsTest.aps
StdAfx.cpp
resource.h
StdAfx.h
IdsTest.opt
SetmemDlg.h
MainDlg.h
IdsTest.dsp
IdsTest.clw
IdsTest.plg