作者:手机用户2502917553 | 来源:互联网 | 2023-10-09 19:49
TCPIP传输层文档随便找了个发送的TCP:7089ccee842c3c2c30a6a2d008004500004cc7a8400080060000c0a8010631eb6bda
随便找了个发送的TCP:
70 89 cc ee 84 2c 3c 2c 30 a6 a2 d0 08 00 45 00
00 4c c7 a8 40 00 80 06 00 00 c0 a8 01 06 31 eb
6b da b6 ef 0e 96 37 84 39 60 e1 c5 ad 22 50 18
ff ff 5f b2 00 00 ->54 4c 42 42 30 31 d5 01 18 00 00
2c 0b 84 80 58 0e 03 00 00 00 71 71 71 00 ff ff ff
ff 01 00 00 00 00 00 00
分解下每个部分
// TCP HEADER 20
70 89 cc ee 84 2c 3c 2c 30 a6 a2 d0 08 00 45 00 00 4c c7 a8
// optional part 34
40 00 80 06 00 00 c0 a8 01 06 31 eb 6b da b6 ef 0e 96 37 84 39 60 e1 c5 ad 22 50 18 ff ff 5f b2 00 00
// DATA 36
54 4c 42 42 30 31 d5 01 18 00 00 2c 0b 84 80 58 0e 03 00 00 00 71 71 71 00 ff ff ff ff 01 00 00 00 00 00 00
Total Length怎么来的的?
- 20+34+36=90
- 90-sizeof(WORD)-sizeof(WORD)-sizeof(DWORD)-sizeof(DWORD)-sizeof(WORD)=76
- 黄色区域是TotalLength