Lines Matching refs:th

94 			       __be32 daddr, __be32 saddr, const struct tcphdr *th);
360 struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2)); in tcp_v4_err() local
375 th->dest, iph->saddr, ntohs(th->source), in tcp_v4_err()
385 seq = ntohl(th->seq); in tcp_v4_err()
543 struct tcphdr *th = tcp_hdr(skb); in __tcp_v4_send_check() local
546 th->check = ~tcp_v4_check(skb->len, saddr, daddr, 0); in __tcp_v4_send_check()
550 th->check = tcp_v4_check(skb->len, saddr, daddr, in __tcp_v4_send_check()
551 csum_partial(th, in __tcp_v4_send_check()
552 th->doff << 2, in __tcp_v4_send_check()
581 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_reset() local
583 struct tcphdr th; in tcp_v4_send_reset() member
599 if (th->rst) in tcp_v4_send_reset()
610 rep.th.dest = th->source; in tcp_v4_send_reset()
611 rep.th.source = th->dest; in tcp_v4_send_reset()
612 rep.th.doff = sizeof(struct tcphdr) / 4; in tcp_v4_send_reset()
613 rep.th.rst = 1; in tcp_v4_send_reset()
615 if (th->ack) { in tcp_v4_send_reset()
616 rep.th.seq = th->ack_seq; in tcp_v4_send_reset()
618 rep.th.ack = 1; in tcp_v4_send_reset()
619 rep.th.ack_seq = htonl(ntohl(th->seq) + th->syn + th->fin + in tcp_v4_send_reset()
620 skb->len - (th->doff << 2)); in tcp_v4_send_reset()
625 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_reset()
629 hash_location = tcp_parse_md5sig_option(th); in tcp_v4_send_reset()
640 th->source, ip_hdr(skb)->daddr, in tcp_v4_send_reset()
641 ntohs(th->source), inet_iif(skb)); in tcp_v4_send_reset()
667 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_reset()
671 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_reset()
714 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_ack() local
716 struct tcphdr th; in tcp_v4_send_ack() member
725 memset(&rep.th, 0, sizeof(struct tcphdr)); in tcp_v4_send_ack()
729 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_ack()
740 rep.th.dest = th->source; in tcp_v4_send_ack()
741 rep.th.source = th->dest; in tcp_v4_send_ack()
742 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_ack()
743 rep.th.seq = htonl(seq); in tcp_v4_send_ack()
744 rep.th.ack_seq = htonl(ack); in tcp_v4_send_ack()
745 rep.th.ack = 1; in tcp_v4_send_ack()
746 rep.th.window = htons(win); in tcp_v4_send_ack()
757 rep.th.doff = arg.iov[0].iov_len/4; in tcp_v4_send_ack()
761 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_ack()
1040 __be32 daddr, __be32 saddr, const struct tcphdr *th) in tcp_v4_md5_hash_hdr() argument
1052 if (tcp_v4_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) in tcp_v4_md5_hash_hdr()
1054 if (tcp_md5_hash_header(hp, th)) in tcp_v4_md5_hash_hdr()
1077 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_md5_hash_skb() local
1099 if (tcp_md5_hash_header(hp, th)) in tcp_v4_md5_hash_skb()
1101 if (tcp_md5_hash_skb_data(hp, skb, th->doff << 2)) in tcp_v4_md5_hash_skb()
1134 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_inbound_md5_hash() local
1140 hash_location = tcp_parse_md5sig_option(th); in tcp_v4_inbound_md5_hash()
1165 &iph->saddr, ntohs(th->source), in tcp_v4_inbound_md5_hash()
1166 &iph->daddr, ntohs(th->dest), in tcp_v4_inbound_md5_hash()
1347 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_hnd_req() local
1352 req = inet_csk_search_req(sk, th->source, iph->saddr, iph->daddr); in tcp_v4_hnd_req()
1361 th->source, iph->daddr, th->dest, inet_iif(skb)); in tcp_v4_hnd_req()
1373 if (!th->syn) in tcp_v4_hnd_req()
1454 const struct tcphdr *th; in tcp_v4_early_demux() local
1464 th = tcp_hdr(skb); in tcp_v4_early_demux()
1466 if (th->doff < sizeof(struct tcphdr) / 4) in tcp_v4_early_demux()
1470 iph->saddr, th->source, in tcp_v4_early_demux()
1471 iph->daddr, ntohs(th->dest), in tcp_v4_early_demux()
1550 const struct tcphdr *th; in tcp_v4_rcv() local
1564 th = tcp_hdr(skb); in tcp_v4_rcv()
1566 if (th->doff < sizeof(struct tcphdr) / 4) in tcp_v4_rcv()
1568 if (!pskb_may_pull(skb, th->doff * 4)) in tcp_v4_rcv()
1579 th = tcp_hdr(skb); in tcp_v4_rcv()
1588 TCP_SKB_CB(skb)->seq = ntohl(th->seq); in tcp_v4_rcv()
1589 TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + in tcp_v4_rcv()
1590 skb->len - th->doff * 4); in tcp_v4_rcv()
1591 TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); in tcp_v4_rcv()
1592 TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th); in tcp_v4_rcv()
1597 sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); in tcp_v4_rcv()
1653 if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) { in tcp_v4_rcv()
1677 if (skb->len < (th->doff << 2)) { in tcp_v4_rcv()
1685 switch (tcp_timewait_state_process(inet_twsk(sk), skb, th)) { in tcp_v4_rcv()
1689 iph->saddr, th->source, in tcp_v4_rcv()
1690 iph->daddr, th->dest, in tcp_v4_rcv()