X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2Fapi%2Fcustom_dump.c;h=1cc2aa64c282c23187903541094b97c7cb2e1450;hb=cd01fb4237b78a1805e1dd4b018bd03eb342580c;hp=2a66031298117254df3ed31608be5869e1673c9f;hpb=00ec4019b399132a72467ed4c3fb039d4f2466b7;p=vpp.git diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 2a660312981..1cc2aa64c28 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -582,7 +582,11 @@ static void *vl_api_tap_create_v2_t_print if ((mp->tap_flags) & 0x1) s = format (s, "gso-enabled "); if ((mp->tap_flags) & 0x2) - s = format (s, "csum-offload-enabled"); + s = format (s, "csum-offload-enabled "); + if ((mp->tap_flags) & 0x4) + s = format (s, "persist "); + if ((mp->tap_flags) & 0x8) + s = format (s, "attach "); FINISH; } @@ -1898,8 +1902,10 @@ static void *vl_api_vxlan_gpe_add_del_tunnel_t_print s = format (0, "SCRIPT: vxlan_gpe_add_del_tunnel "); - ip46_address_t local = to_ip46 (mp->is_ipv6, mp->local); - ip46_address_t remote = to_ip46 (mp->is_ipv6, mp->remote); + ip46_address_t local, remote; + + ip_address_decode (&mp->local, &local); + ip_address_decode (&mp->remote, &remote); u8 is_grp = ip46_address_is_multicast (&remote); char *remote_name = is_grp ? "group" : "remote"; @@ -2183,11 +2189,11 @@ static void *vl_api_policer_add_del_t_print } s = format (s, "conform_action %U ", format_policer_action, - mp->conform_action_type, mp->conform_dscp); + mp->conform_action.type, mp->conform_action.dscp); s = format (s, "exceed_action %U ", format_policer_action, - mp->exceed_action_type, mp->exceed_dscp); + mp->exceed_action.type, mp->exceed_action.dscp); s = format (s, "violate_action %U ", format_policer_action, - mp->violate_action_type, mp->violate_dscp); + mp->violate_action.type, mp->violate_action.dscp); if (mp->color_aware) s = format (s, "color-aware "); @@ -2531,8 +2537,10 @@ static void *vl_api_pg_enable_disable_t_print u8 *s; s = format (0, "SCRIPT: pg_enable_disable "); - if ((mp->stream_name_length) > 0) - s = format (s, "stream %s", mp->stream_name); + if (vl_api_string_len (&mp->stream_name) > 0) + s = + format (s, "stream %s", + vl_api_from_api_to_new_c_string (&mp->stream_name)); if (!mp->is_enabled) s = format (s, "disable"); @@ -3374,13 +3382,13 @@ static void *vl_api_app_namespace_add_del_t_print (vl_api_app_namespace_add_del_t * mp, void *handle) { u8 *s; - u8 len = clib_min (mp->namespace_id_len, - ARRAY_LEN (mp->namespace_id) - 1); - mp->namespace_id[len] = 0; + s = format (0, "SCRIPT: app_namespace_add_del "); s = format (s, "ns-id %s secret %lu sw_if_index %d ipv4_fib_id %d " - "ipv6_fib_id %d", (char *) mp->namespace_id, mp->secret, - (mp->sw_if_index), (mp->ip4_fib_id), (mp->ip6_fib_id)); + "ipv6_fib_id %d", + vl_api_from_api_to_new_c_string (&mp->namespace_id), + mp->secret, (mp->sw_if_index), (mp->ip4_fib_id), + (mp->ip6_fib_id)); FINISH; } @@ -3395,7 +3403,7 @@ static void *vl_api_sw_interface_set_lldp_t_print s = format (0, "SCRIPT: sw_interface_set_lldp "); s = format (s, "sw_if_index %d ", (mp->sw_if_index)); - if (memcmp (mp->port_desc, null_data, sizeof (mp->port_desc))) + if (memcmp (&mp->port_desc, null_data, sizeof (mp->port_desc))) s = format (s, "port_desc %s ", mp->port_desc); if (memcmp (mp->mgmt_ip4, null_data, sizeof (mp->mgmt_ip4))) @@ -3429,21 +3437,25 @@ static void *vl_api_session_rule_add_del_t_print (vl_api_session_rule_add_del_t * mp, void *handle) { u8 *s; + fib_prefix_t lcl, rmt; char *proto = mp->transport_proto == 0 ? "tcp" : "udp"; s = format (0, "SCRIPT: session_rule_add_del "); mp->tag[sizeof (mp->tag) - 1] = 0; - if (mp->is_ip4) + ip_prefix_decode (&mp->lcl, &lcl); + ip_prefix_decode (&mp->rmt, &rmt); + + if (lcl.fp_proto == FIB_PROTOCOL_IP4) s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s", mp->appns_index, mp->scope, proto, format_ip4_address, - (ip4_address_t *) mp->lcl_ip, mp->lcl_plen, - format_ip4_address, (ip4_address_t *) mp->rmt_ip, - mp->rmt_plen, mp->action_index, mp->tag); + &lcl.fp_addr.ip4, lcl.fp_len, + format_ip4_address, &rmt.fp_addr.ip4, + rmt.fp_len, mp->action_index, mp->tag); else s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s", mp->appns_index, mp->scope, proto, format_ip6_address, - (ip6_address_t *) mp->lcl_ip, mp->lcl_plen, - format_ip6_address, (ip6_address_t *) mp->rmt_ip, - mp->rmt_plen, mp->action_index, mp->tag); + &lcl.fp_addr.ip6, lcl.fp_len, + format_ip6_address, &rmt.fp_addr.ip6, + rmt.fp_len, mp->action_index, mp->tag); FINISH; }