LISP EID virtualization support
[vpp.git] / vnet / vnet / lisp-cp / control.h
index 53d90fc..7cf3978 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,24 @@ typedef struct
   /* vector of map-resolver addresses */
   ip_address_t * map_resolvers;
 
+  /* map-request  locator set index */
+  u32 mreq_itr_rlocs;
+
+  /* Lookup vrf by vni */
+  uword * table_id_by_vni;
+
+  /* Lookup vni by vrf */
+  uword * vni_by_table_id;
+
+  /* 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,13 +143,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_set_name (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,
-                           u32 * ls_index);
+                           locator_set_t * ls, u32 * ls_index);
 
 typedef struct
 {
@@ -146,6 +163,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
 {
@@ -161,4 +181,28 @@ 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,
+                                  u8 del_all);
+
+int
+vnet_lisp_pitr_set_locator_set (u8 * locator_set_name, u8 is_add);
+
+typedef struct
+{
+  u8 is_add;
+  u8 * locator_set_name;
+} vnet_lisp_add_del_mreq_itr_rloc_args_t;
+
+int
+vnet_lisp_add_del_mreq_itr_rlocs (vnet_lisp_add_del_mreq_itr_rloc_args_t * a);
+
+int vnet_lisp_clear_all_remote_mappings (void);
+
+int vnet_lisp_eid_table_map (u32 vni, u32 vrf, u8 is_add);
+
 #endif /* VNET_CONTROL_H_ */