12 #include <linux/icmp.h>
13 #include <linux/icmpv6.h>
15 #include <linux/netfilter_ipv6/ip6_tables.h>
20 #include <linux/export.h>
32 th = skb_header_pointer(skb, protooff,
sizeof(_tcph), &_tcph);
44 sh = skb_header_pointer(skb, protooff,
sizeof(_sh), &_sh);
57 uh = skb_header_pointer(skb, protooff,
sizeof(_udph), &_udph);
69 ic = skb_header_pointer(skb, protooff,
sizeof(_ich), &_ich);
80 ic = skb_header_pointer(skb, protooff,
sizeof(_ich), &_ich);
100 const struct iphdr *iph = ip_hdr(skb);
101 unsigned int protooff = ip_hdrlen(skb);
108 return get_port(skb, protocol, protooff, src, port, proto);
112 #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
114 ip_set_get_ip6_port(
const struct sk_buff *skb,
bool src,
121 nexthdr = ipv6_hdr(skb)->nexthdr;
127 return get_port(skb, nexthdr, protoff, src, port, proto);
143 ret = ip_set_get_ip6_port(skb, src, port, &proto);