Fix vnet unit tests
[vpp.git] / src / vnet / lisp-cp / control.h
index 933b34b..cb98eb0 100644 (file)
@@ -95,7 +95,8 @@ typedef enum
 } map_request_mode_t;
 
 #define foreach_lisp_flag_bit       \
-  _(USE_PETR, "Use Proxy-ETR")
+  _(USE_PETR, "Use Proxy-ETR")                  \
+  _(STATS_ENABLED, "Statistics enabled")
 
 typedef enum lisp_flag_bits
 {
@@ -210,9 +211,6 @@ typedef struct
   /* timing wheel for mappping timeouts */
   timing_wheel_t wheel;
 
-  /* statistics */
-  u8 stats_enabled;
-
   /* commodity */
   ip4_main_t *im4;
   ip6_main_t *im6;
@@ -235,6 +233,11 @@ vnet_lisp_cp_get_main ()
   return &lisp_control_main;
 }
 
+void
+get_src_and_dst_eids_from_buffer (lisp_cp_main_t * lcm, vlib_buffer_t * b,
+                                 gid_address_t * src, gid_address_t * dst,
+                                 u16 type);
+
 typedef struct
 {
   u8 is_add;
@@ -270,6 +273,13 @@ typedef struct
   u8 key_id;
 } vnet_lisp_add_del_mapping_args_t;
 
+typedef struct
+{
+  u64 nonce;
+  u8 is_rloc_probe;
+  mapping_t *mappings;
+} map_records_arg_t;
+
 int
 vnet_lisp_map_cache_add_del (vnet_lisp_add_del_mapping_args_t * a,
                             u32 * map_index);
@@ -329,15 +339,14 @@ int vnet_lisp_map_register_enable_disable (u8 is_enable);
 u8 vnet_lisp_map_register_state_get (void);
 u8 vnet_lisp_rloc_probe_state_get (void);
 
+map_records_arg_t *parse_map_reply (vlib_buffer_t * b);
+
 always_inline mapping_t *
 lisp_get_petr_mapping (lisp_cp_main_t * lcm)
 {
   return pool_elt_at_index (lcm->mapping_pool, lcm->petr_map_index);
 }
 
-u8 vnet_lisp_stats_enable_disable_state (void);
-vnet_api_error_t vnet_lisp_stats_enable_disable (u8 enable);
-
 #endif /* VNET_CONTROL_H_ */
 
 /*