Home
last modified time | relevance | path

Searched refs:thoff (Results 1 – 25 of 43) sorted by relevance

12

/linux/net/netfilter/
H A Dnf_flow_table_ip.c26 struct sk_buff *skb, unsigned int thoff) in nf_flow_state_check() argument
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() argument
51 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_ip_tcp()
55 static void nf_flow_nat_ip_udp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_ip_udp() argument
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() argument
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, enum flow_offload_tuple_dir dir) in nf_flow_snat_ip() argument
[all …]
H A Dxt_l2tp.c79 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 Dxt_TPROXY.c120 int thoff = 0; in tproxy_tg6_v1() local
123 tproto = ipv6_find_hdr(skb, &thoff, -1, &fragoff, NULL); in tproxy_tg6_v1()
127 hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr); in tproxy_tg6_v1()
135 sk = nf_tproxy_get_sock_v6(xt_net(par), skb, thoff, tproto, in tproxy_tg6_v1()
147 sk = nf_tproxy_handle_time_wait6(skb, tproto, thoff, in tproxy_tg6_v1()
156 sk = nf_tproxy_get_sock_v6(xt_net(par), skb, thoff, in tproxy_tg6_v1()
H A Dnf_flow_table_core.c605 static void nf_flow_nat_port_tcp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port_tcp() argument
610 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_tcp()
614 static void nf_flow_nat_port_udp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port_udp() argument
619 udph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_udp()
628 static void nf_flow_nat_port(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port() argument
633 nf_flow_nat_port_tcp(skb, thoff, port, new_port); in nf_flow_nat_port()
636 nf_flow_nat_port_udp(skb, thoff, port, new_port); in nf_flow_nat_port()
642 struct sk_buff *skb, unsigned int thoff, in nf_flow_snat_port() argument
648 hdr = (void *)(skb_network_header(skb) + thoff); in nf_flow_snat_port()
663 nf_flow_nat_port(skb, thoff, protocol, port, new_port); in nf_flow_snat_port()
[all …]
H A Dxt_tcpudp.c92 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 Dnft_tproxy.c91 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 Dxt_tcpmss.c40 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcpmss_mt()
53 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt()
H A Dxt_dccp.c105 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 Dxt_sctp.c129 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()
H A Dxt_ipcomp.c50 chdr = skb_header_pointer(skb, par->thoff, sizeof(_comphdr), &_comphdr); in comp_mt()
H A Dxt_esp.c46 eh = skb_header_pointer(skb, par->thoff, sizeof(_esp), &_esp); in esp_mt()
H A Dnft_exthdr.c416 unsigned int thoff, dataoff, optoff, optlen, i; in nft_exthdr_dccp_eval() local
424 thoff = nft_thoff(pkt); in nft_exthdr_dccp_eval()
426 dh = skb_header_pointer(pkt->skb, thoff, sizeof(_dh), &_dh); in nft_exthdr_dccp_eval()
455 bufp = skb_header_pointer(pkt->skb, thoff + optoff + i, buflen, in nft_exthdr_dccp_eval()
/linux/tools/testing/selftests/bpf/progs/
H A Dbpf_flow.c98 __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/net/ipv6/netfilter/
H A Dnf_socket_ipv6.c105 int thoff = 0, tproto; in nf_sk_lookup_slow_v6() local
111 tproto = ipv6_find_hdr(skb, &thoff, -1, &fragoff, NULL); in nf_sk_lookup_slow_v6()
121 hp = skb_header_pointer(skb, thoff, tproto == IPPROTO_UDP ? in nf_sk_lookup_slow_v6()
132 thoff + __tcp_hdrlen((struct tcphdr *)hp) : in nf_sk_lookup_slow_v6()
133 thoff + sizeof(*hp); in nf_sk_lookup_slow_v6()
136 if (extract_icmp6_fields(skb, thoff, &tproto, &saddr, &daddr, in nf_sk_lookup_slow_v6()
H A Dip6t_SYNPROXY.c21 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()
H A Dip6t_mh.c41 mh = skb_header_pointer(skb, par->thoff, sizeof(_mh), &_mh); in mh_mt6()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dflow_dissector.c112 .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 Dipt_SYNPROXY.c21 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()
H A Dipt_ah.c40 ah = skb_header_pointer(skb, par->thoff, sizeof(_ahdr), &_ahdr); in ah_mt()
/linux/Documentation/bpf/
H A Dprog_flow_dissector.rst27 * ``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/sched/
H A Dem_ipset.c67 acpar.thoff = ip_hdrlen(skb); in em_ipset_match()
74 acpar.thoff = sizeof(struct ipv6hdr); in em_ipset_match()
H A Dact_ct.c522 unsigned int thoff; in tcf_ct_flow_table_fill_tuple_ipv4() local
531 thoff = iph->ihl * 4; in tcf_ct_flow_table_fill_tuple_ipv4()
534 unlikely(thoff != sizeof(struct iphdr))) in tcf_ct_flow_table_fill_tuple_ipv4()
557 if (!pskb_network_may_pull(skb, thoff + hdrsize)) in tcf_ct_flow_table_fill_tuple_ipv4()
562 *tcph = (void *)(skb_network_header(skb) + thoff); in tcf_ct_flow_table_fill_tuple_ipv4()
565 ports = (struct flow_ports *)(skb_network_header(skb) + thoff); in tcf_ct_flow_table_fill_tuple_ipv4()
572 greh = (struct gre_base_hdr *)(skb_network_header(skb) + thoff); in tcf_ct_flow_table_fill_tuple_ipv4()
596 unsigned int thoff; in tcf_ct_flow_table_fill_tuple_ipv6() local
604 thoff = sizeof(*ip6h); in tcf_ct_flow_table_fill_tuple_ipv6()
626 if (!pskb_network_may_pull(skb, thoff + hdrsize)) in tcf_ct_flow_table_fill_tuple_ipv6()
[all …]
/linux/net/core/
H A Dflow_dissector.c111 * @thoff: transport header offset
116 * The function will try to retrieve the ports at offset thoff + poff where poff
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()
162 * @thoff: offset to extract at
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, in in __skb_flow_dissect_tcp() argument
[all...]
/linux/samples/bpf/
H A Dsockex2_kern.c25 __u16 thoff; member
182 flow->thoff = (__u16) nhoff; in flow_dissector()
/linux/include/net/
H A Dflow_dissector.h24 u16 thoff; member
453 const void *data, int thoff, int hlen);

12