ONE-15: Fix duplicate locator, refactoring locator
[vpp.git] / vnet / vnet / lisp-cp / control.h
index 713dce6..fe5f597 100644 (file)
@@ -51,6 +51,9 @@ typedef struct
 
 typedef struct
 {
+  /* LISP feature status */
+  u8 is_enabled;
+
   /* eid table */
   gid_dictionary_t mapping_index_by_gid;
 
@@ -91,6 +94,18 @@ typedef struct
   /* vector of map-resolver addresses */
   ip_address_t * map_resolvers;
 
+  /* Lookup vrf by vni */
+  uword * table_id_by_vni;
+
+  /* Number of src prefixes in a vni that use an interface */
+  uword * dp_if_refcount_by_vni;
+
+  /* Proxy ETR map index */
+  u32 pitr_map_index;
+
+  /* LISP PITR mode */
+  u8 lisp_pitr;
+
   /* commodity */
   ip4_main_t * im4;
   ip6_main_t * im6;
@@ -122,6 +137,9 @@ typedef struct
 int
 vnet_lisp_add_del_locator_set (vnet_lisp_add_del_locator_set_args_t * a,
                               u32 * ls_index);
+int
+vnet_lisp_add_del_locator (vnet_lisp_add_del_locator_set_args_t * a,
+                           locator_set_t * ls, u32 * ls_index);
 
 typedef struct
 {
@@ -139,6 +157,9 @@ typedef struct
 int
 vnet_lisp_add_del_mapping (vnet_lisp_add_del_mapping_args_t *a,
                           u32 * map_index);
+int
+vnet_lisp_add_del_local_mapping (vnet_lisp_add_del_mapping_args_t * a,
+                                 u32 * map_index_result);
 
 typedef struct
 {
@@ -154,4 +175,14 @@ vnet_lisp_cp_get_main() {
   return &lisp_control_main;
 }
 
+clib_error_t * vnet_lisp_enable_disable (u8 is_enabled);
+u8 vnet_lisp_enable_disable_status (void);
+
+int
+vnet_lisp_add_del_remote_mapping (gid_address_t * deid, gid_address_t * seid,
+                                  ip_address_t * dlocs, u8 action, u8 is_add);
+
+int
+vnet_lisp_pitr_set_locator_set (u8 * locator_set_name, u8 is_add);
+
 #endif /* VNET_CONTROL_H_ */