TCP包结构简介
来源:互联网 发布:cocos2d.js sdk 编辑:程序博客网 时间:2024/06/05 14:29
TCP Header
按照上图BIT坐标:
- 0-0 至 0-15 发送方端口;
- 0-16 至 0-31 接收方端口;
- 32-0 至 32-31 sequence number,TCP序列号;!!!
- 64-0 至 64-31 ack number,TCP确认号,为TCP序列号+1;
- 96-0 至 96-3 数据偏移量;
- 96-4 至 96-6 预留位;
- 96-7 至 96-15 FLAG 标志位;
- 96-16 至 96-31 缓冲区大小;
- 128-0 至 128-15 校验位;
- 128-16 至 128-31 标识urgent data的位置;
- 160-0 至 … 选项段;
TCP FLAG 标志位
- NS (1 bit): ECN-nonce - concealment protection (experimental: see RFC 3540).
- CWR (1 bit): Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment with the ECE flag set and had responded in congestion control mechanism (added to header by RFC 3168).
- ECE (1 bit): ECN-Echo has a dual role, depending on the value of the SYN flag. It indicates:
- If the SYN flag is set (1), that the TCP peer is ECN capable.
- If the SYN flag is clear (0), that a packet with Congestion Experienced flag set (ECN=11) in IP header was received during normal transmission (added to header by RFC 3168). This serves as an indication of network congestion (or impending congestion) to the TCP sender.
- URG (1 bit): indicates that the Urgent pointer field is significant
- ACK (1 bit): indicates that the Acknowledgment field is significant. All packets after the initial SYN packet sent by the client should have this flag set.
- PSH (1 bit): Push function. Asks to push the buffered data to the receiving application.
- RST (1 bit): Reset the connection
- SYN (1 bit): Synchronize sequence numbers. Only the first packet sent from each end should have this flag set. Some other flags and fields change meaning based on this flag, and some are only valid for when it is set, and others when it is clear.
- FIN (1 bit): Last packet from sender.
标志位对应的位置在上图中BIT坐标:96-7 至 96-15;
阅读全文
0 0
- TCP包结构简介
- TCP/IP包结构
- IP/TCP/UDP/RTP/RTCP包结构
- TCP/IP模型及包结构
- 结构体传输 & TCP粘包处理
- MAC、IPv4、UDP、TCP包结构分析
- 以太网数据包、IP包、TCP/UDP 包结构
- 以太网数据包、IP包、TCP/UDP 包结构
- 转载]MAC、IPv4、UDP、TCP包结构分析
- Tcp/ip学习笔记1_tcp包结构解析
- wireshark 分析 MAC、IPv4、UDP、TCP包结构
- TCP简介
- TCP 简介
- TCP简介
- TCP简介
- TCP简介
- TCP简介
- TCP简介
- OPT, LRU, FIFO页面调度算法的模拟
- Vulkan规范:第一章
- 提交文件
- Rightmost Digit
- 相邻最大矩形面积
- TCP包结构简介
- 判断对象存活方法及回收方法
- 欢迎使用CSDN-markdown编辑器
- 【1701H1】【穆晨】【171101】连续第二十二天总结
- Vulkan规范:第二章(1)
- 64-C++中的异常处理(上)
- Python实现 PAT 1003 我要通过
- CTFweb题型
- 【NOIP2017TG模拟2017.11.1】总结