X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=src%2Fvpp%2Fapi%2Fcustom_dump.c;h=0d8b453188d5c60bde401145433c30becc93cc23;hp=8fd4a8deeb10a87824570df26bbe2eef92ee8ecc;hb=e26c81f;hpb=06fda9cea94e0009fd0238a77d2e0f39e46f666c diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 8fd4a8deeb1..0d8b453188d 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -46,6 +46,7 @@ #include #include +#include #include @@ -506,20 +507,25 @@ static void *vl_api_bd_ip_mac_add_del_t_print s = format (0, "SCRIPT: bd_ip_mac_add_del "); s = format (s, "bd_id %d ", ntohl (mp->bd_id)); - if (mp->is_ipv6) - s = format (s, "%U ", format_ip6_address, - (ip6_address_t *) mp->ip_address); - else - s = format (s, "%U ", format_ip4_address, - (ip4_address_t *) mp->ip_address); - - s = format (s, "%U ", format_ethernet_address, mp->mac_address); + s = format (s, "%U ", format_vl_api_address, &mp->ip); + s = format (s, "%U ", format_vl_api_mac_address, &mp->mac); if (mp->is_add == 0) s = format (s, "del "); FINISH; } +static void *vl_api_bd_ip_mac_flush_t_print + (vl_api_bd_ip_mac_flush_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: bd_ip_mac_flush "); + s = format (s, "bd_id %d ", ntohl (mp->bd_id)); + + FINISH; +} + static void *vl_api_bd_ip_mac_dump_t_print (vl_api_bd_ip_mac_dump_t * mp, void *handle) { @@ -536,7 +542,7 @@ static void *vl_api_tap_connect_t_print u8 *s; u8 null_mac[6]; - memset (null_mac, 0, sizeof (null_mac)); + clib_memset (null_mac, 0, sizeof (null_mac)); s = format (0, "SCRIPT: tap_connect "); s = format (s, "tapname %s ", mp->tap_name); @@ -561,7 +567,7 @@ static void *vl_api_tap_modify_t_print u8 *s; u8 null_mac[6]; - memset (null_mac, 0, sizeof (null_mac)); + clib_memset (null_mac, 0, sizeof (null_mac)); s = format (0, "SCRIPT: tap_modify "); s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); @@ -602,7 +608,7 @@ static void *vl_api_tap_create_v2_t_print u8 *s; u8 null_mac[6]; - memset (null_mac, 0, sizeof (null_mac)); + clib_memset (null_mac, 0, sizeof (null_mac)); s = format (0, "SCRIPT: tap_create_v2 "); s = format (s, "id %u ", ntohl (mp->id)); @@ -662,7 +668,7 @@ static void *vl_api_bond_create_t_print u8 *s; u8 null_mac[6]; - memset (null_mac, 0, sizeof (null_mac)); + clib_memset (null_mac, 0, sizeof (null_mac)); s = format (0, "SCRIPT: bond_create "); if (memcmp (mp->mac_address, null_mac, 6)) @@ -1036,7 +1042,7 @@ static void *vl_api_ip_neighbor_add_del_t_print u8 *s; u8 null_mac[6]; - memset (null_mac, 0, sizeof (null_mac)); + clib_memset (null_mac, 0, sizeof (null_mac)); s = format (0, "SCRIPT: ip_neighbor_add_del "); @@ -1274,20 +1280,6 @@ static void *vl_api_set_ip_flow_hash_t_print FINISH; } -static void *vl_api_sw_interface_ip6_set_link_local_address_t_print - (vl_api_sw_interface_ip6_set_link_local_address_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: sw_interface_ip6_set_link_local_address "); - - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - - s = format (s, "%U ", format_ip6_address, mp->address); - - FINISH; -} - static void *vl_api_sw_interface_ip6nd_ra_prefix_t_print (vl_api_sw_interface_ip6nd_ra_prefix_t * mp, void *handle) { @@ -2128,10 +2120,10 @@ static void *vl_api_cli_inband_t_print { u8 *s; u8 *cmd = 0; - u32 length = ntohl (mp->length); + u32 length = vl_api_string_len (&mp->cmd); vec_validate (cmd, length); - clib_memcpy (cmd, mp->cmd, length); + clib_memcpy (cmd, vl_api_from_api_string (&mp->cmd), length); s = format (0, "SCRIPT: exec %v ", cmd); @@ -3382,19 +3374,19 @@ static void *vl_api_flow_classify_set_interface_t_print } static void * -vl_api_punt_t_print (vl_api_punt_t * mp, void *handle) +vl_api_set_punt_t_print (vl_api_set_punt_t * mp, void *handle) { u8 *s; s = format (0, "SCRIPT: punt "); - if (mp->ipv != (u8) ~ 0) - s = format (s, "ip %d ", mp->ipv); + if (mp->punt.ipv != (u8) ~ 0) + s = format (s, "ip %d ", mp->punt.ipv); - s = format (s, "protocol %d ", mp->l4_protocol); + s = format (s, "protocol %d ", mp->punt.l4_protocol); - if (mp->l4_port != (u16) ~ 0) - s = format (s, "port %d ", ntohs (mp->l4_port)); + if (mp->punt.l4_port != (u16) ~ 0) + s = format (s, "port %d ", ntohs (mp->punt.l4_port)); if (!mp->is_add) s = format (s, "del "); @@ -3601,7 +3593,7 @@ static void *vl_api_sw_interface_set_lldp_t_print u8 *s; u8 null_data[256]; - memset (null_data, 0, sizeof (null_data)); + clib_memset (null_data, 0, sizeof (null_data)); s = format (0, "SCRIPT: sw_interface_set_lldp "); s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); @@ -3779,8 +3771,6 @@ _(RESET_FIB, reset_fib) \ _(DHCP_PROXY_CONFIG, dhcp_proxy_config) \ _(DHCP_PROXY_SET_VSS, dhcp_proxy_set_vss) \ _(SET_IP_FLOW_HASH, set_ip_flow_hash) \ -_(SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS, \ - sw_interface_ip6_set_link_local_address) \ _(SW_INTERFACE_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \ _(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \ _(SET_ARP_NEIGHBOR_LIMIT, set_arp_neighbor_limit) \ @@ -3848,6 +3838,7 @@ _(IP_ADDRESS_DUMP, ip_address_dump) \ _(IP_DUMP, ip_dump) \ _(DELETE_LOOPBACK, delete_loopback) \ _(BD_IP_MAC_ADD_DEL, bd_ip_mac_add_del) \ +_(BD_IP_MAC_FLUSH, bd_ip_mac_flush) \ _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \ _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) \ _(AF_PACKET_CREATE, af_packet_create) \ @@ -3912,7 +3903,7 @@ _(IPSEC_GRE_ADD_DEL_TUNNEL, ipsec_gre_add_del_tunnel) \ _(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump) \ _(DELETE_SUBIF, delete_subif) \ _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite) \ -_(PUNT, punt) \ +_(SET_PUNT, set_punt) \ _(FLOW_CLASSIFY_SET_INTERFACE, flow_classify_set_interface) \ _(FLOW_CLASSIFY_DUMP, flow_classify_dump) \ _(GET_FIRST_MSG_ID, get_first_msg_id) \