geneve gtpu vxlan vxlan-gpe: VRF-aware bypass node
[vpp.git] / src / vnet / ip / ip.h
index 040e580..75750c5 100644 (file)
@@ -289,6 +289,15 @@ void ip6_prefix_max_address_host_order (ip6_address_t * ip, u8 plen,
 void ip6_preflen_to_mask (u8 pref_len, ip6_address_t * mask);
 u32 ip6_mask_to_preflen (ip6_address_t * mask);
 
+always_inline u32 vlib_buffer_get_ip4_fib_index (vlib_buffer_t * b);
+always_inline u32 vlib_buffer_get_ip6_fib_index (vlib_buffer_t * b);
+always_inline u32
+vlib_buffer_get_ip_fib_index (vlib_buffer_t * b, u8 is_ip4)
+{
+  return (is_ip4 ? vlib_buffer_get_ip4_fib_index
+         : vlib_buffer_get_ip6_fib_index) (b);
+}
+
 #endif /* included_ip_main_h */
 
 /*