mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Added comments
This commit is contained in:
parent
68ddcc6ca7
commit
052be0a328
@ -773,7 +773,7 @@ tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next)
|
|||||||
}
|
}
|
||||||
cseg->next = next;
|
cseg->next = next;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* TCP_QUEUE_OOSEQ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by tcp_process. Checks if the given segment is an ACK for outstanding
|
* Called by tcp_process. Checks if the given segment is an ACK for outstanding
|
||||||
@ -793,7 +793,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
struct tcp_seg *next;
|
struct tcp_seg *next;
|
||||||
#if TCP_QUEUE_OOSEQ
|
#if TCP_QUEUE_OOSEQ
|
||||||
struct tcp_seg *prev, *cseg;
|
struct tcp_seg *prev, *cseg;
|
||||||
#endif
|
#endif /* TCP_QUEUE_OOSEQ */
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
s32_t off;
|
s32_t off;
|
||||||
s16_t m;
|
s16_t m;
|
||||||
@ -1161,6 +1161,9 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
(seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd));
|
(seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd));
|
||||||
}
|
}
|
||||||
#if TCP_QUEUE_OOSEQ
|
#if TCP_QUEUE_OOSEQ
|
||||||
|
/* Received in-sequence data, adjust ooseq data if:
|
||||||
|
- FIN has been received or
|
||||||
|
- inseq overlaps with ooseq */
|
||||||
if (pcb->ooseq != NULL) {
|
if (pcb->ooseq != NULL) {
|
||||||
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
|
if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
|
||||||
LWIP_DEBUGF(TCP_INPUT_DEBUG,
|
LWIP_DEBUGF(TCP_INPUT_DEBUG,
|
||||||
@ -1172,8 +1175,8 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
struct tcp_seg *old_ooseq = pcb->ooseq;
|
struct tcp_seg *old_ooseq = pcb->ooseq;
|
||||||
pcb->ooseq = pcb->ooseq->next;
|
pcb->ooseq = pcb->ooseq->next;
|
||||||
tcp_seg_free(old_ooseq);
|
tcp_seg_free(old_ooseq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
next = pcb->ooseq;
|
next = pcb->ooseq;
|
||||||
/* Remove all segments on ooseq that are covered by inseg already.
|
/* Remove all segments on ooseq that are covered by inseg already.
|
||||||
@ -1243,7 +1246,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
|
|
||||||
#if TCP_QUEUE_OOSEQ
|
#if TCP_QUEUE_OOSEQ
|
||||||
/* We now check if we have segments on the ->ooseq queue that
|
/* We now check if we have segments on the ->ooseq queue that
|
||||||
is now in sequence. */
|
are now in sequence. */
|
||||||
while (pcb->ooseq != NULL &&
|
while (pcb->ooseq != NULL &&
|
||||||
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
|
pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user