X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2Fapi%2Fcustom_dump.c;h=83761bf62769781ef95f4d079f748dc5f0006f36;hb=c12eae73f;hp=36ffe5ef53d371e8d606f3313dbaf0056ded5ba2;hpb=33a58171e5995d9e649b414bfc77f2aab26e4c58;p=vpp.git diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 36ffe5ef53d..83761bf6276 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -1037,84 +1036,6 @@ vl_api_reset_fib_t_print (vl_api_reset_fib_t * mp, void *handle) FINISH; } -static void *vl_api_dhcp_proxy_config_t_print - (vl_api_dhcp_proxy_config_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: dhcp_proxy_config_2 "); - - s = format (s, "rx_vrf_id %d ", (mp->rx_vrf_id)); - s = format (s, "server_vrf_id %d ", (mp->server_vrf_id)); - - if (mp->is_ipv6) - { - s = format (s, "svr %U ", format_ip6_address, - (ip6_address_t *) mp->dhcp_server); - s = format (s, "src %U ", format_ip6_address, - (ip6_address_t *) mp->dhcp_src_address); - } - else - { - s = format (s, "svr %U ", format_ip4_address, - (ip4_address_t *) mp->dhcp_server); - s = format (s, "src %U ", format_ip4_address, - (ip4_address_t *) mp->dhcp_src_address); - } - if (mp->is_add == 0) - s = format (s, "del "); - - FINISH; -} - -static void *vl_api_dhcp_proxy_set_vss_t_print - (vl_api_dhcp_proxy_set_vss_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: dhcp_proxy_set_vss "); - - s = format (s, "tbl_id %d ", (mp->tbl_id)); - - if (mp->vss_type == VSS_TYPE_VPN_ID) - { - s = format (s, "fib_id %d ", (mp->vpn_index)); - s = format (s, "oui %d ", (mp->oui)); - } - else if (mp->vss_type == VSS_TYPE_ASCII) - s = format (s, "vpn_ascii_id %s", mp->vpn_ascii_id); - - if (mp->is_ipv6 != 0) - s = format (s, "ipv6 "); - - if (mp->is_add == 0) - s = format (s, "del "); - - FINISH; -} - -static void *vl_api_dhcp_client_config_t_print - (vl_api_dhcp_client_config_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: dhcp_client_config "); - - s = format (s, "sw_if_index %d ", (mp->client.sw_if_index)); - - s = format (s, "hostname %s ", mp->client.hostname); - - s = format (s, "want_dhcp_event %d ", mp->client.want_dhcp_event); - - s = format (s, "pid %d ", (mp->client.pid)); - - if (mp->is_add == 0) - s = format (s, "del "); - - FINISH; -} - - static void *vl_api_set_ip_flow_hash_t_print (vl_api_set_ip_flow_hash_t * mp, void *handle) { @@ -1588,8 +1509,9 @@ static void *vl_api_l2tpv3_create_tunnel_t_print s = format (0, "SCRIPT: l2tpv3_create_tunnel "); s = format (s, "client_address %U our_address %U ", - format_ip6_address, (ip6_address_t *) (mp->client_address), - format_ip6_address, (ip6_address_t *) (mp->our_address)); + format_ip6_address, + (ip6_address_t *) (mp->client_address.un.ip6), + format_ip6_address, (ip6_address_t *) (mp->our_address.un.ip6)); s = format (s, "local_session_id %d ", (mp->local_session_id)); s = format (s, "remote_session_id %d ", (mp->remote_session_id)); s = format (s, "local_cookie %lld ", @@ -1787,8 +1709,10 @@ static void *vl_api_geneve_add_del_tunnel_t_print u8 *s; s = format (0, "SCRIPT: geneve_add_del_tunnel "); - ip46_address_t local = to_ip46 (mp->is_ipv6, mp->local_address); - ip46_address_t remote = to_ip46 (mp->is_ipv6, mp->remote_address); + ip46_address_t local; + ip46_address_t remote; + ip_address_decode (&mp->remote_address, &remote); + ip_address_decode (&mp->local_address, &local); u8 is_grp = ip46_address_is_multicast (&remote); char *remote_name = is_grp ? "group" : "dst"; @@ -1978,7 +1902,11 @@ static void *vl_api_sw_interface_dump_t_print s = format (0, "SCRIPT: sw_interface_dump "); if (mp->name_filter_valid) - s = format (s, "name_filter %s ", mp->name_filter); + { + u8 *v = vl_api_from_api_to_vec (&mp->name_filter); + s = format (s, "name_filter %v ", v); + vec_free (v); + } else s = format (s, "all "); @@ -2633,10 +2561,10 @@ static void *vl_api_set_ipfix_exporter_t_print s = format (0, "SCRIPT: set_ipfix_exporter "); s = format (s, "collector-address %U ", format_ip4_address, - (ip4_address_t *) mp->collector_address); + (ip4_address_t *) mp->collector_address.un.ip4); s = format (s, "collector-port %d ", (mp->collector_port)); s = format (s, "src-address %U ", format_ip4_address, - (ip4_address_t *) mp->src_address); + (ip4_address_t *) mp->src_address.un.ip4); s = format (s, "vrf-id %d ", (mp->vrf_id)); s = format (s, "path-mtu %d ", (mp->path_mtu)); s = format (s, "template-interval %d ", (mp->template_interval)); @@ -3552,6 +3480,21 @@ static void *vl_api_feature_enable_disable_t_print FINISH; } +static void *vl_api_feature_gso_enable_disable_t_print + (vl_api_feature_gso_enable_disable_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: feature_gso_enable_disable "); + s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + if (mp->enable_disable) + s = format (s, "enable"); + if (!mp->enable_disable) + s = format (s, "disable"); + + FINISH; +} + static void *vl_api_sw_interface_tag_add_del_t_print (vl_api_sw_interface_tag_add_del_t * mp, void *handle) { @@ -3795,8 +3738,6 @@ _(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \ _(CREATE_VLAN_SUBIF, create_vlan_subif) \ _(CREATE_SUBIF, create_subif) \ _(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_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \ _(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \ @@ -3823,7 +3764,6 @@ _(BRIDGE_DOMAIN_SET_MAC_AGE, bridge_domain_set_mac_age) \ _(CLASSIFY_SET_INTERFACE_IP_TABLE, classify_set_interface_ip_table) \ _(CLASSIFY_SET_INTERFACE_L2_TABLES, classify_set_interface_l2_tables) \ _(ADD_NODE_NEXT, add_node_next) \ -_(DHCP_CLIENT_CONFIG, dhcp_client_config) \ _(L2TPV3_CREATE_TUNNEL, l2tpv3_create_tunnel) \ _(L2TPV3_SET_TUNNEL_COOKIES, l2tpv3_set_tunnel_cookies) \ _(L2TPV3_INTERFACE_ENABLE_DISABLE, l2tpv3_interface_enable_disable) \ @@ -3946,6 +3886,7 @@ _(IOAM_DISABLE, ioam_disable) \ _(IP_TABLE_DUMP, ip_table_dump) \ _(IP_ROUTE_DUMP, ip_route_dump) \ _(FEATURE_ENABLE_DISABLE, feature_enable_disable) \ +_(FEATURE_GSO_ENABLE_DISABLE, feature_gso_enable_disable) \ _(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del) \ _(HW_INTERFACE_SET_MTU, hw_interface_set_mtu) \ _(P2P_ETHERNET_ADD, p2p_ethernet_add) \