Searched refs:nh_off (Results 1 – 1 of 1) sorted by relevance
/external/iproute2/examples/bpf/ |
D | bpf_prog.c | 252 static inline bool flow_is_frag(struct __sk_buff *skb, int nh_off) in flow_is_frag() argument 254 return !!(load_half(skb, nh_off + offsetof(struct iphdr, frag_off)) & in flow_is_frag() 258 static inline int flow_parse_ipv4(struct __sk_buff *skb, int nh_off, in flow_parse_ipv4() argument 263 if (unlikely(flow_is_frag(skb, nh_off))) in flow_parse_ipv4() 266 *ip_proto = load_byte(skb, nh_off + offsetof(struct iphdr, in flow_parse_ipv4() 269 flow->src = load_word(skb, nh_off + offsetof(struct iphdr, saddr)); in flow_parse_ipv4() 270 flow->dst = load_word(skb, nh_off + offsetof(struct iphdr, daddr)); in flow_parse_ipv4() 273 ip_ver_len = load_byte(skb, nh_off + 0 /* offsetof(struct iphdr, ihl) */); in flow_parse_ipv4() 275 nh_off += 20; in flow_parse_ipv4() 277 nh_off += (ip_ver_len & 0xF) << 2; in flow_parse_ipv4() [all …]
|