Lines Matching refs:nh_off
51 static int parse_ipv4(void *data, uint64_t nh_off, void *data_end) in parse_ipv4() argument
56 iph = data + nh_off; in parse_ipv4()
65 iph = data + nh_off + ihl_len; in parse_ipv4()
72 return tcp(data, nh_off + ihl_len, data_end); in parse_ipv4()
74 return udp(data, nh_off + ihl_len, data_end); in parse_ipv4()
78 static int parse_ipv6(void *data, uint64_t nh_off, void *data_end) in parse_ipv6() argument
85 ip6h = data + nh_off; in parse_ipv6()
92 iph = data + nh_off + ihl_len; in parse_ipv6()
98 ip6h = data + nh_off + ihl_len; in parse_ipv6()
106 return tcp(data, nh_off + ihl_len, data_end); in parse_ipv6()
108 return udp(data, nh_off + ihl_len, data_end); in parse_ipv6()
118 uint64_t h_proto, nh_off; in handle_ingress() local
120 nh_off = sizeof(*eth); in handle_ingress()
121 if (data + nh_off > data_end) in handle_ingress()
129 vhdr = data + nh_off; in handle_ingress()
130 nh_off += sizeof(struct vlan_hdr); in handle_ingress()
131 if (data + nh_off > data_end) in handle_ingress()
138 vhdr = data + nh_off; in handle_ingress()
139 nh_off += sizeof(struct vlan_hdr); in handle_ingress()
140 if (data + nh_off > data_end) in handle_ingress()
145 return parse_ipv4(data, nh_off, data_end); in handle_ingress()
147 return parse_ipv6(data, nh_off, data_end); in handle_ingress()