Lines Matching refs:th

315     struct mbuf *m, struct tcphdr *th, int tlen,  in tcp_reass_append()  argument
320 tcp_log_reassm(tp, last, NULL, th->th_seq, tlen, TCP_R_LOG_APPEND, 0); in tcp_reass_append()
325 last->tqe_flags |= (tcp_get_flags(th) & TH_FIN); in tcp_reass_append()
340 tcp_reass_prepend(struct tcpcb *tp, struct tseg_qent *first, struct mbuf *m, struct tcphdr *th, in tcp_reass_prepend() argument
346 tcp_log_reassm(tp, first, NULL, th->th_seq, tlen, TCP_R_LOG_PREPEND, 0); in tcp_reass_prepend()
348 if (SEQ_GT((th->th_seq + tlen), first->tqe_start)) { in tcp_reass_prepend()
350 i = (th->th_seq + tlen) - first->tqe_start; in tcp_reass_prepend()
362 first->tqe_start = th->th_seq; in tcp_reass_prepend()
516 tcp_reass(struct tcpcb *tp, struct tcphdr *th, tcp_seq *seq_start, in tcp_reass() argument
536 KASSERT(th == NULL || (seq_start != NULL && tlenp != NULL), in tcp_reass()
539 tp, th, seq_start, tlenp, m)); in tcp_reass()
544 if (th == NULL) in tcp_reass()
546 KASSERT(SEQ_GEQ(th->th_seq, tp->rcv_nxt), in tcp_reass()
548 th, tp)); in tcp_reass()
550 tcp_reass_log_new_in(tp, th->th_seq, *tlenp, m, TCP_R_LOG_ADD, NULL); in tcp_reass()
558 if ((*tlenp == 0) && ((tcp_get_flags(th) & TH_FIN) == 0)) { in tcp_reass()
575 (tcp_get_flags(th) & TH_FIN) && in tcp_reass()
592 if ((th->th_seq != tp->rcv_nxt || !TCPS_HAVEESTABLISHED(tp->t_state)) && in tcp_reass()
600 tcp_log_reassm(tp, NULL, NULL, th->th_seq, lenofoh, TCP_R_LOG_LIMIT_REACHED, 0); in tcp_reass()
602 if ((s = tcp_log_addrs(&inp->inp_inc, th, NULL, NULL))) { in tcp_reass()
621 if ((tcp_get_flags(th) & TH_FIN) && in tcp_reass()
622 SEQ_LT((th->th_seq + *tlenp), (last->tqe_start + last->tqe_len))) { in tcp_reass()
631 if ((SEQ_GEQ(th->th_seq, last->tqe_start)) && in tcp_reass()
632 (SEQ_GEQ((last->tqe_start + last->tqe_len), th->th_seq))) { in tcp_reass()
643 if (SEQ_GT((last->tqe_start + last->tqe_len), th->th_seq)) { in tcp_reass()
644 i = (last->tqe_start + last->tqe_len) - th->th_seq; in tcp_reass()
648 th->th_seq += i; in tcp_reass()
670 tcp_reass_append(tp, last, m, th, *tlenp, mlast, lenofoh); in tcp_reass()
675 } else if (SEQ_GT(th->th_seq, (last->tqe_start + last->tqe_len))) { in tcp_reass()
706 if (SEQ_LT(th->th_seq, first->tqe_start) && in tcp_reass()
707 SEQ_GEQ((th->th_seq + *tlenp),first->tqe_start) && in tcp_reass()
708 SEQ_LT((th->th_seq + *tlenp), (first->tqe_start + first->tqe_len))) { in tcp_reass()
732 if (SEQ_LT(th->th_seq, tp->rcv_nxt)) { in tcp_reass()
741 th->th_seq, tp->rcv_nxt, tp); in tcp_reass()
743 i = tp->rcv_nxt - th->th_seq; in tcp_reass()
748 th->th_seq += i; in tcp_reass()
755 tcp_reass_prepend(tp, first, m, th, *tlenp, mlast, lenofoh); in tcp_reass()
769 } else if (SEQ_LT((th->th_seq + *tlenp), first->tqe_start)) { in tcp_reass()
787 if (SEQ_GT(q->tqe_start, th->th_seq)) in tcp_reass()
799 if (SEQ_LT((th->th_seq + *tlenp), q->tqe_start) && in tcp_reass()
800 ((p == NULL) || (SEQ_GT(th->th_seq, (p->tqe_start + p->tqe_len))))) { in tcp_reass()
815 (SEQ_LEQ(th->th_seq, (p->tqe_start + p->tqe_len)))) { in tcp_reass()
821 i = p->tqe_start + p->tqe_len - th->th_seq; in tcp_reass()
859 th->th_seq += i; in tcp_reass()
862 if (th->th_seq == (p->tqe_start + p->tqe_len)) { in tcp_reass()
874 tcp_reass_append(tp, p, m, th, *tlenp, mlast, lenofoh); in tcp_reass()
879 th->th_seq, p->tqe_start, p->tqe_len, in tcp_reass()
897 if (SEQ_GEQ((th->th_seq + *tlenp), (q->tqe_start + q->tqe_len))) { in tcp_reass()
908 tcp_reass_replace(tp, q, m, th->th_seq, *tlenp, mlast, lenofoh, tcp_get_flags(th)); in tcp_reass()
921 tcp_reass_prepend(tp, q, m, th, *tlenp, mlast, lenofoh); in tcp_reass()
955 if (th->th_seq == tp->rcv_nxt && TCPS_HAVEESTABLISHED(tp->t_state)) { in tcp_reass()
957 flags = tcp_get_flags(th) & TH_FIN; in tcp_reass()
981 if ((s = tcp_log_addrs(&inp->inp_inc, th, NULL, NULL))) { in tcp_reass()
997 if ((s = tcp_log_addrs(&inp->inp_inc, th, NULL, NULL))) { in tcp_reass()
1018 if ((s = tcp_log_addrs(&inp->inp_inc, th, NULL, NULL))) { in tcp_reass()
1031 te->tqe_flags = tcp_get_flags(th); in tcp_reass()
1033 te->tqe_start = th->th_seq; in tcp_reass()
1043 tcp_reass_log_new_in(tp, th->th_seq, *tlenp, m, TCP_R_LOG_NEW_ENTRY, te); in tcp_reass()
1072 if (th != NULL) { in tcp_reass()
1073 tcp_log_reassm(tp, q, NULL, th->th_seq, *tlenp, TCP_R_LOG_READ, 1); in tcp_reass()
1081 if (th != NULL) { in tcp_reass()
1082 tcp_log_reassm(tp, q, NULL, th->th_seq, *tlenp, TCP_R_LOG_READ, 2); in tcp_reass()
1101 if (th != NULL) { in tcp_reass()
1102 tcp_log_reassm(tp, NULL, NULL, th->th_seq, *tlenp, TCP_R_LOG_ZERO, 0); in tcp_reass()