| /linux/net/netfilter/ |
| H A D | nf_flow_table_ip.c | 26 struct sk_buff *skb, unsigned int thoff) in nf_flow_state_check() 33 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_state_check() 46 static void nf_flow_nat_ip_tcp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_ip_tcp() 51 tcph = (void *)(skb_network_header(skb) + thoff); 55 static void nf_flow_nat_ip_udp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_ip_udp() 60 udph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_ip_udp() 70 unsigned int thoff, __be32 addr, in nf_flow_nat_ip_l4proto() 75 nf_flow_nat_ip_tcp(skb, thoff, addr, new_addr); in nf_flow_nat_ip_l4proto() 78 nf_flow_nat_ip_udp(skb, thoff, addr, new_addr); in nf_flow_nat_ip_l4proto() 85 unsigned int thoff, enu in nf_flow_snat_ip() 23 nf_flow_state_check(struct flow_offload * flow,int proto,struct sk_buff * skb,unsigned int thoff) nf_flow_state_check() argument 43 nf_flow_nat_ip_tcp(struct sk_buff * skb,unsigned int thoff,__be32 addr,__be32 new_addr) nf_flow_nat_ip_tcp() argument 52 nf_flow_nat_ip_udp(struct sk_buff * skb,unsigned int thoff,__be32 addr,__be32 new_addr) nf_flow_nat_ip_udp() argument 67 nf_flow_nat_ip_l4proto(struct sk_buff * skb,struct iphdr * iph,unsigned int thoff,__be32 addr,__be32 new_addr) nf_flow_nat_ip_l4proto() argument 82 nf_flow_snat_ip(const struct flow_offload * flow,struct sk_buff * skb,struct iphdr * iph,unsigned int thoff,enum flow_offload_tuple_dir dir) nf_flow_snat_ip() argument 105 nf_flow_dnat_ip(const struct flow_offload * flow,struct sk_buff * skb,struct iphdr * iph,unsigned int thoff,enum flow_offload_tuple_dir dir) nf_flow_dnat_ip() argument 127 nf_flow_nat_ip(const struct flow_offload * flow,struct sk_buff * skb,unsigned int thoff,enum flow_offload_tuple_dir dir,struct iphdr * iph) nf_flow_nat_ip() argument 140 ip_has_options(unsigned int thoff) ip_has_options() argument 181 unsigned int thoff; nf_flow_tuple_ip() local 377 unsigned int thoff, mtu; nf_flow_offload_forward() local 479 nf_flow_nat_ipv6_tcp(struct sk_buff * skb,unsigned int thoff,struct in6_addr * addr,struct in6_addr * new_addr,struct ipv6hdr * ip6h) nf_flow_nat_ipv6_tcp() argument 491 nf_flow_nat_ipv6_udp(struct sk_buff * skb,unsigned int thoff,struct in6_addr * addr,struct in6_addr * new_addr) nf_flow_nat_ipv6_udp() argument 507 nf_flow_nat_ipv6_l4proto(struct sk_buff * skb,struct ipv6hdr * ip6h,unsigned int thoff,struct in6_addr * addr,struct in6_addr * new_addr) nf_flow_nat_ipv6_l4proto() argument 522 nf_flow_snat_ipv6(const struct flow_offload * flow,struct sk_buff * skb,struct ipv6hdr * ip6h,unsigned int thoff,enum flow_offload_tuple_dir dir) nf_flow_snat_ipv6() argument 545 nf_flow_dnat_ipv6(const struct flow_offload * flow,struct sk_buff * skb,struct ipv6hdr * ip6h,unsigned int thoff,enum flow_offload_tuple_dir dir) nf_flow_dnat_ipv6() argument 571 unsigned int thoff = sizeof(*ip6h); nf_flow_nat_ipv6() local 588 unsigned int thoff; nf_flow_tuple_ipv6() local 656 unsigned int thoff, mtu; nf_flow_offload_ipv6_forward() local [all...] |
| H A D | xt_l2tp.c | 79 static bool l2tp_udp_mt(const struct sk_buff *skb, struct xt_action_param *par, u16 thoff) in l2tp_udp_mt() argument 83 int offs = thoff + uhlen; in l2tp_udp_mt() 139 static bool l2tp_ip_mt(const struct sk_buff *skb, struct xt_action_param *par, u16 thoff) in l2tp_ip_mt() argument 147 lh = skb_header_pointer(skb, thoff, sizeof(lhbuf), &lhbuf); in l2tp_ip_mt() 155 lh = skb_header_pointer(skb, thoff + 8, sizeof(lhbuf), in l2tp_ip_mt() 178 return l2tp_udp_mt(skb, par, par->thoff); in l2tp_mt4() 180 return l2tp_ip_mt(skb, par, par->thoff); in l2tp_mt4() 189 unsigned int thoff = 0; in l2tp_mt6() local 193 ipproto = ipv6_find_hdr(skb, &thoff, -1, &fragoff, NULL); in l2tp_mt6() 200 return l2tp_udp_mt(skb, par, thoff); in l2tp_mt6() [all …]
|
| H A D | nft_inner.c | 63 u32 nhoff, thoff; in nft_inner_parse_l2l3() 136 thoff = nhoff + (iph->ihl * 4); in nft_inner_parse_l2l3() 139 ctx->inner_thoff = thoff; in nft_inner_parse_l2l3() 160 thoff = nhoff; in nft_inner_parse_l2l3() 161 l4proto = ipv6_find_hdr(pkt->skb, &thoff, -1, &fragoff, &fh_flags); in nft_inner_parse_l2l3() 162 if (l4proto < 0 || thoff > U16_MAX) in nft_inner_parse_l2l3() 166 thoff = nhoff + sizeof(_ip6h); in nft_inner_parse_l2l3() 168 ctx->inner_thoff = thoff; in nft_inner_parse_l2l3() 185 ctx->inner_tunoff = pkt->thoff; in nft_inner_parse_tunhdr() 56 u32 nhoff, thoff; nft_inner_parse_l2l3() local
|
| H A D | xt_TPROXY.c | 113 int thoff = 0; in tproxy_tg6_v1() local 116 tproto = ipv6_find_hdr(skb, &thoff, -1, NULL, NULL); in tproxy_tg6_v1() 120 hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr); in tproxy_tg6_v1() 128 sk = nf_tproxy_get_sock_v6(xt_net(par), skb, thoff, tproto, in tproxy_tg6_v1() 140 sk = nf_tproxy_handle_time_wait6(skb, tproto, thoff, in tproxy_tg6_v1() 149 sk = nf_tproxy_get_sock_v6(xt_net(par), skb, thoff, in tproxy_tg6_v1()
|
| H A D | nf_flow_table_core.c | 604 static void nf_flow_nat_port_tcp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port_tcp() 609 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_udp() argument 613 static void nf_flow_nat_port_udp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port_udp() 618 udph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_udp() 627 static void nf_flow_nat_port(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port() 632 nf_flow_nat_port_tcp(skb, thoff, port, new_port); in nf_flow_nat_port() 635 nf_flow_nat_port_udp(skb, thoff, port, new_port); 641 struct sk_buff *skb, unsigned int thoff, in nf_flow_snat_port() 647 hdr = (void *)(skb_network_header(skb) + thoff); in nf_flow_snat_port() 662 nf_flow_nat_port(skb, thoff, protoco 600 nf_flow_nat_port_tcp(struct sk_buff * skb,unsigned int thoff,__be16 port,__be16 new_port) nf_flow_nat_port_tcp() argument 623 nf_flow_nat_port(struct sk_buff * skb,unsigned int thoff,u8 protocol,__be16 port,__be16 new_port) nf_flow_nat_port() argument 637 nf_flow_snat_port(const struct flow_offload * flow,struct sk_buff * skb,unsigned int thoff,u8 protocol,enum flow_offload_tuple_dir dir) nf_flow_snat_port() argument 663 nf_flow_dnat_port(const struct flow_offload * flow,struct sk_buff * skb,unsigned int thoff,u8 protocol,enum flow_offload_tuple_dir dir) nf_flow_dnat_port() argument [all...] |
| H A D | xt_tcpudp.c | 92 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcp_mt() 117 if (!tcp_find_option(tcpinfo->option, skb, par->thoff, in tcp_mt() 144 uh = skb_header_pointer(skb, par->thoff, sizeof(_udph), &_udph); in udp_mt() 201 ic = skb_header_pointer(skb, par->thoff, sizeof(_icmph), &_icmph); in icmp_match() 228 ic = skb_header_pointer(skb, par->thoff, sizeof(_icmph), &_icmph); in icmp6_match()
|
| H A D | nft_tproxy.c | 91 int thoff = nft_thoff(pkt); in nft_tproxy_eval_v6() local 107 hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr); in nft_tproxy_eval_v6() 117 sk = nf_tproxy_get_sock_v6(nft_net(pkt), skb, thoff, l4proto, in nft_tproxy_eval_v6() 134 sk = nf_tproxy_handle_time_wait6(skb, l4proto, thoff, in nft_tproxy_eval_v6() 143 sk = nf_tproxy_get_sock_v6(nft_net(pkt), skb, thoff, in nft_tproxy_eval_v6()
|
| H A D | nf_synproxy_core.c | 651 unsigned int thoff; in ipv4_synproxy_hook() 665 thoff = ip_hdrlen(skb); in ipv4_synproxy_hook() 666 th = skb_header_pointer(skb, thoff, sizeof(_th), &_th); in ipv4_synproxy_hook() 692 if (!synproxy_parse_options(skb, thoff, th, &opts)) in ipv4_synproxy_hook() 721 if (!synproxy_parse_options(skb, thoff, th, &opts)) in ipv4_synproxy_hook() 748 synproxy_tstamp_adjust(skb, thoff, th, ct, ctinfo, synproxy); in ipv4_synproxy_hook() 1070 int thoff; in ipv6_synproxy_hook() 1084 thoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr, in ipv6_synproxy_hook() 1086 if (thoff < 0 || nexthdr != IPPROTO_TCP) in ipv6_synproxy_hook() 1089 th = skb_header_pointer(skb, thoff, sizeo in ipv6_synproxy_hook() 650 unsigned int thoff; ipv4_synproxy_hook() local 1069 int thoff; ipv6_synproxy_hook() local [all...] |
| H A D | xt_tcpmss.c | 36 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcpmss_mt() 49 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt()
|
| H A D | nft_synproxy.c | 113 int thoff = nft_thoff(pkt); in nft_synproxy_do_eval() local 122 if (nf_ip_checksum(skb, nft_hook(pkt), thoff, IPPROTO_TCP)) { in nft_synproxy_do_eval() 127 tcp = skb_header_pointer(skb, thoff, in nft_synproxy_do_eval() 135 if (!synproxy_parse_options(skb, thoff, tcp, &opts)) { in nft_synproxy_do_eval()
|
| H A D | xt_dccp.c | 105 dh = skb_header_pointer(skb, par->thoff, sizeof(_dh), &_dh); in dccp_mt() 119 && DCCHECK(match_option(info->option, skb, par->thoff, dh, in dccp_mt()
|
| H A D | xt_sctp.c | 129 sh = skb_header_pointer(skb, par->thoff, sizeof(_sh), &_sh); in sctp_mt() 143 SCCHECK(match_packet(skb, par->thoff + sizeof(_sh), in sctp_mt()
|
| /linux/include/net/netfilter/ |
| H A D | nf_tables_ipv6.h | 12 int protohdr, thoff = 0; in nft_set_pktinfo_ipv6() local 15 protohdr = ipv6_find_hdr(pkt->skb, &thoff, -1, &frag_off, &flags); in nft_set_pktinfo_ipv6() 16 if (protohdr < 0 || thoff > U16_MAX) { in nft_set_pktinfo_ipv6() 23 pkt->thoff = thoff; in nft_set_pktinfo_ipv6() 32 unsigned int thoff = 0; in __nft_set_pktinfo_ipv6_validate() local 50 protohdr = ipv6_find_hdr(pkt->skb, &thoff, -1, &frag_off, &flags); in __nft_set_pktinfo_ipv6_validate() 51 if (protohdr < 0 || thoff > U16_MAX) in __nft_set_pktinfo_ipv6_validate() 56 pkt->thoff = thoff; in __nft_set_pktinfo_ipv6_validate() 76 unsigned int thoff = 0; nft_set_pktinfo_ipv6_ingress() local [all...] |
| H A D | nf_tables_ipv4.h | 15 pkt->thoff = ip_hdrlen(pkt->skb); in nft_set_pktinfo_ipv4() 22 u32 len, thoff, skb_len; in __nft_set_pktinfo_ipv4_validate() local 33 thoff = iph->ihl * 4; in __nft_set_pktinfo_ipv4_validate() 38 else if (len < thoff) in __nft_set_pktinfo_ipv4_validate() 40 else if (thoff < sizeof(*iph)) in __nft_set_pktinfo_ipv4_validate() 45 pkt->thoff = skb_network_offset(pkt->skb) + thoff; in __nft_set_pktinfo_ipv4_validate() 60 u32 len, thoff; in nft_set_pktinfo_ipv4_ingress() local 70 thoff = iph->ihl * 4; in nft_set_pktinfo_ipv4_ingress() 74 } else if (len < thoff) { in nft_set_pktinfo_ipv4_ingress() 76 } else if (thoff < sizeof(*iph)) { in nft_set_pktinfo_ipv4_ingress() [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | bpf_flow.c | 98 __u16 thoff = skb->flow_keys->thoff; in bpf_flow_dissect_get_header() local 102 if (thoff > (USHRT_MAX - hdr_size)) in bpf_flow_dissect_get_header() 105 hdr = data + thoff; in bpf_flow_dissect_get_header() 109 if (bpf_skb_load_bytes(skb, thoff, buffer, hdr_size)) in bpf_flow_dissect_get_header() 202 keys->thoff += sizeof(*gre); /* Step over GRE Flags and Proto */ in parse_ip_proto() 204 keys->thoff += 4; /* Step over chksum and Padding */ in parse_ip_proto() 206 keys->thoff += 4; /* Step over key */ in parse_ip_proto() 208 keys->thoff += 4; /* Step over sequence number */ in parse_ip_proto() 220 keys->thoff += sizeof(*eth); in parse_ip_proto() 296 keys->thoff += iph->ihl << 2; in PROG() [all …]
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | flow_dissector.c | 112 .thoff = ETH_HLEN + sizeof(struct iphdr), 133 .thoff = ETH_HLEN + sizeof(struct ipv6hdr), 156 .thoff = ETH_HLEN + VLAN_HLEN + sizeof(struct iphdr), 179 .thoff = ETH_HLEN + VLAN_HLEN * 2 + 204 .thoff = ETH_HLEN + sizeof(struct iphdr), 230 .thoff = ETH_HLEN + sizeof(struct iphdr), 253 .thoff = ETH_HLEN + sizeof(struct ipv6hdr) + 279 .thoff = ETH_HLEN + sizeof(struct ipv6hdr) + 302 .thoff = ETH_HLEN + sizeof(struct ipv6hdr), 326 .thoff = ETH_HLEN + sizeof(struct ipv6hdr), [all …]
|
| /linux/net/ipv4/netfilter/ |
| H A D | ipt_SYNPROXY.c | 21 if (nf_ip_checksum(skb, xt_hooknum(par), par->thoff, IPPROTO_TCP)) in synproxy_tg4() 24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg4() 28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg4()
|
| /linux/net/ipv6/netfilter/ |
| H A D | ip6t_SYNPROXY.c | 21 if (nf_ip6_checksum(skb, xt_hooknum(par), par->thoff, IPPROTO_TCP)) in synproxy_tg6() 24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg6() 28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg6()
|
| /linux/Documentation/bpf/ |
| H A D | prog_flow_dissector.rst | 27 * ``thoff`` - initial offset of the transport header, initialized to nhoff 32 bpf_flow_keys`` fields. Input arguments ``nhoff/thoff/n_proto`` should be 55 flow_keys->thoff = nhoff 72 flow_keys->thoff = nhoff 91 flow_keys->thoff = nhoff
|
| /linux/net/core/ |
| H A D | flow_dissector.c | 119 __be32 skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto, in skb_flow_get_ports() argument 132 ports = __skb_header_pointer(skb, thoff + poff, in skb_flow_get_ports() 167 const void *data, int thoff, int hlen) in skb_flow_get_icmp_tci() argument 171 ih = __skb_header_pointer(skb, thoff, sizeof(_ih), data, hlen, &_ih); in skb_flow_get_icmp_tci() 194 int thoff, int hlen) in __skb_flow_dissect_icmp() argument 205 skb_flow_get_icmp_tci(skb, key_icmp, data, thoff, hlen); in __skb_flow_dissect_icmp() 829 int thoff, int hlen) in __skb_flow_dissect_tcp() argument 837 th = __skb_header_pointer(skb, thoff, sizeof(_th), data, hlen, &_th); in __skb_flow_dissect_tcp() 944 key_control->thoff = flow_keys->thoff; in __skb_flow_bpf_to_target() 1014 flow_keys->thoff = flow_keys->nhoff; in bpf_flow_dissect() [all …]
|
| /linux/net/sched/ |
| H A D | em_ipset.c | 67 acpar.thoff = ip_hdrlen(skb); in em_ipset_match() 74 acpar.thoff = sizeof(struct ipv6hdr); in em_ipset_match()
|
| H A D | act_ct.c | 518 unsigned int thoff; in tcf_ct_flow_table_fill_tuple_ipv4() local 527 thoff = iph->ihl * 4; in tcf_ct_flow_table_fill_tuple_ipv4() 530 unlikely(thoff != sizeof(struct iphdr))) in tcf_ct_flow_table_fill_tuple_ipv4() 553 if (!pskb_network_may_pull(skb, thoff + hdrsize)) in tcf_ct_flow_table_fill_tuple_ipv4() 558 *tcph = (void *)(skb_network_header(skb) + thoff); in tcf_ct_flow_table_fill_tuple_ipv4() 561 ports = (struct flow_ports *)(skb_network_header(skb) + thoff); in tcf_ct_flow_table_fill_tuple_ipv4() 568 greh = (struct gre_base_hdr *)(skb_network_header(skb) + thoff); in tcf_ct_flow_table_fill_tuple_ipv4() 592 unsigned int thoff; in tcf_ct_flow_table_fill_tuple_ipv6() local 600 thoff = sizeof(*ip6h); in tcf_ct_flow_table_fill_tuple_ipv6() 622 if (!pskb_network_may_pull(skb, thoff + hdrsize)) in tcf_ct_flow_table_fill_tuple_ipv6() [all …]
|
| /linux/samples/bpf/ |
| H A D | sockex2_kern.c | 25 __u16 thoff; member 182 flow->thoff = (__u16) nhoff; in flow_dissector()
|
| /linux/include/net/ |
| H A D | flow_dissector.h | 24 u16 thoff; member 453 const void *data, int thoff, int hlen);
|
| /linux/net/ipv6/ |
| H A D | tcpv6_offload.c | 70 static __always_inline int tcp6_gro_complete(struct sk_buff *skb, int thoff) in tcp6_gro_receive() 85 th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr, in tcp6_gro_complete() 72 tcp6_gro_complete(struct sk_buff * skb,int thoff) tcp6_gro_complete() argument
|