Lines Matching refs:th
94 __be32 daddr, __be32 saddr, const struct tcphdr *th);
361 struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2)); in tcp_v4_err() local
376 th->dest, iph->saddr, ntohs(th->source), in tcp_v4_err()
386 seq = ntohl(th->seq); in tcp_v4_err()
551 struct tcphdr *th = tcp_hdr(skb); in __tcp_v4_send_check() local
554 th->check = ~tcp_v4_check(skb->len, saddr, daddr, 0); in __tcp_v4_send_check()
558 th->check = tcp_v4_check(skb->len, saddr, daddr, in __tcp_v4_send_check()
559 csum_partial(th, in __tcp_v4_send_check()
560 th->doff << 2, in __tcp_v4_send_check()
589 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_reset() local
591 struct tcphdr th; in tcp_v4_send_reset() member
607 if (th->rst) in tcp_v4_send_reset()
618 rep.th.dest = th->source; in tcp_v4_send_reset()
619 rep.th.source = th->dest; in tcp_v4_send_reset()
620 rep.th.doff = sizeof(struct tcphdr) / 4; in tcp_v4_send_reset()
621 rep.th.rst = 1; in tcp_v4_send_reset()
623 if (th->ack) { in tcp_v4_send_reset()
624 rep.th.seq = th->ack_seq; in tcp_v4_send_reset()
626 rep.th.ack = 1; in tcp_v4_send_reset()
627 rep.th.ack_seq = htonl(ntohl(th->seq) + th->syn + th->fin + in tcp_v4_send_reset()
628 skb->len - (th->doff << 2)); in tcp_v4_send_reset()
633 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_reset()
637 hash_location = tcp_parse_md5sig_option(th); in tcp_v4_send_reset()
648 th->source, ip_hdr(skb)->daddr, in tcp_v4_send_reset()
649 ntohs(th->source), inet_iif(skb)); in tcp_v4_send_reset()
675 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_reset()
679 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_reset()
723 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_ack() local
725 struct tcphdr th; in tcp_v4_send_ack() member
735 memset(&rep.th, 0, sizeof(struct tcphdr)); in tcp_v4_send_ack()
739 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_ack()
750 rep.th.dest = th->source; in tcp_v4_send_ack()
751 rep.th.source = th->dest; in tcp_v4_send_ack()
752 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_ack()
753 rep.th.seq = htonl(seq); in tcp_v4_send_ack()
754 rep.th.ack_seq = htonl(ack); in tcp_v4_send_ack()
755 rep.th.ack = 1; in tcp_v4_send_ack()
756 rep.th.window = htons(win); in tcp_v4_send_ack()
767 rep.th.doff = arg.iov[0].iov_len/4; in tcp_v4_send_ack()
771 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_ack()
1056 __be32 daddr, __be32 saddr, const struct tcphdr *th) in tcp_v4_md5_hash_hdr() argument
1068 if (tcp_v4_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) in tcp_v4_md5_hash_hdr()
1070 if (tcp_md5_hash_header(hp, th)) in tcp_v4_md5_hash_hdr()
1093 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_md5_hash_skb() local
1115 if (tcp_md5_hash_header(hp, th)) in tcp_v4_md5_hash_skb()
1117 if (tcp_md5_hash_skb_data(hp, skb, th->doff << 2)) in tcp_v4_md5_hash_skb()
1153 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_inbound_md5_hash() local
1159 hash_location = tcp_parse_md5sig_option(th); in tcp_v4_inbound_md5_hash()
1184 &iph->saddr, ntohs(th->source), in tcp_v4_inbound_md5_hash()
1185 &iph->daddr, ntohs(th->dest), in tcp_v4_inbound_md5_hash()
1375 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_cookie_check() local
1377 if (!th->syn) in tcp_v4_cookie_check()
1458 const struct tcphdr *th; in tcp_v4_early_demux() local
1468 th = tcp_hdr(skb); in tcp_v4_early_demux()
1470 if (th->doff < sizeof(struct tcphdr) / 4) in tcp_v4_early_demux()
1474 iph->saddr, th->source, in tcp_v4_early_demux()
1475 iph->daddr, ntohs(th->dest), in tcp_v4_early_demux()
1549 struct tcphdr *th = (struct tcphdr *)skb->data; in tcp_filter() local
1553 err = sk_filter_trim_cap(sk, skb, th->doff * 4); in tcp_filter()
1569 const struct tcphdr *th; in tcp_v4_rcv() local
1583 th = tcp_hdr(skb); in tcp_v4_rcv()
1585 if (th->doff < sizeof(struct tcphdr) / 4) in tcp_v4_rcv()
1587 if (!pskb_may_pull(skb, th->doff * 4)) in tcp_v4_rcv()
1598 th = tcp_hdr(skb); in tcp_v4_rcv()
1607 TCP_SKB_CB(skb)->seq = ntohl(th->seq); in tcp_v4_rcv()
1608 TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + in tcp_v4_rcv()
1609 skb->len - th->doff * 4); in tcp_v4_rcv()
1610 TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); in tcp_v4_rcv()
1611 TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th); in tcp_v4_rcv()
1617 sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); in tcp_v4_rcv()
1673 th = (const struct tcphdr *)skb->data; in tcp_v4_rcv()
1737 switch (tcp_timewait_state_process(inet_twsk(sk), skb, th)) { in tcp_v4_rcv()
1741 iph->saddr, th->source, in tcp_v4_rcv()
1742 iph->daddr, th->dest, in tcp_v4_rcv()