Lines Matching refs:th
87 __be32 daddr, __be32 saddr, const struct tcphdr *th);
427 struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2)); in tcp_v4_err() local
443 th->dest, iph->saddr, ntohs(th->source), in tcp_v4_err()
453 seq = ntohl(th->seq); in tcp_v4_err()
622 struct tcphdr *th = tcp_hdr(skb); in __tcp_v4_send_check() local
624 th->check = ~tcp_v4_check(skb->len, saddr, daddr, 0); in __tcp_v4_send_check()
653 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_reset() local
655 struct tcphdr th; in tcp_v4_send_reset() member
673 if (th->rst) in tcp_v4_send_reset()
684 rep.th.dest = th->source; in tcp_v4_send_reset()
685 rep.th.source = th->dest; in tcp_v4_send_reset()
686 rep.th.doff = sizeof(struct tcphdr) / 4; in tcp_v4_send_reset()
687 rep.th.rst = 1; in tcp_v4_send_reset()
689 if (th->ack) { in tcp_v4_send_reset()
690 rep.th.seq = th->ack_seq; in tcp_v4_send_reset()
692 rep.th.ack = 1; in tcp_v4_send_reset()
693 rep.th.ack_seq = htonl(ntohl(th->seq) + th->syn + th->fin + in tcp_v4_send_reset()
694 skb->len - (th->doff << 2)); in tcp_v4_send_reset()
699 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_reset()
704 hash_location = tcp_parse_md5sig_option(th); in tcp_v4_send_reset()
718 th->source, ip_hdr(skb)->daddr, in tcp_v4_send_reset()
719 ntohs(th->source), inet_iif(skb), in tcp_v4_send_reset()
744 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_reset()
748 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_reset()
808 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_ack() local
810 struct tcphdr th; in tcp_v4_send_ack() member
822 memset(&rep.th, 0, sizeof(struct tcphdr)); in tcp_v4_send_ack()
826 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_ack()
837 rep.th.dest = th->source; in tcp_v4_send_ack()
838 rep.th.source = th->dest; in tcp_v4_send_ack()
839 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_ack()
840 rep.th.seq = htonl(seq); in tcp_v4_send_ack()
841 rep.th.ack_seq = htonl(ack); in tcp_v4_send_ack()
842 rep.th.ack = 1; in tcp_v4_send_ack()
843 rep.th.window = htons(win); in tcp_v4_send_ack()
854 rep.th.doff = arg.iov[0].iov_len/4; in tcp_v4_send_ack()
858 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_ack()
1186 const struct tcphdr *th, int nbytes) in tcp_v4_md5_hash_headers() argument
1200 memcpy(_th, th, sizeof(*th)); in tcp_v4_md5_hash_headers()
1203 sg_init_one(&sg, bp, sizeof(*bp) + sizeof(*th)); in tcp_v4_md5_hash_headers()
1205 sizeof(*bp) + sizeof(*th)); in tcp_v4_md5_hash_headers()
1210 __be32 daddr, __be32 saddr, const struct tcphdr *th) in tcp_v4_md5_hash_hdr() argument
1222 if (tcp_v4_md5_hash_headers(hp, daddr, saddr, th, th->doff << 2)) in tcp_v4_md5_hash_hdr()
1246 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_md5_hash_skb() local
1266 if (tcp_v4_md5_hash_headers(hp, daddr, saddr, th, skb->len)) in tcp_v4_md5_hash_skb()
1268 if (tcp_md5_hash_skb_data(hp, skb, th->doff << 2)) in tcp_v4_md5_hash_skb()
1305 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_inbound_md5_hash() local
1311 hash_location = tcp_parse_md5sig_option(th); in tcp_v4_inbound_md5_hash()
1337 &iph->saddr, ntohs(th->source), in tcp_v4_inbound_md5_hash()
1338 &iph->daddr, ntohs(th->dest), in tcp_v4_inbound_md5_hash()
1517 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_cookie_check() local
1519 if (!th->syn) in tcp_v4_cookie_check()
1526 struct tcphdr *th, u32 *cookie) in tcp_v4_get_syncookie() argument
1531 &tcp_request_sock_ipv4_ops, sk, th); in tcp_v4_get_syncookie()
1533 *cookie = __cookie_v4_init_sequence(iph, th, &mss); in tcp_v4_get_syncookie()
1613 const struct tcphdr *th; in tcp_v4_early_demux() local
1623 th = tcp_hdr(skb); in tcp_v4_early_demux()
1625 if (th->doff < sizeof(struct tcphdr) / 4) in tcp_v4_early_demux()
1629 iph->saddr, th->source, in tcp_v4_early_demux()
1630 iph->daddr, ntohs(th->dest), in tcp_v4_early_demux()
1652 const struct tcphdr *th; in tcp_add_backlog() local
1681 th = (const struct tcphdr *)skb->data; in tcp_add_backlog()
1682 hdrlen = th->doff * 4; in tcp_add_backlog()
1707 thtail->doff != th->doff || in tcp_add_backlog()
1708 memcmp(thtail + 1, th + 1, hdrlen - sizeof(*th))) in tcp_add_backlog()
1713 thtail->window = th->window; in tcp_add_backlog()
1728 thtail->fin |= th->fin; in tcp_add_backlog()
1770 struct tcphdr *th = (struct tcphdr *)skb->data; in tcp_filter() local
1772 return sk_filter_trim_cap(sk, skb, th->doff * 4); in tcp_filter()
1783 const struct tcphdr *th) in tcp_v4_fill_cb() argument
1792 TCP_SKB_CB(skb)->seq = ntohl(th->seq); in tcp_v4_fill_cb()
1793 TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + in tcp_v4_fill_cb()
1794 skb->len - th->doff * 4); in tcp_v4_fill_cb()
1795 TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); in tcp_v4_fill_cb()
1796 TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th); in tcp_v4_fill_cb()
1814 const struct tcphdr *th; in tcp_v4_rcv() local
1828 th = (const struct tcphdr *)skb->data; in tcp_v4_rcv()
1830 if (unlikely(th->doff < sizeof(struct tcphdr) / 4)) in tcp_v4_rcv()
1832 if (!pskb_may_pull(skb, th->doff * 4)) in tcp_v4_rcv()
1843 th = (const struct tcphdr *)skb->data; in tcp_v4_rcv()
1846 sk = __inet_lookup_skb(&tcp_hashinfo, skb, __tcp_hdrlen(th), th->source, in tcp_v4_rcv()
1847 th->dest, sdif, &refcounted); in tcp_v4_rcv()
1881 th = (const struct tcphdr *)skb->data; in tcp_v4_rcv()
1883 tcp_v4_fill_cb(skb, iph, th); in tcp_v4_rcv()
1926 th = (const struct tcphdr *)skb->data; in tcp_v4_rcv()
1928 tcp_v4_fill_cb(skb, iph, th); in tcp_v4_rcv()
1965 tcp_v4_fill_cb(skb, iph, th); in tcp_v4_rcv()
1993 tcp_v4_fill_cb(skb, iph, th); in tcp_v4_rcv()
1999 switch (tcp_timewait_state_process(inet_twsk(sk), skb, th)) { in tcp_v4_rcv()
2003 __tcp_hdrlen(th), in tcp_v4_rcv()
2004 iph->saddr, th->source, in tcp_v4_rcv()
2005 iph->daddr, th->dest, in tcp_v4_rcv()