Lines Matching refs:th
92 __be32 daddr, __be32 saddr, struct tcphdr *th);
334 struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in tcp_v4_err() local
349 sk = inet_lookup(net, &tcp_hashinfo, iph->daddr, th->dest, in tcp_v4_err()
350 iph->saddr, th->source, inet_iif(skb)); in tcp_v4_err()
371 seq = ntohl(th->seq); in tcp_v4_err()
410 req = inet_csk_search_req(sk, &prev, th->dest, in tcp_v4_err()
483 struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_check() local
486 th->check = ~tcp_v4_check(len, inet->saddr, in tcp_v4_send_check()
491 th->check = tcp_v4_check(len, inet->saddr, inet->daddr, in tcp_v4_send_check()
492 csum_partial(th, in tcp_v4_send_check()
493 th->doff << 2, in tcp_v4_send_check()
501 struct tcphdr *th; in tcp_v4_gso_send_check() local
503 if (!pskb_may_pull(skb, sizeof(*th))) in tcp_v4_gso_send_check()
507 th = tcp_hdr(skb); in tcp_v4_gso_send_check()
509 th->check = 0; in tcp_v4_gso_send_check()
510 th->check = ~tcp_v4_check(skb->len, iph->saddr, iph->daddr, 0); in tcp_v4_gso_send_check()
532 struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_reset() local
534 struct tcphdr th; in tcp_v4_send_reset() member
546 if (th->rst) in tcp_v4_send_reset()
554 rep.th.dest = th->source; in tcp_v4_send_reset()
555 rep.th.source = th->dest; in tcp_v4_send_reset()
556 rep.th.doff = sizeof(struct tcphdr) / 4; in tcp_v4_send_reset()
557 rep.th.rst = 1; in tcp_v4_send_reset()
559 if (th->ack) { in tcp_v4_send_reset()
560 rep.th.seq = th->ack_seq; in tcp_v4_send_reset()
562 rep.th.ack = 1; in tcp_v4_send_reset()
563 rep.th.ack_seq = htonl(ntohl(th->seq) + th->syn + th->fin + in tcp_v4_send_reset()
564 skb->len - (th->doff << 2)); in tcp_v4_send_reset()
569 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_reset()
580 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_reset()
584 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_reset()
610 struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_ack() local
612 struct tcphdr th; in tcp_v4_send_ack() member
622 memset(&rep.th, 0, sizeof(struct tcphdr)); in tcp_v4_send_ack()
626 arg.iov[0].iov_len = sizeof(rep.th); in tcp_v4_send_ack()
637 rep.th.dest = th->source; in tcp_v4_send_ack()
638 rep.th.source = th->dest; in tcp_v4_send_ack()
639 rep.th.doff = arg.iov[0].iov_len / 4; in tcp_v4_send_ack()
640 rep.th.seq = htonl(seq); in tcp_v4_send_ack()
641 rep.th.ack_seq = htonl(ack); in tcp_v4_send_ack()
642 rep.th.ack = 1; in tcp_v4_send_ack()
643 rep.th.window = htons(win); in tcp_v4_send_ack()
654 rep.th.doff = arg.iov[0].iov_len/4; in tcp_v4_send_ack()
658 ip_hdr(skb)->daddr, &rep.th); in tcp_v4_send_ack()
721 struct tcphdr *th = tcp_hdr(skb); in __tcp_v4_send_synack() local
723 th->check = tcp_v4_check(skb->len, in __tcp_v4_send_synack()
726 csum_partial(th, skb->len, in __tcp_v4_send_synack()
1013 __be32 daddr, __be32 saddr, struct tcphdr *th) in tcp_v4_md5_hash_hdr() argument
1025 if (tcp_v4_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) in tcp_v4_md5_hash_hdr()
1027 if (tcp_md5_hash_header(hp, th)) in tcp_v4_md5_hash_hdr()
1050 struct tcphdr *th = tcp_hdr(skb); in tcp_v4_md5_hash_skb() local
1075 if (tcp_md5_hash_header(hp, th)) in tcp_v4_md5_hash_skb()
1077 if (tcp_md5_hash_skb_data(hp, skb, th->doff << 2)) in tcp_v4_md5_hash_skb()
1109 struct tcphdr *th = tcp_hdr(skb); in tcp_v4_inbound_md5_hash() local
1114 hash_location = tcp_parse_md5sig_option(th); in tcp_v4_inbound_md5_hash()
1140 &iph->saddr, ntohs(th->source), in tcp_v4_inbound_md5_hash()
1141 &iph->daddr, ntohs(th->dest), in tcp_v4_inbound_md5_hash()
1405 struct tcphdr *th = tcp_hdr(skb); in tcp_v4_hnd_req() local
1410 struct request_sock *req = inet_csk_search_req(sk, &prev, th->source, in tcp_v4_hnd_req()
1416 th->source, iph->daddr, th->dest, inet_iif(skb)); in tcp_v4_hnd_req()
1428 if (!th->rst && !th->syn && th->ack) in tcp_v4_hnd_req()
1536 struct tcphdr *th; in tcp_v4_rcv() local
1550 th = tcp_hdr(skb); in tcp_v4_rcv()
1552 if (th->doff < sizeof(struct tcphdr) / 4) in tcp_v4_rcv()
1554 if (!pskb_may_pull(skb, th->doff * 4)) in tcp_v4_rcv()
1564 th = tcp_hdr(skb); in tcp_v4_rcv()
1566 TCP_SKB_CB(skb)->seq = ntohl(th->seq); in tcp_v4_rcv()
1567 TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + in tcp_v4_rcv()
1568 skb->len - th->doff * 4); in tcp_v4_rcv()
1569 TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); in tcp_v4_rcv()
1574 sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); in tcp_v4_rcv()
1618 if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) { in tcp_v4_rcv()
1640 if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) { in tcp_v4_rcv()
1645 switch (tcp_timewait_state_process(inet_twsk(sk), skb, th)) { in tcp_v4_rcv()
1649 iph->daddr, th->dest, in tcp_v4_rcv()
2420 struct tcphdr *th = tcp_hdr(skb); in tcp4_gro_complete() local
2422 th->check = ~tcp_v4_check(skb->len - skb_transport_offset(skb), in tcp4_gro_complete()