FIB table add/delete API
[vpp.git] / src / vnet / fib / fib_entry.h
index b17a0b6..2f6e37f 100644 (file)
@@ -48,6 +48,10 @@ typedef enum fib_source_t_ {
      * that is from confiiguration on an interface, not a 'ip route' command
      */
     FIB_SOURCE_INTERFACE,
+    /**
+     * SRv6 and SR-MPLS
+     */
+    FIB_SOURCE_SR,
     /**
      * A high priority source a plugin can use
      */
@@ -64,10 +68,6 @@ typedef enum fib_source_t_ {
      * LISP
      */
     FIB_SOURCE_LISP,
-    /**
-     * SRv6
-     */
-    FIB_SOURCE_SR,
     /**
      * IPv[46] Mapping
      */
@@ -205,14 +205,9 @@ typedef enum fib_entry_attribute_t_ {
     /**
      * Marker. add new entries before this one.
      */
-    FIB_ENTRY_ATTRIBUTE_LAST = FIB_ENTRY_ATTRIBUTE_MULTICAST,
+    FIB_ENTRY_ATTRIBUTE_LAST = FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT,
 } fib_entry_attribute_t;
 
-/**
- * The maximum number of sources
- */
-#define FIB_ENTRY_ATTRIBUTE_MAX (FIB_ENTRY_ATTRIBUTE_LAST+1)
-
 #define FIB_ENTRY_ATTRIBUTES {                         \
     [FIB_ENTRY_ATTRIBUTE_CONNECTED] = "connected",     \
     [FIB_ENTRY_ATTRIBUTE_ATTACHED]  = "attached",      \
@@ -226,7 +221,7 @@ typedef enum fib_entry_attribute_t_ {
 
 #define FOR_EACH_FIB_ATTRIBUTE(_item)                  \
     for (_item = FIB_ENTRY_ATTRIBUTE_FIRST;            \
-        _item < FIB_ENTRY_ATTRIBUTE_MAX;               \
+        _item <= FIB_ENTRY_ATTRIBUTE_LAST;             \
         _item++)
 
 typedef enum fib_entry_flag_t_ {
@@ -290,7 +285,7 @@ typedef struct fib_entry_src_t_ {
     /**
      * A vector of path extensions
      */
-    struct fib_path_ext_t_ *fes_path_exts;
+    fib_path_ext_list_t fes_path_exts;
 
     /**
      * The path-list created by the source
@@ -436,6 +431,7 @@ typedef struct fib_entry_t_ {
 #define FIB_ENTRY_FORMAT_DETAIL2 (0x2)
 
 extern u8 *format_fib_entry (u8 * s, va_list * args);
+extern u8 *format_fib_source (u8 * s, va_list * args);
 
 extern fib_node_index_t fib_entry_create_special(u32 fib_index,
                                                 const fib_prefix_t *prefix,
@@ -533,6 +529,8 @@ extern int fib_entry_is_sourced(fib_node_index_t fib_entry_index,
 
 extern fib_node_index_t fib_entry_get_path_list(fib_node_index_t fib_entry_index);
 extern int fib_entry_is_resolved(fib_node_index_t fib_entry_index);
+extern void fib_entry_set_flow_hash_config(fib_node_index_t fib_entry_index,
+                                           flow_hash_config_t hash_config);
 
 extern void fib_entry_module_init(void);