简单的发包程序,可以发送TCCP,UDP,ICMP等数据包 WinSock-NDIS 网络编程
文件大小: 305k
源码售价: 10 个金币 积分规则     积分充值
资源说明:构造等都写好了,你只需使用即可 #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; };
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。