可以参考如下文章:
http://linux.vbird.org/linux_server/0110network_basic.php#ipandmac_head
tcp连接的第一次握手
============
15:20:16.299527 00:22:19:4f:7a:09 > 00:22:19:4f:7c:f2, ethertype IPv4 (0x0800), length 62: IP 192.168.20.17.2513 > localhost.localdomain.9900: S 2733155023:2733155023(0) win 65535 <mss 1460,nop,nop,sackOK>
0x0000: 4500 0030 aabb 4000 7b06 8ca1 c0a8 1411 E..0..@.{.......
0x0010: c0a8 3309 09d1 26ac a2e8 a2cf 0000 0000 ..3...&.........
0x0020: 7002 ffff 447f 0000 0204 05b4 0101 0402 p...D...........
IP Header
(1)前4位是Version,4代表IPv4
(2)接着4位是IHL,IP头的长度,是4字节的整数倍,最小的IP头长度为20字节,因此这里是5
(3)8位服务类型:PPPDTRUU
P:IP包的优先级;
D:0--一般延迟,1--