/net/netfilter/ |
D | nf_conntrack_seqadj.c | 75 struct tcphdr *tcph, in nf_ct_sack_block_adjust() argument 105 inet_proto_csum_replace4(&tcph->check, skb, in nf_ct_sack_block_adjust() 107 inet_proto_csum_replace4(&tcph->check, skb, in nf_ct_sack_block_adjust() 118 struct tcphdr *tcph, in nf_ct_sack_adjust() argument 126 optend = protoff + tcph->doff * 4; in nf_ct_sack_adjust() 152 nf_ct_sack_block_adjust(skb, tcph, optoff + 2, in nf_ct_sack_adjust() 167 struct tcphdr *tcph; in nf_ct_seq_adjust() local 177 if (!skb_make_writable(skb, protoff + sizeof(*tcph))) in nf_ct_seq_adjust() 180 tcph = (void *)skb->data + protoff; in nf_ct_seq_adjust() 182 if (after(ntohl(tcph->seq), this_way->correction_pos)) in nf_ct_seq_adjust() [all …]
|
D | xt_TCPMSS.c | 86 struct tcphdr *tcph; in tcpmss_mangle_packet() local 104 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet() 105 tcp_hdrlen = tcph->doff * 4; in tcpmss_mangle_packet() 124 opt = (u_int8_t *)tcph; in tcpmss_mangle_packet() 141 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 167 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet() 184 opt = (u_int8_t *)tcph + sizeof(struct tcphdr); in tcpmss_mangle_packet() 187 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 194 inet_proto_csum_replace4(&tcph->check, skb, 0, *((__be32 *)opt), false); in tcpmss_mangle_packet() 196 oldval = ((__be16 *)tcph)[6]; in tcpmss_mangle_packet() [all …]
|
D | nf_nat_helper.c | 102 struct tcphdr *tcph; in __nf_nat_mangle_tcp_packet() local 115 tcph = (void *)skb->data + protoff; in __nf_nat_mangle_tcp_packet() 118 mangle_contents(skb, protoff + tcph->doff*4, in __nf_nat_mangle_tcp_packet() 124 l3proto->csum_recalc(skb, IPPROTO_TCP, tcph, &tcph->check, in __nf_nat_mangle_tcp_packet() 128 nf_ct_seqadj_set(ct, ctinfo, tcph->seq, in __nf_nat_mangle_tcp_packet()
|
D | xt_TCPOPTSTRIP.c | 38 struct tcphdr *tcph; in tcpoptstrip_mangle_packet() local 54 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpoptstrip_mangle_packet() 55 tcp_hdrlen = tcph->doff * 4; in tcpoptstrip_mangle_packet() 60 opt = (u_int8_t *)tcph; in tcpoptstrip_mangle_packet() 82 inet_proto_csum_replace2(&tcph->check, skb, htons(o), in tcpoptstrip_mangle_packet()
|
D | nf_conntrack_proto_tcp.c | 319 static unsigned int get_conntrack_index(const struct tcphdr *tcph) in get_conntrack_index() argument 321 if (tcph->rst) return TCP_RST_SET; in get_conntrack_index() 322 else if (tcph->syn) return (tcph->ack ? TCP_SYNACK_SET : TCP_SYN_SET); in get_conntrack_index() 323 else if (tcph->fin) return TCP_FIN_SET; in get_conntrack_index() 324 else if (tcph->ack) return TCP_ACK_SET; in get_conntrack_index() 360 const struct tcphdr *tcph) in segment_seq_plus_len() argument 364 return (seq + len - dataoff - tcph->doff*4 in segment_seq_plus_len() 365 + (tcph->syn ? 1 : 0) + (tcph->fin ? 1 : 0)); in segment_seq_plus_len() 379 const struct tcphdr *tcph, in tcp_options() argument 384 int length = (tcph->doff*4) - sizeof(struct tcphdr); in tcp_options() [all …]
|
D | xt_TPROXY.c | 116 struct tcphdr *tcph; in nf_tproxy_get_sock_v4() local 122 tcph = hp; in nf_tproxy_get_sock_v4() 125 __tcp_hdrlen(tcph), in nf_tproxy_get_sock_v4() 187 struct tcphdr *tcph; in nf_tproxy_get_sock_v6() local 193 tcph = hp; in nf_tproxy_get_sock_v6() 195 thoff + __tcp_hdrlen(tcph), in nf_tproxy_get_sock_v6()
|
D | nf_conntrack_pptp.c | 514 const struct tcphdr *tcph; in conntrack_pptp_help() local 531 tcph = skb_header_pointer(skb, nexthdr_off, sizeof(_tcph), &_tcph); in conntrack_pptp_help() 532 BUG_ON(!tcph); in conntrack_pptp_help() 533 nexthdr_off += tcph->doff * 4; in conntrack_pptp_help() 534 datalen = tcplen - tcph->doff * 4; in conntrack_pptp_help()
|
/net/ipv4/netfilter/ |
D | ipt_ECN.c | 50 struct tcphdr _tcph, *tcph; in set_ect_tcp() local 54 tcph = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph); in set_ect_tcp() 55 if (!tcph) in set_ect_tcp() 59 tcph->ece == einfo->proto.tcp.ece) && in set_ect_tcp() 61 tcph->cwr == einfo->proto.tcp.cwr)) in set_ect_tcp() 64 if (!skb_make_writable(skb, ip_hdrlen(skb) + sizeof(*tcph))) in set_ect_tcp() 66 tcph = (void *)ip_hdr(skb) + ip_hdrlen(skb); in set_ect_tcp() 68 oldval = ((__be16 *)tcph)[6]; in set_ect_tcp() 70 tcph->ece = einfo->proto.tcp.ece; in set_ect_tcp() 72 tcph->cwr = einfo->proto.tcp.cwr; in set_ect_tcp() [all …]
|
D | nf_reject_ipv4.c | 76 struct tcphdr *tcph; in nf_reject_ip_tcphdr_put() local 79 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); in nf_reject_ip_tcphdr_put() 80 memset(tcph, 0, sizeof(*tcph)); in nf_reject_ip_tcphdr_put() 81 tcph->source = oth->dest; in nf_reject_ip_tcphdr_put() 82 tcph->dest = oth->source; in nf_reject_ip_tcphdr_put() 83 tcph->doff = sizeof(struct tcphdr) / 4; in nf_reject_ip_tcphdr_put() 86 tcph->seq = oth->ack_seq; in nf_reject_ip_tcphdr_put() 88 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin + in nf_reject_ip_tcphdr_put() 91 tcph->ack = 1; in nf_reject_ip_tcphdr_put() 94 tcph->rst = 1; in nf_reject_ip_tcphdr_put() [all …]
|
/net/ipv6/netfilter/ |
D | nf_reject_ipv6.c | 94 struct tcphdr *tcph; in nf_reject_ip6_tcphdr_put() local 98 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); in nf_reject_ip6_tcphdr_put() 100 tcph->doff = sizeof(struct tcphdr)/4; in nf_reject_ip6_tcphdr_put() 101 tcph->source = oth->dest; in nf_reject_ip6_tcphdr_put() 102 tcph->dest = oth->source; in nf_reject_ip6_tcphdr_put() 106 tcph->seq = oth->ack_seq; in nf_reject_ip6_tcphdr_put() 107 tcph->ack_seq = 0; in nf_reject_ip6_tcphdr_put() 110 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin + in nf_reject_ip6_tcphdr_put() 112 tcph->seq = 0; in nf_reject_ip6_tcphdr_put() 116 ((u_int8_t *)tcph)[13] = 0; in nf_reject_ip6_tcphdr_put() [all …]
|
/net/netfilter/ipvs/ |
D | ip_vs_proto_tcp.c | 109 tcp_fast_csum_update(int af, struct tcphdr *tcph, in tcp_fast_csum_update() argument 116 tcph->check = in tcp_fast_csum_update() 119 ~csum_unfold(tcph->check)))); in tcp_fast_csum_update() 122 tcph->check = in tcp_fast_csum_update() 125 ~csum_unfold(tcph->check)))); in tcp_fast_csum_update() 130 tcp_partial_csum_update(int af, struct tcphdr *tcph, in tcp_partial_csum_update() argument 137 tcph->check = in tcp_partial_csum_update() 140 csum_unfold(tcph->check)))); in tcp_partial_csum_update() 143 tcph->check = in tcp_partial_csum_update() 146 csum_unfold(tcph->check)))); in tcp_partial_csum_update() [all …]
|
/net/core/ |
D | tso.c | 18 struct tcphdr *tcph; in tso_build_hdr() local 34 tcph = (struct tcphdr *)(hdr + skb_transport_offset(skb)); in tso_build_hdr() 35 put_unaligned_be32(tso->tcp_seq, &tcph->seq); in tso_build_hdr() 39 tcph->psh = 0; in tso_build_hdr() 40 tcph->fin = 0; in tso_build_hdr() 41 tcph->rst = 0; in tso_build_hdr()
|
/net/sched/ |
D | act_csum.c | 180 struct tcphdr *tcph; in tcf_csum_ipv4_tcp() local 186 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); in tcf_csum_ipv4_tcp() 187 if (tcph == NULL) in tcf_csum_ipv4_tcp() 191 tcph->check = 0; in tcf_csum_ipv4_tcp() 192 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv4_tcp() 193 tcph->check = tcp_v4_check(ipl - ihl, in tcf_csum_ipv4_tcp() 204 struct tcphdr *tcph; in tcf_csum_ipv6_tcp() local 210 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); in tcf_csum_ipv6_tcp() 211 if (tcph == NULL) in tcf_csum_ipv6_tcp() 215 tcph->check = 0; in tcf_csum_ipv6_tcp() [all …]
|
D | act_nat.c | 158 struct tcphdr *tcph; in tcf_nat() local 160 if (!pskb_may_pull(skb, ihl + sizeof(*tcph) + noff) || in tcf_nat() 161 skb_try_make_writable(skb, ihl + sizeof(*tcph) + noff)) in tcf_nat() 164 tcph = (void *)(skb_network_header(skb) + ihl); in tcf_nat() 165 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, in tcf_nat()
|