Home
last modified time | relevance | path

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

12345678

/linux/tools/testing/selftests/bpf/progs/
H A Dcgroup_tcp_skb.c25 int needed_tcp_pkt(struct __sk_buff *skb, struct tcphdr *tcph) in needed_tcp_pkt()
48 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()
97 static int ingress_connect(struct tcphdr *tcph) in ingress_connect()
111 static int egress_close_remote(struct tcphdr *tcph) in egress_close_remote()
135 static int ingress_close_remote(struct tcphdr *tcph) in ingress_close_remote()
156 static int egress_close_local(struct tcphdr *tcph) in egress_close_local()
176 static int ingress_close_local(struct tcphdr *tcph) in ingress_close_local()
208 struct tcphdr tcph; in server_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_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()
H A Dtest_misc_tcp_hdr_options.c40 struct tcphdr th; in __check_active_hdr_in()
47 struct tcphdr *pth; in __check_active_hdr_in()
115 pth = (struct tcphdr *)(&hdr.ip6 + 1); in __check_active_hdr_in()
136 struct tcphdr *th; in check_active_hdr_in()
179 struct tcphdr *th; in write_active_opt()
H A Dskb_pkt_end.c13 #define ETH_IPV4_TCP_SIZE (14 + sizeof(struct iphdr) + sizeof(struct tcphdr))
34 struct tcphdr *tcp; in main_prog()
/linux/net/ipv4/netfilter/
H A Dnf_reject_ipv4.c20 const struct tcphdr *oth);
21 static const struct tcphdr *
23 struct tcphdr *_oth, int hook);
54 const struct tcphdr *oth; in nf_reject_skb_v4_tcp_reset()
57 struct tcphdr _oth; in nf_reject_skb_v4_tcp_reset()
66 nskb = alloc_skb(sizeof(struct iphdr) + sizeof(struct tcphdr) + in nf_reject_skb_v4_tcp_reset()
174 static const struct tcphdr *
176 struct tcphdr *_oth, int hook) in nf_reject_ip_tcphdr_get()
178 const struct tcphdr *oth; in nf_reject_ip_tcphdr_get()
188 sizeof(struct tcphdr), _oth); in nf_reject_ip_tcphdr_get()
[all …]
H A Dnf_tproxy_ipv4.c23 struct tcphdr _hdr, *hp; in nf_tproxy_handle_time_wait4()
88 struct tcphdr _hdr, *hp; in nf_tproxy_get_sock_v4()
91 sizeof(struct tcphdr), &_hdr); in nf_tproxy_get_sock_v4()
/linux/net/ipv6/netfilter/
H A Dnf_reject_ipv6.c23 const struct tcphdr *oth, unsigned int otcplen);
24 static const struct tcphdr *
26 struct tcphdr *otcph,
79 const struct tcphdr *oth; in nf_reject_skb_v6_tcp_reset()
80 struct tcphdr _oth; in nf_reject_skb_v6_tcp_reset()
91 nskb = alloc_skb(sizeof(struct ipv6hdr) + sizeof(struct tcphdr) + in nf_reject_skb_v6_tcp_reset()
193 static const struct tcphdr *
195 struct tcphdr *otcph, in nf_reject_ip6_tcphdr_get()
215 if (proto != IPPROTO_TCP || *otcplen < sizeof(struct tcphdr)) { in nf_reject_ip6_tcphdr_get()
221 otcph = skb_header_pointer(oldskb, tcphoff, sizeof(struct tcphdr), in nf_reject_ip6_tcphdr_get()
[all …]
H A Dnf_tproxy_ipv6.c46 struct tcphdr _hdr, *hp; in nf_tproxy_handle_time_wait6()
87 struct tcphdr _hdr, *hp; in nf_tproxy_get_sock_v6()
90 sizeof(struct tcphdr), &_hdr); in nf_tproxy_get_sock_v6()
/linux/net/ipv6/
H A Dtcpv6_offload.c18 struct tcphdr *th) in tcp6_check_fraglist_gro()
59 struct tcphdr *th; in tcp6_gro_receive()
85 struct tcphdr *th = tcp_hdr(skb); in tcp6_gro_complete()
109 struct tcphdr *th = tcp_hdr(seg); in __tcpv6_gso_segment_csum()
128 const struct tcphdr *th; in __tcpv6_gso_segment_list_csum()
131 struct tcphdr *th2; in __tcpv6_gso_segment_list_csum()
171 struct tcphdr *th; in tcp6_gso_segment()
180 struct tcphdr *th = tcp_hdr(skb); in tcp6_gso_segment()
191 struct tcphdr *th = tcp_hdr(skb); in tcp6_gso_segment()
/linux/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()
104 if (!pskb_may_pull(skb, sizeof(struct tcphdr))) in tcp4_gso_segment()
108 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment()
119 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment()
138 struct tcphdr *th; in tcp_gso_segment()
265 struct sk_buff *tcp_gro_lookup(struct list_head *head, struct tcphdr *th) in tcp_gro_lookup()
267 struct tcphdr *th2; in tcp_gro_lookup()
287 struct tcphdr *th) in tcp_gro_receive()
[all …]
/linux/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 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 Dnft_synproxy.c25 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()
128 sizeof(struct tcphdr), in nft_synproxy_do_eval()
H A Dnft_osf.c27 const struct tcphdr *tcp; in nft_osf_eval()
29 struct tcphdr _tcph; in nft_osf_eval()
42 sizeof(struct tcphdr), &_tcph); in nft_osf_eval()
H A Dnf_conntrack_proto_tcp.c275 static unsigned int get_conntrack_index(const struct tcphdr *tcph) in get_conntrack_index()
316 const struct tcphdr *tcph) in segment_seq_plus_len()
335 const struct tcphdr *tcph, in tcp_options()
338 unsigned char buff[(15 * 4) - sizeof(struct tcphdr)]; in tcp_options()
340 int length = (tcph->doff*4) - sizeof(struct tcphdr); in tcp_options()
345 ptr = skb_header_pointer(skb, dataoff + sizeof(struct tcphdr), in tcp_options()
392 const struct tcphdr *tcph, __u32 *sack) in tcp_sack()
394 unsigned char buff[(15 * 4) - sizeof(struct tcphdr)]; in tcp_sack()
396 int length = (tcph->doff*4) - sizeof(struct tcphdr); in tcp_sack()
402 ptr = skb_header_pointer(skb, dataoff + sizeof(struct tcphdr), in tcp_sack()
[all …]
/linux/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/tools/testing/selftests/drivers/net/
H A Dgro.c
/linux/net/core/
H A Dselftests.c24 struct tcphdr *thdr = NULL; in net_test_get_skb()
33 size += sizeof(struct tcphdr); in net_test_get_skb()
71 thdr->doff = sizeof(struct tcphdr) / 4; in net_test_get_skb()
132 skb->csum_offset = offsetof(struct tcphdr, check); in net_test_get_skb()
170 struct tcphdr *thdr; in net_test_loopback_validate()
201 thdr = (struct tcphdr *)((u8 *)ihdr + 4 * ihdr->ihl); in net_test_loopback_validate()
/linux/net/ipv6/ila/
H A Dila_common.c84 if (likely(pskb_may_pull(skb, nhoff + sizeof(struct tcphdr)))) { in ila_csum_adjust_transport()
85 struct tcphdr *th = (struct tcphdr *) in ila_csum_adjust_transport()

12345678