speed = "bogus";
break;
}
- fformat (stdout, "details: %s sw_if_index %d sup_sw_if_index %d "
- "link_duplex %s link_speed %s",
- mp->interface_name, ntohl (mp->sw_if_index),
+ fformat (stdout,
+ "details: %s device_type %s sw_if_index %d sup_sw_if_index %d "
+ "link_duplex %s link_speed %s", mp->interface_name,
+ mp->interface_dev_type, ntohl (mp->sw_if_index),
ntohl (mp->sup_sw_if_index), duplex, speed);
if (mp->l2_address_length)
/* 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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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);
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;
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);
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
tmp[0] = clib_host_to_net_u64 (0xfe80000000000000ULL);
tmp[1] = clib_host_to_net_u64 (0x11ULL);
- clib_memcpy (mp->address, &tmp[0], 8);
- clib_memcpy (&mp->address[8], &tmp[1], 8);
+ ip6_address_encode ((ip6_address_encode *) & tmp, mp->address);
mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS);
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;
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;
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;
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;
int
main (int argc, char **argv)
{
- api_main_t *am = &api_main;
+ api_main_t *am = vlibapi_get_main ();
test_main_t *tm = &test_main;
int ch;