ipsec: IPSec protection for multi-point tunnel interfaces
[vpp.git] / src / vnet / srmpls / sr_mpls_api.c
index 2c36c0d..f17c8b4 100644 (file)
@@ -112,7 +112,7 @@ static void vl_api_sr_mpls_steering_add_del_t_handler
 {
   vl_api_sr_mpls_steering_add_del_reply_t *rmp;
   ip46_address_t prefix;
-  memset (&prefix, 0, sizeof (ip46_address_t));
+  clib_memset (&prefix, 0, sizeof (ip46_address_t));
   if (mp->traffic_type == SR_STEER_IPV4)
     memcpy (&prefix.ip4, mp->prefix_addr, sizeof (prefix.ip4));
   else
@@ -146,7 +146,7 @@ static void vl_api_sr_mpls_policy_assign_endpoint_color_t_handler
   int rv = 0;
 
   ip46_address_t endpoint;
-  memset (&endpoint, 0, sizeof (ip46_address_t));
+  clib_memset (&endpoint, 0, sizeof (ip46_address_t));
   if (mp->endpoint_type == SR_STEER_IPV4)
     memcpy (&endpoint.ip4, mp->endpoint, sizeof (endpoint.ip4));
   else
@@ -161,7 +161,7 @@ static void vl_api_sr_mpls_policy_assign_endpoint_color_t_handler
 
 /*
  * sr_mpls_api_hookup Add vpe's API message handlers to the table. vlib has
- * alread mapped shared memory and added the client registration handlers.
+ * already mapped shared memory and added the client registration handlers.
  * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
  */
 #define vl_msg_name_crc_list
@@ -179,7 +179,7 @@ setup_message_id_table (api_main_t * am)
 static clib_error_t *
 sr_mpls_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,                     \