| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | cgroup_tcp_skb.c | 25 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 D | test_parse_tcp_hdr_opt_dynptr.c | 77 __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 D | test_parse_tcp_hdr_opt.c | 88 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 D | test_tcpbpf_kern.c | 34 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 D | test_pkt_access.c | 89 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 D | test_assign_reuse.c | 20 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 D | cgroup_skb_sk_lookup_kern.c | 31 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 D | test_migrate_reuseport.c | 50 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 D | skb_pkt_end.c | 13 #define ETH_IPV4_TCP_SIZE (14 + sizeof(struct iphdr) + sizeof(struct tcphdr)) 34 struct tcphdr *tcp; in main_prog()
|
| H A D | test_misc_tcp_hdr_options.c | 40 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 D | test_tc_edt.c | 65 static inline int handle_tcp(struct __sk_buff *skb, struct tcphdr *tcp) in handle_tcp() 97 return handle_tcp(skb, (struct tcphdr *)(((void *)iph) + ihl)); in handle_ipv4()
|
| /linux/include/net/netfilter/ |
| H A D | nf_synproxy.h | 46 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/net/netfilter/ |
| H A D | xt_TCPMSS.c | 78 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 D | xt_TCPOPTSTRIP.c | 34 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 D | nft_osf.c | 27 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 D | xt_tcpudp.c | 44 u_int8_t _opt[60 - sizeof(struct tcphdr)]; in tcp_find_option() 53 op = skb_header_pointer(skb, protoff + sizeof(struct tcphdr), in tcp_find_option() 73 const struct tcphdr *th; in tcp_mt() 74 struct tcphdr _tcph; in tcp_mt()
|
| H A D | xt_ecn.c | 30 struct tcphdr _tcph; in match_tcp() 31 const struct tcphdr *th; in match_tcp()
|
| /linux/tools/testing/selftests/drivers/net/ |
| H A D | gro.c | |
| /linux/net/core/ |
| H A D | selftests.c | 24 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/include/net/ |
| H A D | tcp_ao.h | 192 struct tcp_ao_key *key, struct tcphdr *th, 229 const struct tcphdr *th, u32 sne); 286 struct tcphdr *th, __u8 *hash_location) in tcp_ao_transmit_skb() 361 int tcp_do_parse_auth_options(const struct tcphdr *th, 364 static inline int tcp_do_parse_auth_options(const struct tcphdr *th, in tcp_do_parse_auth_options()
|
| /linux/samples/bpf/ |
| H A D | tcbpf1_kern.c | 32 #define TCP_CSUM_OFF (ETH_HLEN + sizeof(struct iphdr) + offsetof(struct tcphdr, check)) 46 #define TCP_DPORT_OFF (ETH_HLEN + sizeof(struct iphdr) + offsetof(struct tcphdr, dest))
|
| /linux/net/netfilter/ipset/ |
| H A D | ip_set_getport.c | 30 struct tcphdr _tcph; in get_port() 31 const struct tcphdr *th; in get_port()
|
| /linux/tools/testing/selftests/net/lib/ |
| H A D | csum.c | 125 #define MAX_HEADER_LEN (sizeof(struct ipv6hdr) + ENC_HEADER_LEN + sizeof(struct tcphdr)) 258 struct tcphdr *th = _th; in build_packet_tcp() 287 sizeof(struct tcphdr) + in build_packet_udp_encap() 314 tlen = sizeof(struct tcphdr) + cfg_payload_len; in build_packet() 434 vh.csum_offset = __builtin_offsetof(struct tcphdr, check); in send_packet() 435 vh.hdr_len = vh.csum_start + sizeof(struct tcphdr); in send_packet() 517 const int off_dport = offsetof(struct tcphdr, dest); /* same for udp */ in recv_prepare_packet_filter() 618 struct tcphdr *tcph = th; in recv_verify_packet_tcp()
|
| /linux/net/netfilter/ipvs/ |
| H A D | ip_vs_proto_tcp.c | 41 struct tcphdr _tcph, *th; in tcp_conn_schedule() 105 tcp_fast_csum_update(int af, struct tcphdr *tcph, in tcp_fast_csum_update() 126 tcp_partial_csum_update(int af, struct tcphdr *tcph, in tcp_partial_csum_update() 150 struct tcphdr *tcph; in tcp_snat_handler() 228 struct tcphdr *tcph; in tcp_dnat_handler() 490 static inline int tcp_state_idx(struct tcphdr *th) in tcp_state_idx() 505 int direction, struct tcphdr *th) in set_tcp_state() 584 struct tcphdr _tcph, *th; in tcp_state_transition()
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/ |
| H A D | pedit.h | 14 struct tcphdr tcp;
|