Lines Matching full:th
97 __be32 daddr, __be32 saddr, const struct tcphdr *th);
494 struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in tcp_v4_err() local
504 sk = __inet_lookup_established(net, iph->daddr, th->dest, iph->saddr, in tcp_v4_err()
505 ntohs(th->source), inet_iif(skb), 0); in tcp_v4_err()
516 seq = ntohl(th->seq); in tcp_v4_err()
619 ip_icmp_error(sk, skb, err, th->dest, info, (u8 *)th); in tcp_v4_err()
720 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_reset() local
722 struct tcphdr th; in tcp_v4_send_reset() member
739 if (th->rst) in tcp_v4_send_reset()
750 rep.th.dest = th->source; in tcp_v4_send_reset()
751 rep.th.source = th->dest; in tcp_v4_send_reset()
752 rep.th.doff = sizeof(struct tcphdr) / 4; in tcp_v4_send_reset()
753 rep.th.rst = 1; in tcp_v4_send_reset()
755 if (th->ack) { in tcp_v4_send_reset()
756 rep.th.seq = th->ack_seq; in tcp_v4_send_reset()
758 rep.th.ack = 1; in tcp_v4_send_reset()
759 rep.th.ack_seq = htonl(ntohl(th->seq) + th->syn + th->fin + in tcp_v4_send_reset()
760 skb->len - (th->doff << 2)); in tcp_v4_send_reset()
765 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_reset()
773 if (aoh && tcp_v4_ao_sign_reset(sk, skb, aoh, &arg, &rep.th, rep.opt)) in tcp_v4_send_reset()
802 th->source, ip_hdr(skb)->daddr, in tcp_v4_send_reset()
803 ntohs(th->source), dif, sdif); in tcp_v4_send_reset()
829 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_reset()
833 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_reset()
843 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_reset()
915 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_ack() local
917 struct tcphdr th; in tcp_v4_send_ack() member
925 memset(&rep.th, 0, sizeof(struct tcphdr)); in tcp_v4_send_ack()
929 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_ack()
940 rep.th.dest = th->source; in tcp_v4_send_ack()
941 rep.th.source = th->dest; in tcp_v4_send_ack()
942 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_ack()
943 rep.th.seq = htonl(seq); in tcp_v4_send_ack()
944 rep.th.ack_seq = htonl(ack); in tcp_v4_send_ack()
945 rep.th.ack = 1; in tcp_v4_send_ack()
946 rep.th.window = htons(win); in tcp_v4_send_ack()
957 rep.th.doff = arg.iov[0].iov_len/4; in tcp_v4_send_ack()
961 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_ack()
973 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_ack()
979 &rep.th, key->sne); in tcp_v4_send_ack()
1544 const struct tcphdr *th, int nbytes) argument
1556 h.tcp = *th;
1563 __be32 daddr, __be32 saddr, const struct tcphdr *th) argument
1568 tcp_v4_md5_hash_headers(&ctx, daddr, saddr, th, th->doff << 2);
1577 const struct tcphdr *th = tcp_hdr(skb); local
1591 tcp_v4_md5_hash_headers(&ctx, daddr, saddr, th, skb->len);
1592 tcp_md5_hash_skb_data(&ctx, skb, th->doff << 2);
1794 const struct tcphdr *th = tcp_hdr(skb); local
1796 if (!th->syn)
1803 struct tcphdr *th, u32 *cookie) argument
1808 &tcp_request_sock_ipv4_ops, sk, th);
1810 *cookie = __cookie_v4_init_sequence(iph, th, &mss);
1907 const struct tcphdr *th; local
1940 th = (const struct tcphdr *)skb->data;
1941 hdrlen = th->doff * 4;
1958 thtail->doff != th->doff ||
1959 memcmp(thtail + 1, th + 1, hdrlen - sizeof(*th)) ||
1979 thtail->window = th->window;
1990 thtail->fin |= th->fin;
2048 const struct tcphdr *th) argument
2057 TCP_SKB_CB(skb)->seq = ntohl(th->seq);
2058 TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin +
2059 skb->len - th->doff * 4);
2060 TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq);
2061 TCP_SKB_CB(skb)->tcp_flags = tcp_flags_ntohs(th);
2080 const struct tcphdr *th; local
2096 th = (const struct tcphdr *)skb->data;
2098 if (unlikely(th->doff < sizeof(struct tcphdr) / 4)) {
2102 if (!pskb_may_pull(skb, th->doff * 4))
2107 * provided case of th->doff==0 is eliminated.
2113 th = (const struct tcphdr *)skb->data;
2116 sk = __inet_lookup_skb(skb, __tcp_hdrlen(th), th->source,
2117 th->dest, sdif, &refcounted);
2165 th = (const struct tcphdr *)skb->data;
2167 tcp_v4_fill_cb(skb, iph, th);
2229 th = (const struct tcphdr *)skb->data;
2231 tcp_v4_fill_cb(skb, iph, th);
2265 tcp_v4_fill_cb(skb, iph, th);
2297 tcp_v4_fill_cb(skb, iph, th);
2304 tw_status = tcp_timewait_state_process(inet_twsk(sk), skb, th, &isn,
2308 struct sock *sk2 = inet_lookup_listener(net, skb, __tcp_hdrlen(th),
2309 iph->saddr, th->source,
2310 iph->daddr, th->dest,