首先介绍一下1的补码,2的补码:(摘自http://blog.csdn.net/cradmin/article/details/3092559) 过1的补码,2的补码,到网上搜了下找到这个: It is the 1’s complement of the 1’s complement sum of all the 16-bit words in the TCP header and data 这是关于TCP头部校验和字段(checksum field)的说明.补码:补码是计算机中二进
一.IP数据报格式 IP数据报格式如下: 注:需要注意的是网络数据包以大端字节序传输,当然头部也得是大端字节序,也就是说: The most significant bit is numbered 0 at the left, and the least significant bit of a 32-bit value is numbered 31 on the right. The 4 bytes in the 32-bit value are transmitted in the orde