• Home
  • Raw
  • Download

Lines Matching refs:nhoff

46 static inline int ip_is_fragment(struct __sk_buff *ctx, __u64 nhoff)  in ip_is_fragment()  argument
48 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off)) in ip_is_fragment()
62 static inline __u64 parse_ip(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto, in parse_ip() argument
67 if (unlikely(ip_is_fragment(skb, nhoff))) in parse_ip()
70 *ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in parse_ip()
73 flow->src = load_word(skb, nhoff + offsetof(struct iphdr, saddr)); in parse_ip()
74 flow->dst = load_word(skb, nhoff + offsetof(struct iphdr, daddr)); in parse_ip()
77 verlen = load_byte(skb, nhoff + 0/*offsetof(struct iphdr, ihl)*/); in parse_ip()
79 nhoff += 20; in parse_ip()
81 nhoff += (verlen & 0xF) << 2; in parse_ip()
83 return nhoff; in parse_ip()
86 static inline __u64 parse_ipv6(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto, in parse_ipv6() argument
90 nhoff + offsetof(struct ipv6hdr, nexthdr)); in parse_ipv6()
92 nhoff + offsetof(struct ipv6hdr, saddr)); in parse_ipv6()
94 nhoff + offsetof(struct ipv6hdr, daddr)); in parse_ipv6()
95 nhoff += sizeof(struct ipv6hdr); in parse_ipv6()
97 return nhoff; in parse_ipv6()
103 __u64 nhoff = ETH_HLEN; in flow_dissector() local
109 proto = load_half(skb, nhoff + offsetof(struct vlan_hdr, in flow_dissector()
111 nhoff += sizeof(struct vlan_hdr); in flow_dissector()
115 proto = load_half(skb, nhoff + offsetof(struct vlan_hdr, in flow_dissector()
117 nhoff += sizeof(struct vlan_hdr); in flow_dissector()
121 nhoff = parse_ip(skb, nhoff, &ip_proto, flow); in flow_dissector()
123 nhoff = parse_ipv6(skb, nhoff, &ip_proto, flow); in flow_dissector()
135 nhoff + offsetof(struct gre_hdr, flags)); in flow_dissector()
137 nhoff + offsetof(struct gre_hdr, proto)); in flow_dissector()
143 nhoff += 4; in flow_dissector()
145 nhoff += 4; in flow_dissector()
147 nhoff += 4; in flow_dissector()
149 nhoff += 4; in flow_dissector()
153 nhoff + offsetof(struct vlan_hdr, in flow_dissector()
155 nhoff += sizeof(struct vlan_hdr); in flow_dissector()
159 nhoff = parse_ip(skb, nhoff, &ip_proto, flow); in flow_dissector()
161 nhoff = parse_ipv6(skb, nhoff, &ip_proto, flow); in flow_dissector()
167 nhoff = parse_ip(skb, nhoff, &ip_proto, flow); in flow_dissector()
170 nhoff = parse_ipv6(skb, nhoff, &ip_proto, flow); in flow_dissector()
179 nhoff += poff; in flow_dissector()
180 flow->ports = load_word(skb, nhoff); in flow_dissector()
183 flow->thoff = (__u16) nhoff; in flow_dissector()