X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2Fapi%2Fcustom_dump.c;h=26e87d67cbc314d67fc3490fc695b7856983b59a;hb=582caa3bb67a1380c12790ba6f98450b92835761;hp=a51b6aa2dc610f701a8fb078df7272278591dbb3;hpb=5ba5837b150acb7c827809b262eb43230030422e;p=vpp.git diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index a51b6aa2dc6..26e87d67cbc 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -37,7 +38,7 @@ #include #include #include - +#include #include #include @@ -46,6 +47,8 @@ #include +#include + #define vl_typedefs /* define message structures */ #include #undef vl_typedefs @@ -557,7 +560,7 @@ static void *vl_api_tap_create_v2_t_print memset (null_mac, 0, sizeof (null_mac)); s = format (0, "SCRIPT: tap_create_v2 "); - s = format (s, "id %s ", mp->id); + s = format (s, "id %u ", mp->id); if (memcmp (mp->mac_address, null_mac, 6)) s = format (s, "mac-address %U ", format_ethernet_address, mp->mac_address); @@ -608,6 +611,84 @@ static void *vl_api_sw_interface_tap_v2_dump_t_print FINISH; } +static void *vl_api_bond_create_t_print + (vl_api_bond_create_t * mp, void *handle) +{ + u8 *s; + u8 null_mac[6]; + + memset (null_mac, 0, sizeof (null_mac)); + + s = format (0, "SCRIPT: bond_create "); + if (memcmp (mp->mac_address, null_mac, 6)) + s = format (s, "mac-address %U ", + format_ethernet_address, mp->mac_address); + if (mp->mode) + s = format (s, "mode %U", format_bond_mode, mp->mode); + if (mp->lb) + s = format (s, "lb %U", format_bond_load_balance, mp->lb); + FINISH; +} + +static void *vl_api_bond_delete_t_print + (vl_api_bond_delete_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: bond_delete "); + s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + + FINISH; +} + +static void *vl_api_bond_enslave_t_print + (vl_api_bond_enslave_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: bond_enslave "); + s = format (s, "bond_sw_if_index %u ", mp->bond_sw_if_index); + s = format (s, "sw_if_index %u ", mp->sw_if_index); + if (mp->is_passive) + s = format (s, "passive "); + if (mp->is_long_timeout) + s = format (s, "long-timeout "); + + FINISH; +} + +static void *vl_api_bond_detach_slave_t_print + (vl_api_bond_detach_slave_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: bond_detach_slave "); + s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + + FINISH; +} + +static void *vl_api_sw_interface_bond_dump_t_print + (vl_api_sw_interface_bond_dump_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: sw_interface_bond_dump "); + + FINISH; +} + +static void *vl_api_sw_interface_slave_dump_t_print + (vl_api_sw_interface_slave_dump_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: sw_interface_slave_dump "); + s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + + FINISH; +} + static void *vl_api_ip_add_del_route_t_print (vl_api_ip_add_del_route_t * mp, void *handle) { @@ -1622,9 +1703,14 @@ static void *vl_api_gre_add_del_tunnel_t_print (ip46_address_t *) & (mp->src_address), mp->is_ipv6 ? IP46_TYPE_IP6 : IP46_TYPE_IP4); - if (mp->teb) + s = format (s, "instance %d ", ntohl (mp->instance)); + + if (mp->tunnel_type == GRE_TUNNEL_TYPE_TEB) s = format (s, "teb "); + if (mp->tunnel_type == GRE_TUNNEL_TYPE_ERSPAN) + s = format (s, "erspan %d ", ntohs (mp->session_id)); + if (mp->outer_fib_id) s = format (s, "outer-fib-id %d ", ntohl (mp->outer_fib_id)); @@ -1910,6 +1996,21 @@ static void *vl_api_interface_name_renumber_t_print FINISH; } +static void *vl_api_ip_probe_neighbor_t_print + (vl_api_ip_probe_neighbor_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: ip_probe_neighbor "); + s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + if (mp->is_ipv6) + s = format (s, "address %U ", format_ip6_address, &mp->dst_address); + else + s = format (s, "address %U ", format_ip4_address, &mp->dst_address); + + FINISH; +} + static void *vl_api_want_ip4_arp_events_t_print (vl_api_want_ip4_arp_events_t * mp, void *handle) { @@ -3317,6 +3418,20 @@ static void *vl_api_ip_container_proxy_add_del_t_print FINISH; } +static void *vl_api_qos_record_enable_disable_t_print + (vl_api_qos_record_enable_disable_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: qos_record_enable_disable "); + s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "input_source %U ", format_qos_source, mp->input_source); + + if (!mp->enable) + s = format (s, "disable "); + + FINISH; +} #define foreach_custom_print_no_arg_function \ _(lisp_eid_table_vni_dump) \ @@ -3351,6 +3466,10 @@ _(TAP_CONNECT, tap_connect) \ _(TAP_MODIFY, tap_modify) \ _(TAP_DELETE, tap_delete) \ _(SW_INTERFACE_TAP_DUMP, sw_interface_tap_dump) \ +_(BOND_CREATE, bond_create) \ +_(BOND_DELETE, bond_delete) \ +_(BOND_ENSLAVE, bond_enslave) \ +_(BOND_DETACH_SLAVE, bond_detach_slave) \ _(TAP_CREATE_V2, tap_create_v2) \ _(TAP_DELETE_V2, tap_delete_v2) \ _(SW_INTERFACE_TAP_V2_DUMP, sw_interface_tap_v2_dump) \ @@ -3425,6 +3544,7 @@ _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \ _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \ _(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \ _(INTERFACE_NAME_RENUMBER, interface_name_renumber) \ +_(IP_PROBE_NEIGHBOR, ip_probe_neighbor) \ _(WANT_IP4_ARP_EVENTS, want_ip4_arp_events) \ _(WANT_IP6_ND_EVENTS, want_ip6_nd_events) \ _(WANT_L2_MACS_EVENTS, want_l2_macs_events) \ @@ -3518,7 +3638,8 @@ _(DNS_NAME_SERVER_ADD_DEL, dns_name_server_add_del) \ _(DNS_RESOLVE_NAME, dns_resolve_name) \ _(DNS_RESOLVE_IP, dns_resolve_ip) \ _(SESSION_RULE_ADD_DEL, session_rule_add_del) \ -_(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface) +_(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface) \ +_(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) void vl_msg_api_custom_dump_configure (api_main_t * am) {