aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/api/test_client.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-10-17 10:38:51 -0400
committerDamjan Marion <dmarion@me.com>2018-10-23 13:06:46 +0000
commitb7b929931a07fbb27b43d5cd105f366c3e29807e (patch)
tree438681c89738802dbb5d339715b96ea2c31bafb4 /src/vpp/api/test_client.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vpp/api/test_client.c')
-rw-r--r--src/vpp/api/test_client.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/vpp/api/test_client.c b/src/vpp/api/test_client.c
index e36fdbfc22c..1239732ec8e 100644
--- a/src/vpp/api/test_client.c
+++ b/src/vpp/api/test_client.c
@@ -656,7 +656,7 @@ link_up_down_enable_disable (test_main_t * tm, int enable)
/* Request admin / link up down messages */
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_WANT_INTERFACE_EVENTS);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -672,7 +672,7 @@ stats_enable_disable (test_main_t * tm, int enable)
vl_api_want_stats_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_WANT_STATS);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -688,7 +688,7 @@ oam_events_enable_disable (test_main_t * tm, int enable)
vl_api_want_oam_events_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_WANT_OAM_EVENTS);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -705,7 +705,7 @@ oam_add_del (test_main_t * tm, int is_add)
ip4_address_t tmp;
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_OAM_ADD_DEL);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -727,7 +727,7 @@ dump (test_main_t * tm)
vl_api_sw_interface_dump_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_SW_INTERFACE_DUMP);
mp->client_index = tm->my_client_index;
mp->name_filter_valid = 1;
@@ -743,7 +743,7 @@ add_del_ip4_route (test_main_t * tm, int enable_disable)
u32 tmp;
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_IP_ADD_DEL_ROUTE);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -772,7 +772,7 @@ add_del_ip6_route (test_main_t * tm, int enable_disable)
u64 tmp[2];
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_IP_ADD_DEL_ROUTE);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -804,7 +804,7 @@ add_del_interface_address (test_main_t * tm, int enable_disable)
u32 tmp;
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_SW_INTERFACE_ADD_DEL_ADDRESS);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -825,7 +825,7 @@ add_del_v6_interface_address (test_main_t * tm, int enable_disable)
u64 tmp[2];
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_SW_INTERFACE_ADD_DEL_ADDRESS);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -849,7 +849,7 @@ del_all_interface_addresses (test_main_t * tm)
vl_api_sw_interface_add_del_address_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_SW_INTERFACE_ADD_DEL_ADDRESS);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -865,7 +865,7 @@ set_interface_table (test_main_t * tm, int is_ipv6, u32 vrf_id)
vl_api_sw_interface_set_table_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_SW_INTERFACE_SET_TABLE);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -882,7 +882,7 @@ connect_unix_tap (test_main_t * tm, char *name)
vl_api_tap_connect_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_TAP_CONNECT);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -897,7 +897,7 @@ create_vlan_subif (test_main_t * tm, u32 vlan_id)
vl_api_create_vlan_subif_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_CREATE_VLAN_SUBIF);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -914,7 +914,7 @@ add_del_proxy_arp (test_main_t * tm, int is_add)
u32 tmp;
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_PROXY_ARP_ADD_DEL);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -937,7 +937,7 @@ proxy_arp_intfc_enable_disable (test_main_t * tm, int enable_disable)
vl_api_proxy_arp_intfc_enable_disable_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_PROXY_ARP_INTFC_ENABLE_DISABLE);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -954,14 +954,14 @@ add_ip4_neighbor (test_main_t * tm, int add_del)
u32 tmp;
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_IP_NEIGHBOR_ADD_DEL);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
mp->sw_if_index = ntohl (6);
mp->is_add = add_del;
- memset (mp->mac_address, 0xbe, sizeof (mp->mac_address));
+ clib_memset (mp->mac_address, 0xbe, sizeof (mp->mac_address));
tmp = ntohl (0x0101010a);
clib_memcpy (mp->dst_address, &tmp, 4);
@@ -976,7 +976,7 @@ add_ip6_neighbor (test_main_t * tm, int add_del)
u64 tmp[2];
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_IP_NEIGHBOR_ADD_DEL);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -984,7 +984,7 @@ add_ip6_neighbor (test_main_t * tm, int add_del)
mp->is_add = add_del;
mp->is_ipv6 = 1;
- memset (mp->mac_address, 0xbe, sizeof (mp->mac_address));
+ clib_memset (mp->mac_address, 0xbe, sizeof (mp->mac_address));
tmp[0] = clib_host_to_net_u64 (0xdb01000000000000ULL);
tmp[1] = clib_host_to_net_u64 (0x11ULL);
@@ -1001,7 +1001,7 @@ reset_fib (test_main_t * tm, u8 is_ip6)
vl_api_reset_fib_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_RESET_FIB);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1017,7 +1017,7 @@ dhcpv6_set_vss (test_main_t * tm)
vl_api_dhcp_proxy_set_vss_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_DHCP_PROXY_SET_VSS);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1034,7 +1034,7 @@ dhcpv4_set_vss (test_main_t * tm)
vl_api_dhcp_proxy_set_vss_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_DHCP_PROXY_SET_VSS);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1058,7 +1058,7 @@ dhcp_set_proxy (test_main_t * tm, int ipv6)
vl_api_dhcp_proxy_config_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_DHCP_PROXY_CONFIG);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1095,7 +1095,7 @@ set_ip_flow_hash (test_main_t * tm, u8 is_ip6)
vl_api_set_ip_flow_hash_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_SET_IP_FLOW_HASH);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1113,7 +1113,7 @@ ip6nd_ra_config (test_main_t * tm, int is_no)
vl_api_sw_interface_ip6nd_ra_config_t *mp;
mp = vl_msg_api_alloc (sizeof (*mp));
- memset (mp, 0, sizeof (*mp));
+ clib_memset (mp, 0, sizeof (*mp));
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1134,7 +1134,7 @@ ip6nd_ra_prefix (test_main_t * tm, int is_no)
u64 tmp[2];
mp = vl_msg_api_alloc (sizeof (*mp));
- memset (mp, 0, sizeof (*mp));
+ clib_memset (mp, 0, sizeof (*mp));
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1164,7 +1164,7 @@ ip6_enable_disable (test_main_t * tm, int enable)
vl_api_sw_interface_ip6_enable_disable_t *mp;
mp = vl_msg_api_alloc (sizeof (*mp));
- memset (mp, 0, sizeof (*mp));
+ clib_memset (mp, 0, sizeof (*mp));
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1181,7 +1181,7 @@ loop_create (test_main_t * tm)
vl_api_create_loopback_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_CREATE_LOOPBACK);
mp->client_index = tm->my_client_index;
@@ -1196,7 +1196,7 @@ ip6_set_link_local_address (test_main_t * tm)
u64 tmp[2];
mp = vl_msg_api_alloc (sizeof (*mp));
- memset (mp, 0, sizeof (*mp));
+ clib_memset (mp, 0, sizeof (*mp));
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1220,7 +1220,7 @@ set_flags (test_main_t * tm, int up_down)
vl_api_sw_interface_set_flags_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_SW_INTERFACE_SET_FLAGS);
mp->client_index = tm->my_client_index;
@@ -1237,7 +1237,7 @@ l2_patch_add_del (test_main_t * tm, int is_add)
vl_api_l2_patch_add_del_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_L2_PATCH_ADD_DEL);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1254,7 +1254,7 @@ l2_xconnect (test_main_t * tm)
vl_api_sw_interface_set_l2_xconnect_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_SW_INTERFACE_SET_L2_XCONNECT);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;
@@ -1271,7 +1271,7 @@ l2_bridge (test_main_t * tm)
vl_api_sw_interface_set_l2_bridge_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_SW_INTERFACE_SET_L2_BRIDGE);
mp->client_index = tm->my_client_index;
mp->context = 0xdeadbeef;