|
From: | Joel Cunningham |
Subject: | Re: [lwip-users] TCP 2.0.2 pcb->snd_nxt is not updated somewhere? |
Date: | Mon, 07 Aug 2017 09:32:14 -0500 |
This seems really strange. For an active open, sending of the SYN packet advances pcb->snd_nxt by 1. See the following code in tcp_output(): snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { pcb->snd_nxt = snd_nxt; } In tcp_priv.h: #define TCP_TCPLEN(seg) ((seg)->len + (((TCPH_FLAGS((seg)->tcphdr) & (TCP_FIN | TCP_SYN)) != 0) ? 1U : 0U)) Joel |
[Prev in Thread] | Current Thread | [Next in Thread] |