summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/ip.h')
-rw-r--r--src/vnet/ip/ip.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vnet/ip/ip.h b/src/vnet/ip/ip.h
index 040e580c3a1..75750c5a192 100644
--- a/src/vnet/ip/ip.h
+++ b/src/vnet/ip/ip.h
@@ -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 */
/*