X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2Fapi%2Fcustom_dump.c;h=ded6e7de337e0be1c7f548286736c215c9bb4ca6;hb=9cd2d7a5a4fafadb65d772c48109d55d1e19d425;hp=28f16d2fe67fce0325e9591721d497735c0c5799;hpb=43ebe29b6ea1107c30311cfb3dbd8190282903d0;p=vpp.git diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 28f16d2fe67..ded6e7de337 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -47,6 +47,8 @@ #include +#include + #define vl_typedefs /* define message structures */ #include #undef vl_typedefs @@ -609,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) { @@ -3357,6 +3437,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) \