ipsec: IPSec protection for multi-point tunnel interfaces
[vpp.git] / src / vnet / policer / policer_api.c
index 77efe85..ae57a93 100644 (file)
@@ -60,7 +60,7 @@ vl_api_policer_add_del_t_handler (vl_api_policer_add_del_t * mp)
   name = format (0, "%s", mp->name);
   vec_terminate_c_string (name);
 
-  memset (&cfg, 0, sizeof (cfg));
+  clib_memset (&cfg, 0, sizeof (cfg));
   cfg.rfc = mp->type;
   cfg.rnd_type = mp->round_type;
   cfg.rate_type = mp->rate_type;
@@ -101,7 +101,7 @@ send_policer_details (u8 * name,
   vl_api_policer_details_t *mp;
 
   mp = vl_msg_api_alloc (sizeof (*mp));
-  memset (mp, 0, sizeof (*mp));
+  clib_memset (mp, 0, sizeof (*mp));
   mp->_vl_msg_id = ntohs (VL_API_POLICER_DETAILS);
   mp->context = context;
   mp->cir = htonl (config->rb.kbps.cir_kbps);
@@ -185,7 +185,7 @@ vl_api_policer_dump_t_handler (vl_api_policer_dump_t * mp)
 /*
  * policer_api_hookup
  * Add vpe's API message handlers to the table.
- * vlib has alread mapped shared memory and
+ * vlib has already mapped shared memory and
  * added the client registration handlers.
  * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
  */
@@ -204,7 +204,7 @@ setup_message_id_table (api_main_t * am)
 static clib_error_t *
 policer_api_hookup (vlib_main_t * vm)
 {
-  api_main_t *am = &api_main;
+  api_main_t *am = vlibapi_get_main ();
 
 #define _(N,n)                                                  \
     vl_msg_api_set_handlers(VL_API_##N, #n,                     \