Revert "API: Add service definitions for events and singleton messages."
[vpp.git] / src / vnet / fib / fib_types.h
index 5742c69..75ed779 100644 (file)
@@ -16,6 +16,7 @@
 #ifndef __FIB_TYPES_H__
 #define __FIB_TYPES_H__
 
+#include <stdbool.h>
 #include <vlib/vlib.h>
 #include <vnet/ip/ip6_packet.h>
 #include <vnet/mpls/packet.h>
@@ -71,6 +72,16 @@ typedef enum fib_protocol_t_ {
         _item <= FIB_PROTOCOL_IP6;        \
         _item++)
 
+/**
+ * @brief Convert from boolean is_ip6 to FIB protocol.
+ * Drop MPLS on the floor in favor of IPv4.
+ */
+static inline fib_protocol_t
+fib_ip_proto(bool is_ip6)
+{
+  return (is_ip6) ? FIB_PROTOCOL_IP6 : FIB_PROTOCOL_IP4;
+}
+
 /**
  * @brief Convert from a protocol to a link type
  */
@@ -344,6 +355,10 @@ typedef enum fib_route_path_flags_t_
      * A path that resolves via another table
      */
     FIB_ROUTE_PATH_DEAG = (1 << 13),
+    /**
+     * A path that resolves via a DVR DPO
+     */
+    FIB_ROUTE_PATH_DVR = (1 << 14),
 } fib_route_path_flags_t;
 
 /**