摘要: //Mac头部,总长度14字节typedef struct _eth_hdr{unsigned char dstmac[6]; //目标mac地址unsigned char srcmac[6]; //源mac地址unsigned short eth_type; //以太网类型}eth_hdr;//IP头部,总长度20字节typedef struct _ip_hdr{#if LITTLE_ENDIANunsigned char ihl:4; //首部长度unsigned char version:4, //版本#else www.2cto.com unsigned char version:4. 阅读全文
posted @ 2013-01-01 21:01 fly1988happy 阅读(2223) 评论(0) 推荐(0) 编辑