#define ICMP_MIN 8 //ICMP报头的最小字节数
#define MAXIPHEADER 60 //IP数据报的最大字节数
#define MAXNUM 10 //定义发送的报文的次数数
// IP header
typedef struct tagIPHEADER {
unsigned char h_len:4; // length of the header
unsigned char version:4; // Version of IP
unsigned char tos; // Type of service
unsigned short total_len; // total length of the packet
unsigned short ident; // unique identifier
unsigned short frag_and_flags; // flags
unsigned char ttl;
unsigned char proto; // protocol (TCP, UDP etc)
unsigned short checksum; // IP checksum