- 8
- 0
- 约2.97千字
- 约 3页
- 2023-05-03 发布于黑龙江
- 举报
第
第 PAGE 1 页 共 NUMPAGES 1 页
LwIP中TCP协议是如何实现的
payload; 18 19 /* 检查报文段是否有有效数据 */ 20 if (p-len p-tot_len)) 39 { 40 TCP_STATS_INC(tcp.lenerr); 41 goto dropped; 42 } 43 44 /* 移动pbuf指针,指向TCP报文段数据区域 */ 45 tcphdr_optlen = (u16_t)(hdrlen_bytes - TCP_HLEN); 46 tcphdr_opt2 = NULL; 47 if (p-len = hdrlen_bytes) 48 { 49 tcphdr_opt1len = tcphdr_optlen; 50 pbuf_remove_header(p, hdrlen_bytes); 51 } 52 53 /* 将TCP首部中的各字段内容提取出来。 */ 54 tcphdr-src = lwip_ntohs(tcphdr-src); 55 tcphdr-dest = lwip_ntohs(tcphdr-dest); 56
原创力文档

文档评论(0)