Lines Matching refs:th
94 __be32 daddr, __be32 saddr, const struct tcphdr *th);
358 struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2)); in tcp_v4_err() local
373 th->dest, iph->saddr, ntohs(th->source), in tcp_v4_err()
383 seq = ntohl(th->seq); in tcp_v4_err()
546 struct tcphdr *th = tcp_hdr(skb); in __tcp_v4_send_check() local
549 th->check = ~tcp_v4_check(skb->len, saddr, daddr, 0); in __tcp_v4_send_check()
553 th->check = tcp_v4_check(skb->len, saddr, daddr, in __tcp_v4_send_check()
554 csum_partial(th, in __tcp_v4_send_check()
555 th->doff << 2, in __tcp_v4_send_check()
584 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_reset() local
586 struct tcphdr th; in tcp_v4_send_reset() member
602 if (th->rst) in tcp_v4_send_reset()
613 rep.th.dest = th->source; in tcp_v4_send_reset()
614 rep.th.source = th->dest; in tcp_v4_send_reset()
615 rep.th.doff = sizeof(struct tcphdr) / 4; in tcp_v4_send_reset()
616 rep.th.rst = 1; in tcp_v4_send_reset()
618 if (th->ack) { in tcp_v4_send_reset()
619 rep.th.seq = th->ack_seq; in tcp_v4_send_reset()
621 rep.th.ack = 1; in tcp_v4_send_reset()
622 rep.th.ack_seq = htonl(ntohl(th->seq) + th->syn + th->fin + in tcp_v4_send_reset()
623 skb->len - (th->doff << 2)); in tcp_v4_send_reset()
628 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_reset()
632 hash_location = tcp_parse_md5sig_option(th); in tcp_v4_send_reset()
643 th->source, ip_hdr(skb)->daddr, in tcp_v4_send_reset()
644 ntohs(th->source), inet_iif(skb)); in tcp_v4_send_reset()
670 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_reset()
674 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_reset()
717 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_ack() local
719 struct tcphdr th; in tcp_v4_send_ack() member
728 memset(&rep.th, 0, sizeof(struct tcphdr)); in tcp_v4_send_ack()
732 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_ack()
743 rep.th.dest = th->source; in tcp_v4_send_ack()
744 rep.th.source = th->dest; in tcp_v4_send_ack()
745 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_ack()
746 rep.th.seq = htonl(seq); in tcp_v4_send_ack()
747 rep.th.ack_seq = htonl(ack); in tcp_v4_send_ack()
748 rep.th.ack = 1; in tcp_v4_send_ack()
749 rep.th.window = htons(win); in tcp_v4_send_ack()
760 rep.th.doff = arg.iov[0].iov_len/4; in tcp_v4_send_ack()
764 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_ack()
1042 __be32 daddr, __be32 saddr, const struct tcphdr *th) in tcp_v4_md5_hash_hdr() argument
1054 if (tcp_v4_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) in tcp_v4_md5_hash_hdr()
1056 if (tcp_md5_hash_header(hp, th)) in tcp_v4_md5_hash_hdr()
1079 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_md5_hash_skb() local
1101 if (tcp_md5_hash_header(hp, th)) in tcp_v4_md5_hash_skb()
1103 if (tcp_md5_hash_skb_data(hp, skb, th->doff << 2)) in tcp_v4_md5_hash_skb()
1139 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_inbound_md5_hash() local
1145 hash_location = tcp_parse_md5sig_option(th); in tcp_v4_inbound_md5_hash()
1170 &iph->saddr, ntohs(th->source), in tcp_v4_inbound_md5_hash()
1171 &iph->daddr, ntohs(th->dest), in tcp_v4_inbound_md5_hash()
1358 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_cookie_check() local
1360 if (!th->syn) in tcp_v4_cookie_check()
1441 const struct tcphdr *th; in tcp_v4_early_demux() local
1451 th = tcp_hdr(skb); in tcp_v4_early_demux()
1453 if (th->doff < sizeof(struct tcphdr) / 4) in tcp_v4_early_demux()
1457 iph->saddr, th->source, in tcp_v4_early_demux()
1458 iph->daddr, ntohs(th->dest), in tcp_v4_early_demux()
1537 const struct tcphdr *th; in tcp_v4_rcv() local
1551 th = tcp_hdr(skb); in tcp_v4_rcv()
1553 if (th->doff < sizeof(struct tcphdr) / 4) in tcp_v4_rcv()
1555 if (!pskb_may_pull(skb, th->doff * 4)) in tcp_v4_rcv()
1566 th = tcp_hdr(skb); in tcp_v4_rcv()
1575 TCP_SKB_CB(skb)->seq = ntohl(th->seq); in tcp_v4_rcv()
1576 TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + in tcp_v4_rcv()
1577 skb->len - th->doff * 4); in tcp_v4_rcv()
1578 TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); in tcp_v4_rcv()
1579 TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th); in tcp_v4_rcv()
1585 sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); in tcp_v4_rcv()
1698 switch (tcp_timewait_state_process(inet_twsk(sk), skb, th)) { in tcp_v4_rcv()
1702 iph->saddr, th->source, in tcp_v4_rcv()
1703 iph->daddr, th->dest, in tcp_v4_rcv()