Home
last modified time | relevance | path

Searched refs:tcphdr (Results 1 – 25 of 211) sorted by relevance

123456789

/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dcgroup_tcp_skb.c48 static int egress_accept(struct tcphdr *tcph) in egress_accept()
61 static int ingress_accept(struct tcphdr *tcph) in ingress_accept()
84 static int egress_connect(struct tcphdr *tcph) in egress_connect()
208 struct tcphdr tcph; in server_egress()
231 struct tcphdr tcph; in server_ingress()
254 struct tcphdr tcph; in server_egress_srv()
277 struct tcphdr tcph; in server_ingress_srv()
300 struct tcphdr tcph; in client_egress_srv()
323 struct tcphdr tcph; in client_ingress_srv()
346 struct tcphdr tcph; in client_egress()
[all …]
H A Dtest_parse_tcp_hdr_opt_dynptr.c77 __u8 buffer[sizeof(struct tcphdr)] = {}; in xdp_ingress_v6()
79 struct tcphdr *tcp_hdr; in xdp_ingress_v6()
94 tcp_hdr_opt_len = (tcp_hdr->doff * 4) - sizeof(struct tcphdr); in xdp_ingress_v6()
100 off += sizeof(struct tcphdr); in xdp_ingress_v6()
H A Dtest_parse_tcp_hdr_opt.c88 struct tcphdr *tcp_hdr; in xdp_ingress_v6()
93 tcp_hdr = (struct tcphdr *)(data + tcp_offset); in xdp_ingress_v6()
97 tcp_hdr_opt_len = (tcp_hdr->doff * 4) - sizeof(struct tcphdr); in xdp_ingress_v6()
102 opt_state.byte_offset = sizeof(struct tcphdr) + tcp_offset; in xdp_ingress_v6()
H A Dtest_tcpbpf_kern.c34 char header[sizeof(struct ipv6hdr) + sizeof(struct tcphdr)]; in bpf_testcb()
36 struct tcphdr *thdr; in bpf_testcb()
108 sizeof(struct tcphdr))); in bpf_testcb()
112 thdr = (struct tcphdr *)(header + offset); in bpf_testcb()
H A Dtest_pkt_access.c89 struct tcphdr *tcp = NULL; in test_pkt_write_access_subprog()
108 struct tcphdr *tcp = NULL; in test_pkt_access()
122 tcp = (struct tcphdr *)((void *)(iph) + ihl_len); in test_pkt_access()
130 tcp = (struct tcphdr *)((void *)(ip6h) + ihl_len); in test_pkt_access()
H A Dtest_assign_reuse.c20 struct tcphdr tcp;
81 maybe_assign_tcp(struct __sk_buff *skb, struct tcphdr *th) in maybe_assign_tcp()
124 return maybe_assign_tcp(skb, (struct tcphdr *)(iph + 1)); in tc_main()
136 return maybe_assign_tcp(skb, (struct tcphdr *)(ip6h + 1)); in tc_main()
H A Dcgroup_skb_sk_lookup_kern.c31 const struct tcphdr *tcph) in set_tuple()
41 const struct tcphdr *tcph) in is_allowed_peer_cg()
70 struct tcphdr tcph; in ingress_lookup()
H A Dtest_btf_skc_cls_ingress.c24 struct tcphdr *th, struct tcp_sock *tp, in test_syncookie_helper()
74 struct tcphdr *th; in handle_ip_tcp()
86 th = (struct tcphdr *)(ip4h + 1); in handle_ip_tcp()
103 th = (struct tcphdr *)(ip6h + 1); in handle_ip_tcp()
H A Dtest_migrate_reuseport.c50 struct tcphdr *tcp = NULL; in drop_ack()
65 tcp = (struct tcphdr *)((void *)ip + ip->ihl * 4); in drop_ack()
77 tcp = (struct tcphdr *)(ipv6 + 1); in drop_ack()
/linux-6.15/net/ipv4/netfilter/
H A Dnf_reject_ipv4.c44 const struct tcphdr *oth; in nf_reject_skb_v4_tcp_reset()
47 struct tcphdr _oth; in nf_reject_skb_v4_tcp_reset()
140 struct tcphdr *_oth, int hook) in nf_reject_ip_tcphdr_get()
142 const struct tcphdr *oth; in nf_reject_ip_tcphdr_get()
152 sizeof(struct tcphdr), _oth); in nf_reject_ip_tcphdr_get()
194 const struct tcphdr *oth) in nf_reject_ip_tcphdr_put()
197 struct tcphdr *tcph; in nf_reject_ip_tcphdr_put()
200 tcph = skb_put_zero(nskb, sizeof(struct tcphdr)); in nf_reject_ip_tcphdr_put()
203 tcph->doff = sizeof(struct tcphdr) / 4; in nf_reject_ip_tcphdr_put()
242 const struct tcphdr *oth; in nf_send_reset()
[all …]
/linux-6.15/net/ipv6/netfilter/
H A Dnf_reject_ipv6.c65 const struct tcphdr *oth; in nf_reject_skb_v6_tcp_reset()
66 struct tcphdr _oth; in nf_reject_skb_v6_tcp_reset()
150 struct tcphdr *otcph, in nf_reject_ip6_tcphdr_get()
225 struct tcphdr *tcph; in nf_reject_ip6_tcphdr_put()
228 tcph = skb_put_zero(nskb, sizeof(struct tcphdr)); in nf_reject_ip6_tcphdr_put()
230 tcph->doff = sizeof(struct tcphdr)/4; in nf_reject_ip6_tcphdr_put()
247 sizeof(struct tcphdr), IPPROTO_TCP, in nf_reject_ip6_tcphdr_put()
249 sizeof(struct tcphdr), 0)); in nf_reject_ip6_tcphdr_put()
273 const struct tcphdr *otcph; in nf_send_reset6()
275 struct tcphdr _otcph; in nf_send_reset6()
[all …]
/linux-6.15/net/ipv6/
H A Dtcpv6_offload.c18 struct tcphdr *th) in tcp6_check_fraglist_gro()
52 struct tcphdr *th; in tcp6_gro_receive()
77 struct tcphdr *th = tcp_hdr(skb); in tcp6_gro_complete()
101 struct tcphdr *th = tcp_hdr(seg); in __tcpv6_gso_segment_csum()
120 const struct tcphdr *th; in __tcpv6_gso_segment_list_csum()
123 struct tcphdr *th2; in __tcpv6_gso_segment_list_csum()
163 struct tcphdr *th; in tcp6_gso_segment()
172 struct tcphdr *th = tcp_hdr(skb); in tcp6_gso_segment()
182 struct tcphdr *th = tcp_hdr(skb); in tcp6_gso_segment()
/linux-6.15/net/ipv4/
H A Dtcp_offload.c38 struct tcphdr *th; in __tcpv4_gso_segment_csum()
57 const struct tcphdr *th; in __tcpv4_gso_segment_list_csum()
60 struct tcphdr *th2; in __tcpv4_gso_segment_list_csum()
108 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment()
137 struct tcphdr *th; in tcp_gso_segment()
266 struct tcphdr *th2; in tcp_gro_lookup()
288 struct tcphdr *th; in tcp_gro_pull_header()
313 struct tcphdr *th) in tcp_gro_receive()
318 struct tcphdr *th2; in tcp_gro_receive()
416 struct tcphdr *th) in tcp4_check_fraglist_gro()
[all …]
/linux-6.15/include/net/netfilter/
H A Dnf_synproxy.h46 const struct tcphdr *th,
53 const struct tcphdr *th,
58 const struct tcphdr *th,
71 const struct tcphdr *th,
75 const struct tcphdr *th,
/linux-6.15/net/netfilter/
H A Dxt_TCPMSS.c78 struct tcphdr *tcph; in tcpmss_mangle_packet()
93 if (len < (int)sizeof(struct tcphdr)) in tcpmss_mangle_packet()
96 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet()
99 if (len < tcp_hdrlen || tcp_hdrlen < sizeof(struct tcphdr)) in tcpmss_mangle_packet()
117 for (i = sizeof(struct tcphdr); i <= tcp_hdrlen - TCPOLEN_MSS; i += optlen(opt, i)) { in tcpmss_mangle_packet()
159 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet()
176 opt = (u_int8_t *)tcph + sizeof(struct tcphdr); in tcpmss_mangle_packet()
177 memmove(opt + TCPOLEN_MSS, opt, len - sizeof(struct tcphdr)); in tcpmss_mangle_packet()
205 sizeof(*iph) + sizeof(struct tcphdr)); in tcpmss_tg4()
234 sizeof(*ipv6h) + sizeof(struct tcphdr)); in tcpmss_tg6()
H A Dnfnetlink_osf.c165 static const struct tcphdr *nf_osf_hdr_ctx_init(struct nf_osf_hdr_ctx *ctx, in nf_osf_hdr_ctx_init()
169 struct tcphdr *_tcph) in nf_osf_hdr_ctx_init()
171 const struct tcphdr *tcp; in nf_osf_hdr_ctx_init()
173 tcp = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(struct tcphdr), _tcph); in nf_osf_hdr_ctx_init()
184 if (tcp->doff * 4 > sizeof(struct tcphdr)) { in nf_osf_hdr_ctx_init()
185 ctx->optsize = tcp->doff * 4 - sizeof(struct tcphdr); in nf_osf_hdr_ctx_init()
188 sizeof(struct tcphdr), ctx->optsize, opts); in nf_osf_hdr_ctx_init()
209 const struct tcphdr *tcp; in nf_osf_match()
210 struct tcphdr _tcph; in nf_osf_match()
270 const struct tcphdr *tcp; in nf_osf_find()
[all …]
H A Dnf_synproxy_core.c453 struct tcphdr *nth; in synproxy_send_client_synack()
497 struct tcphdr *nth; in synproxy_send_server_syn()
542 struct tcphdr *nth; in synproxy_send_server_ack()
580 struct tcphdr *nth; in synproxy_send_client_ack()
649 struct tcphdr *th, _th; in ipv4_synproxy_hook()
861 const struct tcphdr *th, in synproxy_send_client_synack_ipv6()
866 struct tcphdr *nth; in synproxy_send_client_synack_ipv6()
911 struct tcphdr *nth; in synproxy_send_server_syn_ipv6()
956 struct tcphdr *nth; in synproxy_send_server_ack_ipv6()
995 struct tcphdr *nth; in synproxy_send_client_ack_ipv6()
[all …]
H A Dxt_TCPOPTSTRIP.c34 struct tcphdr *tcph, _th; in tcpoptstrip_mangle_packet()
49 if (tcp_hdrlen < sizeof(struct tcphdr)) in tcpoptstrip_mangle_packet()
56 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpoptstrip_mangle_packet()
63 for (i = sizeof(struct tcphdr); i < tcp_hdrlen - 1; i += optl) { in tcpoptstrip_mangle_packet()
H A Dnf_conntrack_seqadj.c64 const struct tcphdr *th; in nf_ct_tcp_seqadj_set()
69 th = (struct tcphdr *)(skb_network_header(skb) + ip_hdrlen(skb)); in nf_ct_tcp_seqadj_set()
76 struct tcphdr *tcph, in nf_ct_sack_block_adjust()
122 struct tcphdr *tcph = (void *)skb->data + protoff; in nf_ct_sack_adjust()
126 optoff = protoff + sizeof(struct tcphdr); in nf_ct_sack_adjust()
169 struct tcphdr *tcph; in nf_ct_seq_adjust()
H A Dnft_synproxy.c24 const struct tcphdr *tcp, in nft_synproxy_tcp_options()
47 const struct tcphdr *tcp, in nft_synproxy_eval_v4()
48 struct tcphdr *_tcph, in nft_synproxy_eval_v4()
78 const struct tcphdr *tcp, in nft_synproxy_eval_v6()
79 struct tcphdr *_tcph, in nft_synproxy_eval_v6()
113 const struct tcphdr *tcp; in nft_synproxy_do_eval()
114 struct tcphdr _tcph; in nft_synproxy_do_eval()
127 sizeof(struct tcphdr), in nft_synproxy_do_eval()
/linux-6.15/tools/testing/selftests/net/
H A Dgro.c270 iph->tot_len = htons(sizeof(struct tcphdr) + in fill_networklayer()
284 struct tcphdr *tcph = buf; in fill_transportlayer()
329 struct tcphdr *tcph; in send_flags()
404 struct tcphdr *tcphdr = (struct tcphdr *)(buf + tcp_offset); in recompute_packet() local
412 tcphdr->doff = tcphdr->doff + (extlen / 4); in recompute_packet()
413 tcphdr->check = 0; in recompute_packet()
414 tcphdr->check = tcp_checksum(tcphdr, PAYLOAD_LEN + extlen); in recompute_packet()
498 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); in send_changed_checksum()
513 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); in send_changed_seq()
618 sizeof(struct tcphdr) + PAYLOAD_LEN); in add_ipv6_exthdr()
[all …]
/linux-6.15/include/net/netfilter/ipv4/
H A Dnf_reject.h13 const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb,
14 struct tcphdr *_oth, int hook);
19 const struct tcphdr *oth);
/linux-6.15/include/net/netfilter/ipv6/
H A Dnf_reject.h12 const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb,
13 struct tcphdr *otcph,
20 const struct tcphdr *oth, unsigned int otcplen);
/linux-6.15/include/net/
H A Dip6_checksum.h58 struct tcphdr *th = tcp_hdr(skb); in __tcp_v6_send_check()
62 skb->csum_offset = offsetof(struct tcphdr, check); in __tcp_v6_send_check()
68 struct tcphdr *th = tcp_hdr(skb); in tcp_v6_gso_csum_prep()
/linux-6.15/include/linux/
H A Dnetfilter_ipv6.h52 const struct tcphdr *th, u16 *mssp);
54 const struct tcphdr *th);
165 const struct tcphdr *th, in nf_ipv6_cookie_init_sequence()
182 const struct tcphdr *th) in nf_cookie_v6_check()

123456789