VPP-362 Implement dumping of LISP adjacencies
[vpp.git] / vnet / vnet / lisp-cp / control.h
index 02efd04..7a56d4f 100644 (file)
@@ -37,11 +37,18 @@ typedef struct
 
 typedef struct
 {
-  gid_address_t seid;
-  gid_address_t deid;
+  gid_address_t leid;
+  gid_address_t reid;
+  u8 is_src_dst;
   locator_pair_t *locator_pairs;
 } fwd_entry_t;
 
+typedef struct
+{
+  gid_address_t leid;
+  gid_address_t reid;
+} lisp_adjacency_t;
+
 typedef enum
 {
   IP4_MISS_PACKET,
@@ -63,6 +70,13 @@ typedef struct
   miss_packet_type_t type;
 } miss_packet_t;
 
+typedef enum
+{
+  MR_MODE_DST_ONLY = 0,
+  MR_MODE_SRC_DST,
+  _MR_MODE_MAX
+} map_request_mode_t;
+
 typedef struct
 {
   /* LISP feature status */
@@ -129,7 +143,6 @@ typedef struct
   uword *vni_by_bd_id;
 
   /* track l2 and l3 interfaces that have been created for vni */
-  uword *dp_intf_by_vni;
   uword *l2_dp_intf_by_vni;
 
   /* Proxy ETR map index */
@@ -138,6 +151,9 @@ typedef struct
   /* LISP PITR mode */
   u8 lisp_pitr;
 
+  /* map request mode */
+  u8 map_request_mode;
+
   /* commodity */
   ip4_main_t *im4;
   ip6_main_t *im6;
@@ -207,8 +223,8 @@ vnet_lisp_add_del_mapping (gid_address_t * deid, locator_t * dlocs, u8 action,
 
 typedef struct
 {
-  gid_address_t deid;
-  gid_address_t seid;
+  gid_address_t reid;
+  gid_address_t leid;
   u8 is_add;
 } vnet_lisp_add_del_adjacency_args_t;
 
@@ -240,6 +256,9 @@ vnet_lisp_add_del_mreq_itr_rlocs (vnet_lisp_add_del_mreq_itr_rloc_args_t * a);
 int vnet_lisp_clear_all_remote_adjacencies (void);
 
 int vnet_lisp_eid_table_map (u32 vni, u32 vrf, u8 is_l2, u8 is_add);
+int vnet_lisp_set_map_request_mode (u8 mode);
+u8 vnet_lisp_get_map_request_mode (void);
+lisp_adjacency_t *vnet_lisp_adjacencies_get_by_vni (u32 vni);
 
 static inline void
 lisp_pending_map_request_lock (lisp_cp_main_t * lcm)