Lines Matching refs:next

170   for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
182 LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb);
184 prev->next = pcb->next;
185 pcb->next = tcp_active_pcbs;
188 LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
197 for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
216 for(lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
250 ((struct tcp_pcb_listen *)prev)->next = lpcb->next;
252 lpcb->next = tcp_listen_pcbs.listen_pcbs;
280 inseg.next = NULL;
656 pcb->unacked = rseg->next;
800 tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next)
806 tcp_segs_free(next);
807 next = NULL;
812 while (next &&
814 (next->tcphdr->seqno + next->len))) {
816 if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
819 old_seg = next;
820 next = next->next;
823 if (next &&
824 TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
826 cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
830 cseg->next = next;
849 struct tcp_seg *next;
1016 next = pcb->unacked;
1017 pcb->unacked = pcb->unacked->next;
1020 LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p)));
1022 if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) {
1026 pcb->snd_queuelen -= pbuf_clen(next->p);
1027 tcp_seg_free(next);
1062 next = pcb->unsent;
1063 pcb->unsent = pcb->unsent->next;
1070 LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p)));
1072 if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) {
1075 pcb->snd_queuelen -= pbuf_clen(next->p);
1076 tcp_seg_free(next);
1123 +) If the incoming segment contains data that is the next
1128 +) If the incoming segment has data that is above the next
1186 p = p->next;
1217 /* The incoming segment is the next in sequence. We check if
1255 pcb->ooseq = pcb->ooseq->next;
1259 next = pcb->ooseq;
1262 while (next &&
1264 next->tcphdr->seqno + next->len)) {
1266 if (TCPH_FLAGS(next->tcphdr) & TCP_FIN &&
1271 prev = next;
1272 next = next->next;
1277 if (next &&
1279 next->tcphdr->seqno)) {
1281 inseg.len = (u16_t)(next->tcphdr->seqno - seqno);
1288 (seqno + tcplen) == next->tcphdr->seqno);
1290 pcb->ooseq = next;
1358 pcb->ooseq = cseg->next;
1378 previous and the next segment on the ->ooseq queue. That is
1388 for(next = pcb->ooseq; next != NULL; next = next->next) {
1389 if (seqno == next->tcphdr->seqno) {
1394 if (inseg.len > next->len) {
1401 prev->next = cseg;
1405 tcp_oos_insert_segment(cseg, next);
1416 if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {
1424 tcp_oos_insert_segment(cseg, next);
1430 TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {*/
1431 if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno+1, next->tcphdr->seqno-1)) {
1434 the next segment on ->ooseq. We trim trim the previous
1435 segment, delete next segments that included in received segment
1444 prev->next = cseg;
1445 tcp_oos_insert_segment(cseg, next);
1450 /* If the "next" segment is the last segment on the
1453 if (next->next == NULL &&
1454 TCP_SEQ_GT(seqno, next->tcphdr->seqno)) {
1455 if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
1456 /* segment "next" already contains all data */
1459 next->next = tcp_seg_copy(&inseg);
1460 if (next->next != NULL) {
1461 if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) {
1463 next->len = (u16_t)(seqno - next->tcphdr->seqno);
1464 pbuf_realloc(next->p, next->len);
1472 if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) {
1475 TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) &~ TCP_FIN);
1478 next->next->len = pcb->rcv_nxt + pcb->rcv_wnd - seqno;
1479 pbuf_realloc(next->next->p, next->next->len);
1480 tcplen = TCP_TCPLEN(next->next);
1488 prev = next;
1497 for(next = pcb->ooseq; next != NULL; prev = next, next = next->next) {
1498 struct pbuf *p = next->p;
1504 tcp_segs_free(next);
1509 /* just dump 'next' and everything after it */
1510 prev->next = NULL;
1579 /* Advance to next option */
1599 /* Advance to next option */