X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2Fapi%2Fcustom_dump.c;h=4ec19e50408a89145c8a63eec4be902b48757101;hb=c97a7398fc465c480a3ac66cf4b0f91a034ed564;hp=c1aa14d54979e9c1834f478de1670c655a0c2cc0;hpb=0164a06d8145f416118183bd496124bfbdfcd3f2;p=vpp.git diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index c1aa14d5497..4ec19e50408 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -382,7 +382,7 @@ static void *vl_api_l2fib_add_del_t_print s = format (0, "SCRIPT: l2fib_add_del "); - s = format (s, "mac %U ", format_ethernet_address, &mp->mac); + s = format (s, "mac %U ", format_ethernet_address, mp->mac); s = format (s, "bd_id %d ", ntohl (mp->bd_id)); @@ -3196,6 +3196,41 @@ static void *vl_api_dns_resolve_name_t_print FINISH; } +static void *vl_api_dns_resolve_ip_t_print + (vl_api_dns_resolve_ip_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: dns_resolve_ip "); + if (mp->is_ip6) + s = format (s, "%U ", format_ip6_address, mp->address); + else + s = format (s, "%U ", format_ip4_address, mp->address); + FINISH; +} + +static void *vl_api_session_rule_add_del_t_print + (vl_api_session_rule_add_del_t * mp, void *handle) +{ + u8 *s; + 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) + 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); + 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); + FINISH; +} + #define foreach_custom_print_no_arg_function \ _(lisp_eid_table_vni_dump) \ _(lisp_map_resolver_dump) \ @@ -3391,7 +3426,9 @@ _(LLDP_CONFIG, lldp_config) \ _(SW_INTERFACE_SET_LLDP, sw_interface_set_lldp) \ _(DNS_ENABLE_DISABLE, dns_enable_disable) \ _(DNS_NAME_SERVER_ADD_DEL, dns_name_server_add_del) \ -_(DNS_RESOLVE_NAME, dns_resolve_name) +_(DNS_RESOLVE_NAME, dns_resolve_name) \ +_(DNS_RESOLVE_IP, dns_resolve_ip) \ +_(SESSION_RULE_ADD_DEL, session_rule_add_del) void vl_msg_api_custom_dump_configure (api_main_t * am) {