X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2Fapi%2Fcustom_dump.c;h=8c5e0e52e546263f4034c3180568d909a54f9f18;hb=ea7178631;hp=2c2c7ab06fcb243147856c40e71aa4d0a95e47f1;hpb=49ee68443d41ffe1ab72c964104da980a2eb4367;p=vpp.git diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 2c2c7ab06fc..8c5e0e52e54 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -19,11 +19,11 @@ #include #include -#include +#include #include +#include #include #include -#include #include #include #include @@ -52,6 +52,8 @@ #include +#include + #define vl_typedefs /* define message structures */ #include #undef vl_typedefs @@ -87,7 +89,7 @@ static void *vl_api_create_loopback_instance_t_print s = format (0, "SCRIPT: create_loopback "); s = format (s, "mac %U ", format_ethernet_address, &mp->mac_address); - s = format (s, "instance %d ", ntohl (mp->user_instance)); + s = format (s, "instance %d ", mp->user_instance); FINISH; } @@ -98,7 +100,7 @@ static void *vl_api_delete_loopback_t_print u8 *s; s = format (0, "SCRIPT: delete_loopback "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", mp->sw_if_index); FINISH; } @@ -109,9 +111,9 @@ static void *vl_api_sw_interface_set_flags_t_print u8 *s; s = format (0, "SCRIPT: sw_interface_set_flags "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", mp->sw_if_index); - if (mp->admin_up_down) + if ((mp->flags) & IF_STATUS_API_FLAG_ADMIN_UP) s = format (s, "admin-up "); else s = format (s, "admin-down "); @@ -126,23 +128,22 @@ __clib_unused u8 *s; s = format (0, "SCRIPT: sw_interface_set_rx_placement "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", mp->sw_if_index); - s = format (s, "queue %d ", ntohl (mp->queue_id)); + s = format (s, "queue %d ", mp->queue_id); if (mp->is_main) s = format (s, "main "); else - s = format (s, "worker %d ", ntohl (mp->worker_id)); + s = format (s, "worker %d ", mp->worker_id); FINISH; } -__clib_unused - static void *vl_api_sw_interface_rx_placement_dump_t_print +static void *vl_api_sw_interface_rx_placement_dump_t_print (vl_api_sw_interface_rx_placement_dump_t * mp, void *handle) { u8 *s; - u32 sw_if_index = ntohl (mp->sw_if_index); + u32 sw_if_index = (mp->sw_if_index); s = format (0, "SCRIPT: sw_interface_rx_placement_dump "); @@ -158,14 +159,14 @@ static void *vl_api_sw_interface_event_t_print u8 *s; s = format (0, "SCRIPT: sw_interface_event "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); - if (mp->admin_up_down) + if ((mp->flags) & IF_STATUS_API_FLAG_ADMIN_UP) s = format (s, "admin-up "); else s = format (s, "admin-down "); - if (mp->link_up_down) + if ((mp->flags) & IF_STATUS_API_FLAG_LINK_UP) s = format (s, "link-up"); else s = format (s, "link-down"); @@ -176,22 +177,15 @@ static void *vl_api_sw_interface_event_t_print FINISH; } + static void *vl_api_sw_interface_add_del_address_t_print (vl_api_sw_interface_add_del_address_t * mp, void *handle) { u8 *s; s = format (0, "SCRIPT: sw_interface_add_del_address "); - - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - - if (mp->is_ipv6) - s = format (s, "%U/%d ", format_ip6_address, - (ip6_address_t *) mp->address, mp->address_length); - else - s = format (s, "%U/%d ", format_ip4_address, - (ip4_address_t *) mp->address, mp->address_length); - + s = format (s, "sw_if_index %d ", mp->sw_if_index); + s = format (s, "%U ", format_vl_api_prefix_t, &mp->prefix); if (mp->is_add == 0) s = format (s, "del "); if (mp->del_all) @@ -207,10 +201,10 @@ static void *vl_api_sw_interface_set_table_t_print s = format (0, "SCRIPT: sw_interface_set_table "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->vrf_id) - s = format (s, "vrf %d ", ntohl (mp->vrf_id)); + s = format (s, "vrf %d ", (mp->vrf_id)); if (mp->is_ipv6) s = format (s, "ipv6 "); @@ -225,7 +219,7 @@ static void *vl_api_sw_interface_set_mpls_enable_t_print s = format (0, "SCRIPT: sw_interface_set_mpls_enable "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->enable == 0) s = format (s, "disable"); @@ -240,7 +234,7 @@ static void *vl_api_sw_interface_set_vpath_t_print s = format (0, "SCRIPT: sw_interface_set_vpath "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->enable) s = format (s, "enable "); @@ -257,7 +251,7 @@ static void *vl_api_sw_interface_set_vxlan_bypass_t_print s = format (0, "SCRIPT: sw_interface_set_vxlan_bypass "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->is_ipv6) s = format (s, "ip6 "); @@ -277,7 +271,7 @@ static void *vl_api_sw_interface_set_geneve_bypass_t_print s = format (0, "SCRIPT: sw_interface_set_geneve_bypass "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->is_ipv6) s = format (s, "ip6 "); @@ -297,11 +291,11 @@ static void *vl_api_sw_interface_set_l2_xconnect_t_print s = format (0, "SCRIPT: sw_interface_set_l2_xconnect "); - s = format (s, "sw_if_index %d ", ntohl (mp->rx_sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->rx_sw_if_index)); if (mp->enable) { - s = format (s, "tx_sw_if_index %d ", ntohl (mp->tx_sw_if_index)); + s = format (s, "tx_sw_if_index %d ", (mp->tx_sw_if_index)); } else s = format (s, "delete "); @@ -316,14 +310,14 @@ static void *vl_api_sw_interface_set_l2_bridge_t_print s = format (0, "SCRIPT: sw_interface_set_l2_bridge "); - s = format (s, "sw_if_index %d ", ntohl (mp->rx_sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->rx_sw_if_index)); if (mp->enable) { - s = format (s, "bd_id %d shg %d ", ntohl (mp->bd_id), mp->shg); - if (L2_API_PORT_TYPE_BVI == ntohl (mp->port_type)) + s = format (s, "bd_id %d shg %d ", (mp->bd_id), mp->shg); + if (L2_API_PORT_TYPE_BVI == (mp->port_type)) s = format (s, "bvi "); - if (L2_API_PORT_TYPE_UU_FWD == ntohl (mp->port_type)) + if (L2_API_PORT_TYPE_UU_FWD == (mp->port_type)) s = format (s, "uu-fwd "); s = format (s, "enable"); } @@ -340,7 +334,7 @@ static void *vl_api_bridge_domain_add_del_t_print s = format (0, "SCRIPT: bridge_domain_add_del "); - s = format (s, "bd_id %d ", ntohl (mp->bd_id)); + s = format (s, "bd_id %d ", (mp->bd_id)); if (mp->is_add) { @@ -363,7 +357,7 @@ static void *vl_api_bridge_domain_set_mac_age_t_print s = format (0, "SCRIPT: bridge_domain_set_mac_age "); - s = format (s, "bd_id %d ", ntohl (mp->bd_id)); + s = format (s, "bd_id %d ", (mp->bd_id)); s = format (s, "mac-age %d", mp->mac_age); @@ -374,7 +368,7 @@ static void *vl_api_bridge_domain_dump_t_print (vl_api_bridge_domain_dump_t * mp, void *handle) { u8 *s; - u32 bd_id = ntohl (mp->bd_id); + u32 bd_id = (mp->bd_id); s = format (0, "SCRIPT: bridge_domain_dump "); @@ -399,7 +393,7 @@ static void *vl_api_l2fib_flush_bd_t_print (vl_api_l2fib_flush_bd_t * mp, void *handle) { u8 *s; - u32 bd_id = ntohl (mp->bd_id); + u32 bd_id = (mp->bd_id); s = format (0, "SCRIPT: l2fib_flush_bd "); s = format (s, "bd_id %d ", bd_id); @@ -411,7 +405,7 @@ static void *vl_api_l2fib_flush_int_t_print (vl_api_l2fib_flush_int_t * mp, void *handle) { u8 *s; - u32 sw_if_index = ntohl (mp->sw_if_index); + u32 sw_if_index = (mp->sw_if_index); s = format (0, "SCRIPT: l2fib_flush_int "); s = format (s, "sw_if_index %d ", sw_if_index); @@ -428,12 +422,12 @@ static void *vl_api_l2fib_add_del_t_print s = format (s, "mac %U ", format_ethernet_address, mp->mac); - s = format (s, "bd_id %d ", ntohl (mp->bd_id)); + s = format (s, "bd_id %d ", (mp->bd_id)); if (mp->is_add) { - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->static_mac) s = format (s, "%s", "static "); if (mp->filter_mac) @@ -453,11 +447,11 @@ static void * vl_api_l2_flags_t_print (vl_api_l2_flags_t * mp, void *handle) { u8 *s; - u32 flags = ntohl (mp->feature_bitmap); + u32 flags = (mp->feature_bitmap); s = format (0, "SCRIPT: l2_flags "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (flags & L2_LEARN) s = format (s, "learn "); @@ -480,11 +474,11 @@ static void *vl_api_bridge_flags_t_print (vl_api_bridge_flags_t * mp, void *handle) { u8 *s; - u32 flags = ntohl (mp->flags); + u32 flags = (mp->flags); s = format (0, "SCRIPT: bridge_flags "); - s = format (s, "bd_id %d ", ntohl (mp->bd_id)); + s = format (s, "bd_id %d ", (mp->bd_id)); if (flags & BRIDGE_API_FLAG_LEARN) s = format (s, "learn "); @@ -509,10 +503,10 @@ static void *vl_api_bd_ip_mac_add_del_t_print u8 *s; s = format (0, "SCRIPT: bd_ip_mac_add_del "); - s = format (s, "bd_id %d ", ntohl (mp->bd_id)); + s = format (s, "bd_id %d ", (mp->entry.bd_id)); - s = format (s, "%U ", format_vl_api_address, &mp->ip); - s = format (s, "%U ", format_vl_api_mac_address, &mp->mac); + s = format (s, "%U ", format_vl_api_address, &mp->entry.ip); + s = format (s, "%U ", format_vl_api_mac_address, &mp->entry.mac); if (mp->is_add == 0) s = format (s, "del "); @@ -525,7 +519,7 @@ static void *vl_api_bd_ip_mac_flush_t_print u8 *s; s = format (0, "SCRIPT: bd_ip_mac_flush "); - s = format (s, "bd_id %d ", ntohl (mp->bd_id)); + s = format (s, "bd_id %d ", (mp->bd_id)); FINISH; } @@ -550,7 +544,7 @@ static void *vl_api_tap_create_v2_t_print clib_memset (null_mac, 0, sizeof (null_mac)); s = format (0, "SCRIPT: tap_create_v2 "); - s = format (s, "id %u ", ntohl (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); @@ -563,20 +557,44 @@ static void *vl_api_tap_create_v2_t_print s = format (s, "host-ns %s ", mp->host_namespace); if (mp->host_bridge_set) s = format (s, "host-bridge %s ", mp->host_bridge); - if (mp->host_ip4_addr_set) + if (mp->host_ip4_prefix_set) s = format (s, "host-ip4-addr %U/%d ", format_ip4_address, - mp->host_ip4_addr, mp->host_ip4_prefix_len); - if (mp->host_ip6_addr_set) + mp->host_ip4_prefix.address, mp->host_ip4_prefix.len); + if (mp->host_ip6_prefix_set) s = format (s, "host-ip6-addr %U/%d ", format_ip6_address, - mp->host_ip6_addr, mp->host_ip6_prefix_len); + mp->host_ip6_prefix.address, mp->host_ip6_prefix.len); if (mp->host_ip4_gw_set) - s = format (s, "host-ip4-gw %U ", format_ip4_address, mp->host_ip4_addr); + s = + format (s, "host-ip4-gw %U ", format_ip4_address, + mp->host_ip4_prefix.address); if (mp->host_ip6_gw_set) - s = format (s, "host-ip6-gw %U ", format_ip6_address, mp->host_ip6_addr); + s = + format (s, "host-ip6-gw %U ", format_ip6_address, + mp->host_ip6_prefix.address); + if (mp->num_rx_queues) + s = format (s, "num_rx_queues %u ", mp->num_rx_queues); if (mp->tx_ring_sz) - s = format (s, "tx-ring-size %u ", ntohs (mp->tx_ring_sz)); + s = format (s, "tx-ring-size %u ", (mp->tx_ring_sz)); if (mp->rx_ring_sz) - s = format (s, "rx-ring-size %u ", ntohs (mp->rx_ring_sz)); + s = format (s, "rx-ring-size %u ", (mp->rx_ring_sz)); + if (mp->host_mtu_set) + s = format (s, "host-mtu-size %u ", (mp->host_mtu_size)); + if ((mp->tap_flags) & TAP_API_FLAG_GSO) + s = format (s, "gso-enabled "); + if ((mp->tap_flags) & TAP_API_FLAG_CSUM_OFFLOAD) + s = format (s, "csum-offload-enabled "); + if ((mp->tap_flags) & TAP_API_FLAG_PERSIST) + s = format (s, "persist "); + if ((mp->tap_flags) & TAP_API_FLAG_ATTACH) + s = format (s, "attach "); + if ((mp->tap_flags) & TAP_API_FLAG_TUN) + s = format (s, "tun "); + if ((mp->tap_flags) & TAP_API_FLAG_GRO_COALESCE) + s = format (s, "gro-coalesce-enabled "); + if ((mp->tap_flags) & TAP_API_FLAG_PACKED) + s = format (s, "packed "); + if ((mp->tap_flags) & TAP_API_FLAG_IN_ORDER) + s = format (s, "in-order "); FINISH; } @@ -586,7 +604,7 @@ static void *vl_api_tap_delete_v2_t_print u8 *s; s = format (0, "SCRIPT: tap_delete_v2 "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -611,14 +629,45 @@ __clib_unused clib_memset (null_mac, 0, sizeof (null_mac)); s = format (0, "SCRIPT: virtio_pci_create "); - s = format (s, "pci_addr %U ", format_vlib_pci_addr, ntohl (mp->pci_addr)); + s = format (s, "pci_addr %U ", format_vlib_pci_addr, (mp->pci_addr)); if (memcmp (mp->mac_address, null_mac, 6)) s = format (s, "mac-address %U ", format_ethernet_address, mp->mac_address); if (mp->features) s = format (s, "features 0x%llx ", clib_net_to_host_u64 (mp->features)); if (mp->gso_enabled) - s = format (s, "gso-enabled"); + s = format (s, "gso-enabled "); + if (mp->checksum_offload_enabled) + s = format (s, "checksum_offload_enabled"); + FINISH; +} + +__clib_unused + static void *vl_api_virtio_pci_create_v2_t_print + (vl_api_virtio_pci_create_v2_t * mp, void *handle) +{ + u8 *s; + u8 null_mac[6]; + + clib_memset (null_mac, 0, sizeof (null_mac)); + + s = format (0, "SCRIPT: virtio_pci_create_v2 "); + s = format (s, "pci_addr %U ", format_vlib_pci_addr, (mp->pci_addr)); + if (memcmp (mp->mac_address, null_mac, 6)) + s = format (s, "mac-address %U ", + format_ethernet_address, mp->mac_address); + if (mp->features) + s = format (s, "features 0x%llx ", clib_net_to_host_u64 (mp->features)); + if (mp->virtio_flags & VIRTIO_API_FLAG_GSO) + s = format (s, "gso-enabled "); + if (mp->virtio_flags & VIRTIO_API_FLAG_CSUM_OFFLOAD) + s = format (s, "checksum_offload_enabled "); + if ((mp->virtio_flags) & VIRTIO_API_FLAG_GRO_COALESCE) + s = format (s, "gro-coalesce-enabled "); + if ((mp->virtio_flags) & VIRTIO_API_FLAG_PACKED) + s = format (s, "packed "); + if ((mp->virtio_flags) & VIRTIO_API_FLAG_IN_ORDER) + s = format (s, "in-order "); FINISH; } @@ -629,7 +678,7 @@ __clib_unused u8 *s; s = format (0, "SCRIPT: virtio_pci_delete "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -658,11 +707,38 @@ static void *vl_api_bond_create_t_print 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); + s = format (s, "mode %U ", format_bond_mode, ntohl (mp->mode)); + if (mp->lb) + s = format (s, "lb %U ", format_bond_load_balance, ntohl (mp->lb)); + if (mp->numa_only) + s = format (s, "numa-only is set in lacp mode"); + if (mp->id != ~0) + s = format (s, "id %u ", (mp->id)); + FINISH; +} + +static void *vl_api_bond_create2_t_print + (vl_api_bond_create2_t * mp, void *handle) +{ + u8 *s; + u8 null_mac[6]; + + clib_memset (null_mac, 0, sizeof (null_mac)); + + s = format (0, "SCRIPT: bond_create2 "); + 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, ntohl (mp->mode)); if (mp->lb) - s = format (s, "lb %U ", format_bond_load_balance, mp->lb); + s = format (s, "lb %U ", format_bond_load_balance, ntohl (mp->lb)); + if (mp->numa_only) + s = format (s, "numa-only "); + if (mp->enable_gso) + s = format (s, "gso "); if (mp->id != ~0) - s = format (s, "id %u ", ntohl (mp->id)); + s = format (s, "id %u ", (mp->id)); FINISH; } @@ -672,19 +748,19 @@ static void *vl_api_bond_delete_t_print u8 *s; s = format (0, "SCRIPT: bond_delete "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } -static void *vl_api_bond_enslave_t_print - (vl_api_bond_enslave_t * mp, void *handle) +static void *vl_api_bond_add_member_t_print + (vl_api_bond_add_member_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); + s = format (0, "SCRIPT: bond_add_member "); + 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) @@ -693,96 +769,65 @@ static void *vl_api_bond_enslave_t_print FINISH; } -static void *vl_api_bond_detach_slave_t_print - (vl_api_bond_detach_slave_t * mp, void *handle) +static void *vl_api_sw_interface_set_bond_weight_t_print + (vl_api_sw_interface_set_bond_weight_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)); + s = format (0, "SCRIPT: sw_interface_set_bond_weight "); + s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index)); + s = format (s, "weight %u ", ntohl (mp->weight)); FINISH; } -__clib_unused - static void *vl_api_sw_interface_bond_dump_t_print - (vl_api_sw_interface_bond_dump_t * mp, void *handle) +static void *vl_api_bond_detach_member_t_print + (vl_api_bond_detach_member_t * mp, void *handle) { u8 *s; - s = format (0, "SCRIPT: sw_interface_bond_dump "); + s = format (0, "SCRIPT: bond_detach_member "); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } -__clib_unused - static void *vl_api_sw_interface_slave_dump_t_print - (vl_api_sw_interface_slave_dump_t * mp, void *handle) +static void *vl_api_sw_bond_interface_dump_t_print + (vl_api_sw_bond_interface_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)); + s = format (0, "SCRIPT: sw_bond_interface_dump "); + if (mp->sw_if_index != ~0) + s = format (s, "sw_if_index %d ", (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) +static void *vl_api_sw_member_interface_dump_t_print + (vl_api_sw_member_interface_dump_t * mp, void *handle) { u8 *s; - s = format (0, "SCRIPT: ip_add_del_route "); - if (mp->is_add == 0) - s = format (s, "del "); - - if (mp->is_ipv6) - s = format (s, "%U/%d ", format_ip6_address, mp->dst_address, - mp->dst_address_length); - else - s = format (s, "%U/%d ", format_ip4_address, mp->dst_address, - mp->dst_address_length); - - if (mp->table_id != 0) - s = format (s, "vrf %d ", ntohl (mp->table_id)); - - if (mp->is_local) - s = format (s, "local "); - else if (mp->is_drop) - s = format (s, "drop "); - else if (mp->is_classify) - s = format (s, "classify %d", ntohl (mp->classify_table_index)); - else if (mp->next_hop_via_label != htonl (MPLS_LABEL_INVALID)) - s = format (s, "via via_label %d ", ntohl (mp->next_hop_via_label)); - else - { - if (mp->is_ipv6) - s = format (s, "via %U ", format_ip6_address, mp->next_hop_address); - else - s = format (s, "via %U ", format_ip4_address, mp->next_hop_address); - if (mp->next_hop_sw_if_index != ~0) - s = format (s, "sw_if_index %d ", ntohl (mp->next_hop_sw_if_index)); + s = format (0, "SCRIPT: sw_member_interface_dump "); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); - } + FINISH; +} - if (mp->next_hop_weight != 1) - s = format (s, "weight %d ", (u32) mp->next_hop_weight); +static void *vl_api_ip_route_add_del_t_print + (vl_api_ip_route_add_del_t * mp, void *handle) +{ + u8 *s, p; - if (mp->is_multipath) - s = format (s, "multipath "); + s = format (0, "SCRIPT: ip_route_add_del "); + if (mp->is_add == 0) + s = format (s, "del "); - if (mp->next_hop_table_id) - s = format (s, "lookup-in-vrf %d ", ntohl (mp->next_hop_table_id)); + s = format (s, "%U", format_vl_api_prefix, &mp->route.prefix); - if (mp->next_hop_n_out_labels) - { - u8 i; - for (i = 0; i < mp->next_hop_n_out_labels; i++) - { - s = format (s, "out-label %d ", - ntohl (mp->next_hop_out_label_stack[i].label)); - } - } + for (p = 0; p < mp->route.n_paths; p++) + s = format (s, " [%U]", format_vl_api_fib_path, &mp->route.paths[p]); FINISH; } @@ -790,7 +835,7 @@ static void *vl_api_ip_add_del_route_t_print static void *vl_api_mpls_route_add_del_t_print (vl_api_mpls_route_add_del_t * mp, void *handle) { - u8 *s; + u8 *s, p; s = format (0, "SCRIPT: mpls_route_add_del "); @@ -799,67 +844,21 @@ static void *vl_api_mpls_route_add_del_t_print else s = format (s, "del "); - s = format (s, "%d ", ntohl (mp->mr_label)); + s = format (s, "table %d ", (mp->mr_route.mr_table_id)); + s = format (s, "%d ", (mp->mr_route.mr_label)); - if (mp->mr_eos) + if (mp->mr_route.mr_eos) s = format (s, "eos "); else s = format (s, "non-eos "); + if (mp->mr_route.mr_is_multicast) + s = format (s, "multicast "); - if (mp->mr_next_hop_proto == DPO_PROTO_IP4) - { - ip4_address_t ip4_null = {.as_u32 = 0, }; - if (memcmp (mp->mr_next_hop, &ip4_null, sizeof (ip4_null))) - s = format (s, "via %U ", format_ip4_address, mp->mr_next_hop); - else - s = format (s, "via lookup-in-ip4-table %d ", - ntohl (mp->mr_next_hop_table_id)); - } - else if (mp->mr_next_hop_proto == DPO_PROTO_IP6) - { - ip6_address_t ip6_null = { {0} - }; - if (memcmp (mp->mr_next_hop, &ip6_null, sizeof (ip6_null))) - s = format (s, "via %U ", format_ip6_address, mp->mr_next_hop); - else - s = format (s, "via lookup-in-ip6-table %d ", - ntohl (mp->mr_next_hop_table_id)); - } - else if (mp->mr_next_hop_proto == DPO_PROTO_ETHERNET) - { - s = format (s, "via l2-input-on "); - } - else if (mp->mr_next_hop_proto == DPO_PROTO_MPLS) - { - if (mp->mr_next_hop_via_label != htonl (MPLS_LABEL_INVALID)) - s = - format (s, "via via-label %d ", ntohl (mp->mr_next_hop_via_label)); - else - s = format (s, "via next-hop-table %d ", - ntohl (mp->mr_next_hop_table_id)); - } - if (mp->mr_next_hop_sw_if_index != ~0) - s = format (s, "sw_if_index %d ", ntohl (mp->mr_next_hop_sw_if_index)); + for (p = 0; p < mp->mr_route.mr_n_paths; p++) + s = + format (s, " [%U]", format_vl_api_fib_path, &mp->mr_route.mr_paths[p]); - if (mp->mr_next_hop_weight != 1) - s = format (s, "weight %d ", (u32) mp->mr_next_hop_weight); - - if (mp->mr_is_multipath) - s = format (s, "multipath "); - - if (mp->mr_is_classify) - s = format (s, "classify %d", ntohl (mp->mr_classify_table_index)); - - if (mp->mr_next_hop_n_out_labels) - { - u8 i; - for (i = 0; i < mp->mr_next_hop_n_out_labels; i++) - { - s = format (s, "out-label %d ", - ntohl (mp->mr_next_hop_out_label_stack[i].label)); - } - } FINISH; } @@ -874,9 +873,10 @@ static void *vl_api_ip_table_add_del_t_print s = format (s, "add "); else s = format (s, "del "); - if (mp->is_ipv6) + if (mp->table.is_ip6) s = format (s, "ip6 "); - s = format (s, "table %d ", ntohl (mp->table_id)); + s = format (s, "table %d ", (mp->table.table_id)); + s = format (s, "%s ", mp->table.name); FINISH; } @@ -891,40 +891,7 @@ static void *vl_api_mpls_table_add_del_t_print s = format (s, "add "); else s = format (s, "del "); - s = format (s, "table %d ", ntohl (mp->mt_table_id)); - - FINISH; -} - -static void *vl_api_proxy_arp_add_del_t_print - (vl_api_proxy_arp_add_del_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: proxy_arp_add_del "); - - s = format (s, "%U - %U ", - format_vl_api_ip4_address, mp->proxy.low, - format_vl_api_ip4_address, mp->proxy.hi); - - s = format (s, "table %d ", ntohl (mp->proxy.table_id)); - - if (mp->is_add == 0) - s = format (s, "del "); - - FINISH; -} - -static void *vl_api_proxy_arp_intfc_enable_disable_t_print - (vl_api_proxy_arp_intfc_enable_disable_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: proxy_arp_intfc_enable_disable "); - - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - - s = format (s, "enable %d ", mp->enable_disable); + s = format (s, "table %d ", (mp->mt_table.mt_table_id)); FINISH; } @@ -932,38 +899,26 @@ static void *vl_api_proxy_arp_intfc_enable_disable_t_print static void *vl_api_mpls_tunnel_add_del_t_print (vl_api_mpls_tunnel_add_del_t * mp, void *handle) { - u8 *s; + u8 *s, p; s = format (0, "SCRIPT: mpls_tunnel_add_del "); if (mp->mt_is_add == 0) - s = format (s, "del sw_if_index %d ", ntohl (mp->mt_sw_if_index)); - - mpls_label_t label = ntohl (mp->mt_next_hop_via_label); - if (label != MPLS_LABEL_INVALID) - s = format (s, "via-label %d ", label); - else if (mp->mt_next_hop_proto_is_ip4) - s = format (s, "via %U ", format_ip4_address, mp->mt_next_hop); + s = format (s, "del sw_if_index %d ", (mp->mt_tunnel.mt_sw_if_index)); else - s = format (s, "via %U ", format_ip6_address, mp->mt_next_hop); + s = format (s, "sw_if_index %d ", (mp->mt_tunnel.mt_sw_if_index)); - if (mp->mt_next_hop_sw_if_index != ~0) - s = format (s, "sw_if_index %d ", ntohl (mp->mt_next_hop_sw_if_index)); - else if (mp->mt_next_hop_table_id) - s = format (s, "next-hop-table %d ", ntohl (mp->mt_next_hop_table_id)); - if (mp->mt_l2_only) + if (mp->mt_tunnel.mt_l2_only) s = format (s, "l2-only "); + if (mp->mt_tunnel.mt_is_multicast) + s = format (s, "multicast "); + if (mp->mt_tunnel.mt_tunnel_index) + s = format (s, "tunnel-index "); - if (mp->mt_next_hop_n_out_labels) - { - u8 i; - for (i = 0; i < mp->mt_next_hop_n_out_labels; i++) - { - s = format (s, "out-label %d ", - ntohl (mp->mt_next_hop_out_label_stack[i].label)); - } - } + for (p = 0; p < mp->mt_tunnel.mt_n_paths; p++) + s = format (s, " [%U]", format_vl_api_fib_path, + &mp->mt_tunnel.mt_paths[p]); FINISH; } @@ -975,19 +930,19 @@ static void *vl_api_sr_mpls_policy_add_t_print s = format (0, "SCRIPT: sr_mpls_policy_add "); - s = format (s, "bsid %d ", ntohl (mp->bsid)); + s = format (s, "bsid %d ", (mp->bsid)); if (mp->weight != htonl ((u32) 1)) - s = format (s, "%d ", ntohl (mp->weight)); + s = format (s, "%d ", (mp->weight)); - if (mp->type) + if (mp->is_spray) s = format (s, "spray "); if (mp->n_segments) { int i; for (i = 0; i < mp->n_segments; i++) - s = format (s, "next %d ", ntohl (mp->segments[i])); + s = format (s, "next %d ", (mp->segments[i])); } FINISH; @@ -1000,7 +955,7 @@ static void *vl_api_sr_mpls_policy_del_t_print s = format (0, "SCRIPT: sr_mpls_policy_del "); - s = format (s, "bsid %d ", ntohl (mp->bsid)); + s = format (s, "bsid %d ", (mp->bsid)); FINISH; } @@ -1012,35 +967,9 @@ static void *vl_api_sw_interface_set_unnumbered_t_print s = format (0, "SCRIPT: sw_interface_set_unnumbered "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - - s = format (s, "unnum_if_index %d ", ntohl (mp->unnumbered_sw_if_index)); - - if (mp->is_add == 0) - s = format (s, "del "); - - FINISH; -} - -static void *vl_api_ip_neighbor_add_del_t_print - (vl_api_ip_neighbor_add_del_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: ip_neighbor_add_del "); - - s = format (s, "sw_if_index %d ", ntohl (mp->neighbor.sw_if_index)); - - if (IP_API_NEIGHBOR_FLAG_STATIC & ntohl (mp->neighbor.flags)) - s = format (s, "is_static "); - - if (IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY & ntohl (mp->neighbor.flags)) - s = format (s, "is_no_fib_entry "); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); - s = format (s, "mac %U ", format_vl_api_mac_address, - &mp->neighbor.mac_address); - - s = format (s, "dst %U ", format_vl_api_address, &mp->neighbor.ip_address); + s = format (s, "unnum_if_index %d ", (mp->unnumbered_sw_if_index)); if (mp->is_add == 0) s = format (s, "del "); @@ -1048,7 +977,6 @@ static void *vl_api_ip_neighbor_add_del_t_print FINISH; } - static void *vl_api_create_vlan_subif_t_print (vl_api_create_vlan_subif_t * mp, void *handle) { @@ -1057,23 +985,23 @@ static void *vl_api_create_vlan_subif_t_print s = format (0, "SCRIPT: create_vlan_subif "); if (mp->sw_if_index) - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->vlan_id) - s = format (s, "vlan_id %d ", ntohl (mp->vlan_id)); + s = format (s, "vlan_id %d ", (mp->vlan_id)); FINISH; } -#define foreach_create_subif_bit \ -_(no_tags) \ -_(one_tag) \ -_(two_tags) \ -_(dot1ad) \ -_(exact_match) \ -_(default_sub) \ -_(outer_vlan_id_any) \ -_(inner_vlan_id_any) +#define foreach_create_subif_flag \ +_(0, "no_tags") \ +_(1, "one_tag") \ +_(2, "two_tags") \ +_(3, "dot1ad") \ +_(4, "exact_match") \ +_(5, "default_sub") \ +_(6, "outer_vlan_id_any") \ +_(7, "inner_vlan_id_any") static void *vl_api_create_subif_t_print (vl_api_create_subif_t * mp, void *handle) @@ -1082,18 +1010,18 @@ static void *vl_api_create_subif_t_print s = format (0, "SCRIPT: create_subif "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); - s = format (s, "sub_id %d ", ntohl (mp->sub_id)); + s = format (s, "sub_id %d ", (mp->sub_id)); if (mp->outer_vlan_id) - s = format (s, "outer_vlan_id %d ", ntohs (mp->outer_vlan_id)); + s = format (s, "outer_vlan_id %d ", (mp->outer_vlan_id)); if (mp->inner_vlan_id) - s = format (s, "inner_vlan_id %d ", ntohs (mp->inner_vlan_id)); + s = format (s, "inner_vlan_id %d ", (mp->inner_vlan_id)); -#define _(a) if (mp->a) s = format (s, "%s ", #a); - foreach_create_subif_bit; +#define _(a,b) if (mp->sub_if_flags & (1 << a)) s = format (s, "%s ", b); + foreach_create_subif_flag; #undef _ FINISH; @@ -1105,105 +1033,52 @@ static void *vl_api_delete_subif_t_print u8 *s; s = format (0, "SCRIPT: delete_subif "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } static void * -vl_api_reset_fib_t_print (vl_api_reset_fib_t * mp, void *handle) +vl_api_ip_table_replace_begin_t_print (vl_api_ip_table_replace_begin_t * mp, + void *handle) { u8 *s; - s = format (0, "SCRIPT: reset_fib "); + s = format (0, "SCRIPT: ip_table_replace_begin "); - if (mp->vrf_id) - s = format (s, "vrf %d ", ntohl (mp->vrf_id)); - - if (mp->is_ipv6 != 0) - s = format (s, "ipv6 "); + s = format (s, "v%s-table %d ", + mp->table.is_ip6 ? "6" : "4", (mp->table.table_id)); 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 ", ntohl (mp->rx_vrf_id)); - s = format (s, "server_vrf_id %d ", ntohl (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) +static void * +vl_api_ip_table_flush_t_print (vl_api_ip_table_flush_t * mp, void *handle) { u8 *s; - s = format (0, "SCRIPT: dhcp_proxy_set_vss "); - - s = format (s, "tbl_id %d ", ntohl (mp->tbl_id)); - - if (mp->vss_type == VSS_TYPE_VPN_ID) - { - s = format (s, "fib_id %d ", ntohl (mp->vpn_index)); - s = format (s, "oui %d ", ntohl (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 "); + s = format (0, "SCRIPT: ip_table_flush "); - if (mp->is_add == 0) - s = format (s, "del "); + s = format (s, "v%s-table %d ", + mp->table.is_ip6 ? "6" : "4", (mp->table.table_id)); FINISH; } -static void *vl_api_dhcp_client_config_t_print - (vl_api_dhcp_client_config_t * mp, void *handle) +static void * +vl_api_ip_table_replace_end_t_print (vl_api_ip_table_replace_end_t * mp, + void *handle) { u8 *s; - s = format (0, "SCRIPT: dhcp_client_config "); - - s = format (s, "sw_if_index %d ", ntohl (mp->client.sw_if_index)); + s = format (0, "SCRIPT: ip_table_replace_end "); - 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 ", ntohl (mp->client.pid)); - - if (mp->is_add == 0) - s = format (s, "del "); + s = format (s, "v%s-table %d ", + mp->table.is_ip6 ? "6" : "4", (mp->table.table_id)); FINISH; } - static void *vl_api_set_ip_flow_hash_t_print (vl_api_set_ip_flow_hash_t * mp, void *handle) { @@ -1211,7 +1086,7 @@ static void *vl_api_set_ip_flow_hash_t_print s = format (0, "SCRIPT: set_ip_flow_hash "); - s = format (s, "vrf_id %d ", ntohl (mp->vrf_id)); + s = format (s, "vrf_id %d ", (mp->vrf_id)); if (mp->src) s = format (s, "src "); @@ -1237,102 +1112,6 @@ static void *vl_api_set_ip_flow_hash_t_print FINISH; } -static void *vl_api_sw_interface_ip6nd_ra_prefix_t_print - (vl_api_sw_interface_ip6nd_ra_prefix_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: sw_interface_ip6nd_ra_prefix "); - - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - - s = format (s, "%U ", format_vl_api_prefix, &mp->prefix); - - s = format (s, "val_life %d ", ntohl (mp->val_lifetime)); - - s = format (s, "pref_life %d ", ntohl (mp->pref_lifetime)); - - if (mp->use_default) - s = format (s, "def "); - - if (mp->no_advertise) - s = format (s, "noadv "); - - if (mp->off_link) - s = format (s, "offl "); - - if (mp->no_autoconfig) - s = format (s, "noauto "); - - if (mp->no_onlink) - s = format (s, "nolink "); - - if (mp->is_no) - s = format (s, "isno "); - - FINISH; -} - -static void *vl_api_sw_interface_ip6nd_ra_config_t_print - (vl_api_sw_interface_ip6nd_ra_config_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: sw_interface_ip6nd_ra_config "); - - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - - s = format (s, "maxint %d ", ntohl (mp->max_interval)); - - s = format (s, "minint %d ", ntohl (mp->min_interval)); - - s = format (s, "life %d ", ntohl (mp->lifetime)); - - s = format (s, "count %d ", ntohl (mp->initial_count)); - - s = format (s, "interval %d ", ntohl (mp->initial_interval)); - - if (mp->suppress) - s = format (s, "suppress "); - - if (mp->managed) - s = format (s, "managed "); - - if (mp->other) - s = format (s, "other "); - - if (mp->ll_option) - s = format (s, "ll "); - - if (mp->send_unicast) - s = format (s, "send "); - - if (mp->cease) - s = format (s, "cease "); - - if (mp->is_no) - s = format (s, "isno "); - - if (mp->default_router) - s = format (s, "def "); - - FINISH; -} - -static void *vl_api_set_arp_neighbor_limit_t_print - (vl_api_set_arp_neighbor_limit_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: set_arp_neighbor_limit "); - - s = format (s, "arp_nbr_limit %d ", ntohl (mp->arp_neighbor_limit)); - - if (mp->is_ipv6 != 0) - s = format (s, "ipv6 "); - - FINISH; -} static void *vl_api_l2_patch_add_del_t_print (vl_api_l2_patch_add_del_t * mp, void *handle) @@ -1341,9 +1120,9 @@ static void *vl_api_l2_patch_add_del_t_print s = format (0, "SCRIPT: l2_patch_add_del "); - s = format (s, "rx_sw_if_index %d ", ntohl (mp->rx_sw_if_index)); + s = format (s, "rx_sw_if_index %d ", (mp->rx_sw_if_index)); - s = format (s, "tx_sw_if_index %d ", ntohl (mp->tx_sw_if_index)); + s = format (s, "tx_sw_if_index %d ", (mp->tx_sw_if_index)); if (mp->is_add == 0) s = format (s, "del "); @@ -1363,7 +1142,7 @@ static void *vl_api_sr_localsid_add_del_t_print { case SR_BEHAVIOR_END: s = format (s, "Address: %U\nBehavior: End", - format_ip6_address, (ip6_address_t *) mp->localsid.addr); + format_ip6_address, (ip6_address_t *) mp->localsid); s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False")); break; case SR_BEHAVIOR_X: @@ -1371,9 +1150,9 @@ static void *vl_api_sr_localsid_add_del_t_print format (s, "Address: %U\nBehavior: X (Endpoint with Layer-3 cross-connect)" "\nIface: %U\nNext hop: %U", format_ip6_address, - (ip6_address_t *) mp->localsid.addr, - format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index), - format_ip6_address, (ip6_address_t *) mp->nh_addr6); + (ip6_address_t *) mp->localsid, + format_vnet_sw_if_index_name, vnm, (mp->sw_if_index), + format_ip6_address, (ip6_address_t *) mp->nh_addr.un.ip6); s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False")); break; case SR_BEHAVIOR_DX4: @@ -1381,46 +1160,46 @@ static void *vl_api_sr_localsid_add_del_t_print format (s, "Address: %U\nBehavior: DX4 (Endpoint with decapsulation with IPv4 cross-connect)" "\nIface: %U\nNext hop: %U", format_ip6_address, - (ip6_address_t *) mp->localsid.addr, - format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index), - format_ip4_address, (ip4_address_t *) mp->nh_addr4); + (ip6_address_t *) mp->localsid, + format_vnet_sw_if_index_name, vnm, (mp->sw_if_index), + format_ip4_address, (ip4_address_t *) mp->nh_addr.un.ip4); break; case SR_BEHAVIOR_DX6: s = format (s, "Address: %U\nBehavior: DX6 (Endpoint with decapsulation with IPv6 cross-connect)" "\nIface: %UNext hop: %U", format_ip6_address, - (ip6_address_t *) mp->localsid.addr, - format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index), - format_ip6_address, (ip6_address_t *) mp->nh_addr6); + (ip6_address_t *) mp->localsid, + format_vnet_sw_if_index_name, vnm, (mp->sw_if_index), + format_ip6_address, (ip6_address_t *) mp->nh_addr.un.ip6); break; case SR_BEHAVIOR_DX2: s = format (s, "Address: %U\nBehavior: DX2 (Endpoint with decapulation and Layer-2 cross-connect)" "\nIface: %U", format_ip6_address, - (ip6_address_t *) mp->localsid.addr, - format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index)); + (ip6_address_t *) mp->localsid, + format_vnet_sw_if_index_name, vnm, (mp->sw_if_index)); break; case SR_BEHAVIOR_DT6: s = format (s, "Address: %U\nBehavior: DT6 (Endpoint with decapsulation and specific IPv6 table lookup)" "\nTable: %u", format_ip6_address, - (ip6_address_t *) mp->localsid.addr, ntohl (mp->fib_table)); + (ip6_address_t *) mp->localsid, (mp->fib_table)); break; case SR_BEHAVIOR_DT4: s = format (s, "Address: %U\nBehavior: DT4 (Endpoint with decapsulation and specific IPv4 table lookup)" "\nTable: %u", format_ip6_address, - (ip6_address_t *) mp->localsid.addr, ntohl (mp->fib_table)); + (ip6_address_t *) mp->localsid, (mp->fib_table)); break; default: if (mp->behavior >= SR_BEHAVIOR_LAST) { s = format (s, "Address: %U\n Behavior: %u", - format_ip6_address, (ip6_address_t *) mp->localsid.addr, + format_ip6_address, (ip6_address_t *) mp->localsid, mp->behavior); } else @@ -1443,15 +1222,17 @@ static void *vl_api_sr_steering_add_del_t_print switch (mp->traffic_type) { case SR_STEER_L2: - s = format (s, "Traffic type: L2 iface: %u", ntohl (mp->sw_if_index)); + s = format (s, "Traffic type: L2 iface: %u", (mp->sw_if_index)); break; case SR_STEER_IPV4: s = format (s, "Traffic type: IPv4 %U/%u", format_ip4_address, - (ip4_address_t *) mp->prefix_addr, ntohl (mp->mask_width)); + (ip4_address_t *) mp->prefix.address.un.ip4, + (mp->prefix.len)); break; case SR_STEER_IPV6: s = format (s, "Traffic type: IPv6 %U/%u", format_ip6_address, - (ip6_address_t *) mp->prefix_addr, ntohl (mp->mask_width)); + (ip6_address_t *) mp->prefix.address.un.ip6, + (mp->prefix.len)); break; default: s = format (s, "Traffic type: Unknown(%u)", mp->traffic_type); @@ -1460,9 +1241,9 @@ static void *vl_api_sr_steering_add_del_t_print s = format (s, "BindingSID: %U", format_ip6_address, (ip6_address_t *) mp->bsid_addr); - s = format (s, "SR Policy Index: %u", ntohl (mp->sr_policy_index)); + s = format (s, "SR Policy Index: %u", (mp->sr_policy_index)); - s = format (s, "FIB_table: %u", ntohl (mp->table_id)); + s = format (s, "FIB_table: %u", (mp->table_id)); FINISH; } @@ -1493,11 +1274,11 @@ static void *vl_api_sr_policy_add_t_print (mp->is_encap ? "Behavior: Encapsulation" : "Behavior: SRH insertion")); - s = format (s, "FIB_table: %u", ntohl (mp->fib_table)); + s = format (s, "FIB_table: %u", (mp->fib_table)); - s = format (s, (mp->type ? "Type: Default" : "Type: Spray")); + s = format (s, (mp->is_spray ? "Type: Default" : "Type: Spray")); - s = format (s, "SID list weight: %u", ntohl (mp->weight)); + s = format (s, "SID list weight: %u", (mp->weight)); s = format (s, "{"); vec_foreach (seg, segments) @@ -1530,13 +1311,13 @@ static void *vl_api_sr_policy_mod_t_print s = format (s, "BSID: %U", format_ip6_address, (ip6_address_t *) mp->bsid_addr); - s = format (s, "SR Policy index: %u", ntohl (mp->sr_policy_index)); + s = format (s, "SR Policy index: %u", (mp->sr_policy_index)); s = format (s, "Operation: %u", mp->operation); - s = format (s, "SID list index: %u", ntohl (mp->sl_index)); + s = format (s, "SID list index: %u", (mp->sl_index)); - s = format (s, "SID list weight: %u", ntohl (mp->weight)); + s = format (s, "SID list weight: %u", (mp->weight)); s = format (s, "{"); vec_foreach (seg, segments) @@ -1568,23 +1349,22 @@ static void *vl_api_classify_add_del_table_t_print if (mp->is_add == 0) { - s = format (s, "table %d ", ntohl (mp->table_index)); + s = format (s, "table %d ", (mp->table_index)); s = format (s, "%s ", mp->del_chain ? "del-chain" : "del"); } else { - s = format (s, "nbuckets %d ", ntohl (mp->nbuckets)); - s = format (s, "memory_size %d ", ntohl (mp->memory_size)); - s = format (s, "skip %d ", ntohl (mp->skip_n_vectors)); - s = format (s, "match %d ", ntohl (mp->match_n_vectors)); - s = format (s, "next-table %d ", ntohl (mp->next_table_index)); - s = format (s, "miss-next %d ", ntohl (mp->miss_next_index)); - s = format (s, "current-data-flag %d ", ntohl (mp->current_data_flag)); + s = format (s, "nbuckets %d ", (mp->nbuckets)); + s = format (s, "memory_size %d ", (mp->memory_size)); + s = format (s, "skip %d ", (mp->skip_n_vectors)); + s = format (s, "match %d ", (mp->match_n_vectors)); + s = format (s, "next-table %d ", (mp->next_table_index)); + s = format (s, "miss-next %d ", (mp->miss_next_index)); + s = format (s, "current-data-flag %d ", (mp->current_data_flag)); if (mp->current_data_flag) - s = format (s, "current-data-offset %d ", - ntohl (mp->current_data_offset)); + s = format (s, "current-data-offset %d ", (mp->current_data_offset)); s = format (s, "mask hex "); - for (i = 0; i < ntohl (mp->match_n_vectors) * sizeof (u32x4); i++) + for (i = 0; i < (mp->match_n_vectors) * sizeof (u32x4); i++) s = format (s, "%02x", mp->mask[i]); vec_add1 (s, ' '); } @@ -1600,13 +1380,13 @@ static void *vl_api_classify_add_del_session_t_print s = format (0, "SCRIPT: classify_add_del_session "); - s = format (s, "table_index %d ", ntohl (mp->table_index)); - s = format (s, "hit_next_index %d ", ntohl (mp->hit_next_index)); - s = format (s, "opaque_index %d ", ntohl (mp->opaque_index)); - s = format (s, "advance %d ", ntohl (mp->advance)); + s = format (s, "table_index %d ", (mp->table_index)); + s = format (s, "hit_next_index %d ", (mp->hit_next_index)); + s = format (s, "opaque_index %d ", (mp->opaque_index)); + s = format (s, "advance %d ", (mp->advance)); s = format (s, "action %d ", mp->action); if (mp->action) - s = format (s, "metadata %d ", ntohl (mp->metadata)); + s = format (s, "metadata %d ", (mp->metadata)); if (mp->is_add == 0) s = format (s, "del "); @@ -1636,8 +1416,8 @@ static void *vl_api_classify_set_interface_ip_table_t_print if (mp->is_ipv6) s = format (s, "ipv6 "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - s = format (s, "table %d ", ntohl (mp->table_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); + s = format (s, "table %d ", (mp->table_index)); FINISH; } @@ -1649,10 +1429,10 @@ static void *vl_api_classify_set_interface_l2_tables_t_print s = format (0, "SCRIPT: classify_set_interface_l2_tables "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index)); - s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index)); - s = format (s, "other-table %d ", ntohl (mp->other_table_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); + s = format (s, "ip4-table %d ", (mp->ip4_table_index)); + s = format (s, "ip6-table %d ", (mp->ip6_table_index)); + s = format (s, "other-table %d ", (mp->other_table_index)); s = format (s, "is-input %d ", mp->is_input); FINISH; @@ -1665,7 +1445,7 @@ static void *vl_api_add_node_next_t_print s = format (0, "SCRIPT: add_node_next "); - s = format (0, "node %s next %s ", mp->node_name, mp->next_name); + s = format (s, "node %s next %s ", mp->node_name, mp->next_name); FINISH; } @@ -1678,10 +1458,11 @@ 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)); - s = format (s, "local_session_id %d ", ntohl (mp->local_session_id)); - s = format (s, "remote_session_id %d ", ntohl (mp->remote_session_id)); + 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 ", clib_net_to_host_u64 (mp->local_cookie)); s = format (s, "remote_cookie %lld ", @@ -1699,7 +1480,7 @@ static void *vl_api_l2tpv3_set_tunnel_cookies_t_print s = format (0, "SCRIPT: l2tpv3_set_tunnel_cookies "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); s = format (s, "new_local_cookie %llu ", clib_net_to_host_u64 (mp->new_local_cookie)); @@ -1717,7 +1498,7 @@ static void *vl_api_l2tpv3_interface_enable_disable_t_print s = format (0, "SCRIPT: l2tpv3_interface_enable_disable "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->enable_disable == 0) s = format (s, "del "); @@ -1769,8 +1550,10 @@ static void *vl_api_vxlan_add_del_tunnel_t_print u8 *s; s = format (0, "SCRIPT: vxlan_add_del_tunnel "); - ip46_address_t src = to_ip46 (mp->is_ipv6, mp->src_address); - ip46_address_t dst = to_ip46 (mp->is_ipv6, mp->dst_address); + ip46_address_t src = + to_ip46 (mp->src_address.af, (u8 *) & mp->src_address.un); + ip46_address_t dst = + to_ip46 (mp->dst_address.af, (u8 *) & mp->dst_address.un); u8 is_grp = ip46_address_is_multicast (&dst); char *dst_name = is_grp ? "group" : "dst"; @@ -1780,16 +1563,16 @@ static void *vl_api_vxlan_add_del_tunnel_t_print &dst, IP46_TYPE_ANY); if (is_grp) - s = format (s, "mcast_sw_if_index %d ", ntohl (mp->mcast_sw_if_index)); + s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index)); if (mp->encap_vrf_id) - s = format (s, "encap-vrf-id %d ", ntohl (mp->encap_vrf_id)); + s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id)); - s = format (s, "decap-next %d ", ntohl (mp->decap_next_index)); + s = format (s, "decap-next %d ", (mp->decap_next_index)); - s = format (s, "vni %d ", ntohl (mp->vni)); + s = format (s, "vni %d ", (mp->vni)); - s = format (s, "instance %d ", ntohl (mp->instance)); + s = format (s, "instance %d ", (mp->instance)); if (mp->is_add == 0) s = format (s, "del "); @@ -1803,8 +1586,8 @@ static void *vl_api_vxlan_offload_rx_t_print u8 *s; s = format (0, "SCRIPT: vxlan_offload_rx "); - s = format (s, "hw hw_if_index %d ", ntohl (mp->hw_if_index)); - s = format (s, "rx sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "hw hw_if_index %d ", (mp->hw_if_index)); + s = format (s, "rx sw_if_index %d ", (mp->sw_if_index)); if (!mp->enable) s = format (s, "del "); @@ -1818,7 +1601,7 @@ static void *vl_api_vxlan_tunnel_dump_t_print s = format (0, "SCRIPT: vxlan_tunnel_dump "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -1834,14 +1617,13 @@ static void *vl_api_vxlan_gbp_tunnel_add_del_t_print else s = format (s, "del "); - s = format (s, "instance %d ", ntohl (mp->tunnel.instance)); + s = format (s, "instance %d ", (mp->tunnel.instance)); s = format (s, "src %U ", format_vl_api_address, &mp->tunnel.src); s = format (s, "dst %U ", format_vl_api_address, &mp->tunnel.dst); - s = - format (s, "mcast_sw_if_index %d ", ntohl (mp->tunnel.mcast_sw_if_index)); - s = format (s, "encap_table_id %d ", ntohl (mp->tunnel.encap_table_id)); - s = format (s, "vni %d ", ntohl (mp->tunnel.vni)); - s = format (s, "sw_if_index %d ", ntohl (mp->tunnel.sw_if_index)); + s = format (s, "mcast_sw_if_index %d ", (mp->tunnel.mcast_sw_if_index)); + s = format (s, "encap_table_id %d ", (mp->tunnel.encap_table_id)); + s = format (s, "vni %d ", (mp->tunnel.vni)); + s = format (s, "sw_if_index %d ", (mp->tunnel.sw_if_index)); FINISH; } @@ -1853,7 +1635,7 @@ static void *vl_api_vxlan_gbp_tunnel_dump_t_print s = format (0, "SCRIPT: vxlan_gbp_tunnel_dump "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -1865,7 +1647,7 @@ static void *vl_api_sw_interface_set_vxlan_gbp_bypass_t_print s = format (0, "SCRIPT: sw_interface_set_vxlan_gbp_bypass "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); s = format (s, "%s ", (mp->is_ipv6 != 0) ? "ipv6" : "ipv4"); s = format (s, "%s ", (mp->enable != 0) ? "enable" : "disable"); @@ -1878,8 +1660,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"; @@ -1889,14 +1673,14 @@ static void *vl_api_geneve_add_del_tunnel_t_print &remote, IP46_TYPE_ANY); if (is_grp) - s = format (s, "mcast_sw_if_index %d ", ntohl (mp->mcast_sw_if_index)); + s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index)); if (mp->encap_vrf_id) - s = format (s, "encap-vrf-id %d ", ntohl (mp->encap_vrf_id)); + s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id)); - s = format (s, "decap-next %d ", ntohl (mp->decap_next_index)); + s = format (s, "decap-next %d ", (mp->decap_next_index)); - s = format (s, "vni %d ", ntohl (mp->vni)); + s = format (s, "vni %d ", (mp->vni)); if (mp->is_add == 0) s = format (s, "del "); @@ -1911,7 +1695,7 @@ static void *vl_api_geneve_tunnel_dump_t_print s = format (0, "SCRIPT: geneve_tunnel_dump "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -1926,16 +1710,16 @@ static void *vl_api_gre_tunnel_add_del_t_print s = format (s, "dst %U ", format_vl_api_address, &mp->tunnel.dst); s = format (s, "src %U ", format_vl_api_address, &mp->tunnel.src); - s = format (s, "instance %d ", ntohl (mp->tunnel.instance)); + s = format (s, "instance %d ", (mp->tunnel.instance)); if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_TEB) s = format (s, "teb "); if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_ERSPAN) - s = format (s, "erspan %d ", ntohs (mp->tunnel.session_id)); + s = format (s, "erspan %d ", (mp->tunnel.session_id)); - if (mp->tunnel.outer_fib_id) - s = format (s, "outer-fib-id %d ", ntohl (mp->tunnel.outer_fib_id)); + if (mp->tunnel.outer_table_id) + s = format (s, "outer-table-id %d ", mp->tunnel.outer_table_id); if (mp->is_add == 0) s = format (s, "del "); @@ -1950,7 +1734,7 @@ static void *vl_api_gre_tunnel_dump_t_print s = format (0, "SCRIPT: gre_tunnel_dump "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -1972,7 +1756,7 @@ static void *vl_api_l2_interface_efp_filter_t_print s = format (0, "SCRIPT: l2_interface_efp_filter "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->enable_disable) s = format (s, "enable "); else @@ -1988,11 +1772,11 @@ static void *vl_api_l2_interface_vlan_tag_rewrite_t_print s = format (0, "SCRIPT: l2_interface_vlan_tag_rewrite "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - s = format (s, "vtr_op %d ", ntohl (mp->vtr_op)); - s = format (s, "push_dot1q %d ", ntohl (mp->push_dot1q)); - s = format (s, "tag1 %d ", ntohl (mp->tag1)); - s = format (s, "tag2 %d ", ntohl (mp->tag2)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); + s = format (s, "vtr_op %d ", (mp->vtr_op)); + s = format (s, "push_dot1q %d ", (mp->push_dot1q)); + s = format (s, "tag1 %d ", (mp->tag1)); + s = format (s, "tag2 %d ", (mp->tag2)); FINISH; } @@ -2008,13 +1792,17 @@ static void *vl_api_create_vhost_user_if_t_print if (mp->is_server) s = format (s, "server "); if (mp->renumber) - s = format (s, "renumber %d ", ntohl (mp->custom_dev_instance)); + s = format (s, "renumber %d ", (mp->custom_dev_instance)); if (mp->disable_mrg_rxbuf) s = format (s, "disable_mrg_rxbuf "); if (mp->disable_indirect_desc) s = format (s, "disable_indirect_desc "); if (mp->tag[0]) - s = format (s, "tag %s", mp->tag); + s = format (s, "tag %s ", mp->tag); + if (mp->enable_gso) + s = format (s, "gso "); + if (mp->enable_packed) + s = format (s, "packed"); FINISH; } @@ -2026,12 +1814,16 @@ static void *vl_api_modify_vhost_user_if_t_print s = format (0, "SCRIPT: modify_vhost_user_if "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); s = format (s, "socket %s ", mp->sock_filename); if (mp->is_server) s = format (s, "server "); if (mp->renumber) - s = format (s, "renumber %d ", ntohl (mp->custom_dev_instance)); + s = format (s, "renumber %d ", (mp->custom_dev_instance)); + if (mp->enable_gso) + s = format (s, "gso "); + if (mp->enable_packed) + s = format (s, "packed"); FINISH; } @@ -2042,7 +1834,7 @@ static void *vl_api_delete_vhost_user_if_t_print u8 *s; s = format (0, "SCRIPT: delete_vhost_user_if "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -2053,6 +1845,8 @@ static void *vl_api_sw_interface_vhost_user_dump_t_print u8 *s; s = format (0, "SCRIPT: sw_interface_vhost_user_dump "); + if (mp->sw_if_index != ~0) + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -2065,7 +1859,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_new_vec (mp, &mp->name_filter); + s = format (s, "name_filter %v ", v); + vec_free (v); + } else s = format (s, "all "); @@ -2079,7 +1877,7 @@ static void *vl_api_l2_fib_table_dump_t_print s = format (0, "SCRIPT: l2_fib_table_dump "); - s = format (s, "bd_id %d ", ntohl (mp->bd_id)); + s = format (s, "bd_id %d ", (mp->bd_id)); FINISH; } @@ -2100,7 +1898,7 @@ static void *vl_api_want_interface_events_t_print u8 *s; s = format (0, "SCRIPT: want_interface_events pid %d enable %d ", - ntohl (mp->pid), ntohl (mp->enable_disable)); + (mp->pid), ntohl (mp->enable_disable)); FINISH; } @@ -2120,10 +1918,8 @@ static void *vl_api_cli_inband_t_print { u8 *s; u8 *cmd = 0; - u32 length = vl_api_string_len (&mp->cmd); - vec_validate (cmd, length); - clib_memcpy (cmd, vl_api_from_api_string (&mp->cmd), length); + cmd = vl_api_from_api_to_new_vec (mp, &mp->cmd); s = format (0, "SCRIPT: exec %v ", cmd); @@ -2179,8 +1975,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"; @@ -2190,19 +1988,19 @@ static void *vl_api_vxlan_gpe_add_del_tunnel_t_print &remote, IP46_TYPE_ANY); if (is_grp) - s = format (s, "mcast_sw_if_index %d ", ntohl (mp->mcast_sw_if_index)); - s = format (s, "protocol %d ", ntohl (mp->protocol)); + s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index)); + s = format (s, "protocol %d ", (mp->protocol)); - s = format (s, "vni %d ", ntohl (mp->vni)); + s = format (s, "vni %d ", (mp->vni)); if (mp->is_add == 0) s = format (s, "del "); if (mp->encap_vrf_id) - s = format (s, "encap-vrf-id %d ", ntohl (mp->encap_vrf_id)); + s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id)); if (mp->decap_vrf_id) - s = format (s, "decap-vrf-id %d ", ntohl (mp->decap_vrf_id)); + s = format (s, "decap-vrf-id %d ", (mp->decap_vrf_id)); FINISH; } @@ -2214,7 +2012,7 @@ static void *vl_api_vxlan_gpe_tunnel_dump_t_print s = format (0, "SCRIPT: vxlan_gpe_tunnel_dump "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -2226,81 +2024,9 @@ static void *vl_api_interface_name_renumber_t_print s = format (0, "SCRIPT: interface_renumber "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - - s = format (s, "new_show_dev_instance %d ", - ntohl (mp->new_show_dev_instance)); - - FINISH; -} - -static void *vl_api_ip_probe_neighbor_t_print - (vl_api_ip_probe_neighbor_t * mp, void *handle) -{ - u8 *s; + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); - s = format (0, "SCRIPT: ip_probe_neighbor "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - s = format (s, "address %U ", format_vl_api_address, &mp->dst); - - FINISH; -} - -static void *vl_api_ip_scan_neighbor_enable_disable_t_print - (vl_api_ip_scan_neighbor_enable_disable_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: ip_scan_neighbor_enable_disable "); - - switch (mp->mode) - { - case IP_SCAN_V4_NEIGHBORS: - s = format (s, "ip4 "); - break; - case IP_SCAN_V6_NEIGHBORS: - s = format (s, "ip6 "); - break; - case IP_SCAN_V46_NEIGHBORS: - s = format (s, "both "); - break; - default: - s = format (s, "disable "); - } - - s = format (s, "interval %d ", mp->scan_interval); - s = format (s, "max-time %d ", mp->max_proc_time); - s = format (s, "max-update %d ", mp->max_update); - s = format (s, "delay %d ", mp->scan_int_delay); - s = format (s, "stale %d ", mp->stale_threshold); - - FINISH; -} - -static void *vl_api_want_ip4_arp_events_t_print - (vl_api_want_ip4_arp_events_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: want_ip4_arp_events "); - s = format (s, "pid %d address %U ", ntohl (mp->pid), - format_ip4_address, mp->ip); - if (mp->enable_disable == 0) - s = format (s, "del "); - - FINISH; -} - -static void *vl_api_want_ip6_nd_events_t_print - (vl_api_want_ip6_nd_events_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: want_ip6_nd_events "); - s = format (s, "pid %d address %U ", ntohl (mp->pid), - format_vl_api_ip6_address, mp->ip); - if (mp->enable_disable == 0) - s = format (s, "del "); + s = format (s, "new_show_dev_instance %d ", (mp->new_show_dev_instance)); FINISH; } @@ -2311,7 +2037,7 @@ static void *vl_api_want_l2_macs_events_t_print u8 *s; s = format (0, "SCRIPT: want_l2_macs_events "); - s = format (s, "learn-limit %d ", ntohl (mp->learn_limit)); + s = format (s, "learn-limit %d ", (mp->learn_limit)); s = format (s, "scan-delay %d ", (u32) mp->scan_delay); s = format (s, "max-entries %d ", (u32) mp->max_macs_in_event * 10); if (mp->enable_disable == 0) @@ -2327,10 +2053,10 @@ static void *vl_api_input_acl_set_interface_t_print s = format (0, "SCRIPT: input_acl_set_interface "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index)); - s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index)); - s = format (s, "l2-table %d ", ntohl (mp->l2_table_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); + s = format (s, "ip4-table %d ", (mp->ip4_table_index)); + s = format (s, "ip6-table %d ", (mp->ip6_table_index)); + s = format (s, "l2-table %d ", (mp->l2_table_index)); if (mp->is_add == 0) s = format (s, "del "); @@ -2345,10 +2071,10 @@ static void *vl_api_output_acl_set_interface_t_print s = format (0, "SCRIPT: output_acl_set_interface "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index)); - s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index)); - s = format (s, "l2-table %d ", ntohl (mp->l2_table_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); + s = format (s, "ip4-table %d ", (mp->ip4_table_index)); + s = format (s, "ip6-table %d ", (mp->ip6_table_index)); + s = format (s, "l2-table %d ", (mp->l2_table_index)); if (mp->is_add == 0) s = format (s, "del "); @@ -2362,7 +2088,7 @@ static void *vl_api_ip_address_dump_t_print u8 *s; s = format (0, "SCRIPT: ip6_address_dump "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); s = format (s, "is_ipv6 %d ", mp->is_ipv6 != 0); FINISH; @@ -2385,7 +2111,7 @@ static void *vl_api_cop_interface_enable_disable_t_print u8 *s; s = format (0, "SCRIPT: cop_interface_enable_disable "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->enable_disable) s = format (s, "enable "); else @@ -2400,8 +2126,8 @@ static void *vl_api_cop_whitelist_enable_disable_t_print u8 *s; s = format (0, "SCRIPT: cop_whitelist_enable_disable "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - s = format (s, "fib-id %d ", ntohl (mp->fib_id)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); + s = format (s, "fib-id %d ", (mp->fib_id)); if (mp->ip4) s = format (s, "ip4 "); if (mp->ip6) @@ -2536,11 +2262,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 "); @@ -2568,13 +2294,13 @@ static void *vl_api_policer_classify_set_interface_t_print u8 *s; s = format (0, "SCRIPT: policer_classify_set_interface "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->ip4_table_index != ~0) - s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index)); + s = format (s, "ip4-table %d ", (mp->ip4_table_index)); if (mp->ip6_table_index != ~0) - s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index)); + s = format (s, "ip6-table %d ", (mp->ip6_table_index)); if (mp->l2_table_index != ~0) - s = format (s, "l2-table %d ", ntohl (mp->l2_table_index)); + s = format (s, "l2-table %d ", (mp->l2_table_index)); if (mp->is_add == 0) s = format (s, "del "); @@ -2589,13 +2315,13 @@ static void *vl_api_policer_classify_dump_t_print s = format (0, "SCRIPT: policer_classify_dump "); switch (mp->type) { - case POLICER_CLASSIFY_TABLE_IP4: + case POLICER_CLASSIFY_API_TABLE_IP4: s = format (s, "type ip4 "); break; - case POLICER_CLASSIFY_TABLE_IP6: + case POLICER_CLASSIFY_API_TABLE_IP6: s = format (s, "type ip6 "); break; - case POLICER_CLASSIFY_TABLE_L2: + case POLICER_CLASSIFY_API_TABLE_L2: s = format (s, "type l2 "); break; default: @@ -2612,7 +2338,7 @@ static void *vl_api_sw_interface_clear_stats_t_print s = format (0, "SCRIPT: sw_interface_clear_stats "); if (mp->sw_if_index != ~0) - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -2623,38 +2349,47 @@ static void *vl_api_mpls_tunnel_dump_t_print u8 *s; s = format (0, "SCRIPT: mpls_tunnel_dump "); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + FINISH; +} + +static void *vl_api_mpls_table_dump_t_print + (vl_api_mpls_table_dump_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: mpls_table_decap_dump "); FINISH; } -static void *vl_api_mpls_fib_dump_t_print - (vl_api_mpls_fib_dump_t * mp, void *handle) +static void *vl_api_mpls_route_dump_t_print + (vl_api_mpls_route_dump_t * mp, void *handle) { u8 *s; - s = format (0, "SCRIPT: mpls_fib_decap_dump "); + s = format (0, "SCRIPT: mpls_route_decap_dump "); FINISH; } -static void *vl_api_ip_fib_dump_t_print - (vl_api_ip_fib_dump_t * mp, void *handle) +static void *vl_api_ip_table_dump_t_print + (vl_api_ip_table_dump_t * mp, void *handle) { u8 *s; - s = format (0, "SCRIPT: ip_fib_dump "); + s = format (0, "SCRIPT: ip_table_dump "); FINISH; } -static void *vl_api_ip6_fib_dump_t_print - (vl_api_ip6_fib_dump_t * mp, void *handle) +static void *vl_api_ip_route_dump_t_print + (vl_api_ip_route_dump_t * mp, void *handle) { u8 *s; - s = format (0, "SCRIPT: ip6_fib_dump "); + s = format (0, "SCRIPT: ip_route_dump "); FINISH; } @@ -2676,7 +2411,7 @@ static void *vl_api_classify_table_by_interface_t_print s = format (0, "SCRIPT: classify_table_by_interface "); if (mp->sw_if_index != ~0) - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); FINISH; } @@ -2688,7 +2423,7 @@ static void *vl_api_classify_table_info_t_print s = format (0, "SCRIPT: classify_table_info "); if (mp->table_id != ~0) - s = format (s, "table_id %d ", ntohl (mp->table_id)); + s = format (s, "table_id %d ", (mp->table_id)); FINISH; } @@ -2700,7 +2435,7 @@ static void *vl_api_classify_session_dump_t_print s = format (0, "SCRIPT: classify_session_dump "); if (mp->table_id != ~0) - s = format (s, "table_id %d ", ntohl (mp->table_id)); + s = format (s, "table_id %d ", (mp->table_id)); FINISH; } @@ -2713,13 +2448,13 @@ 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); - s = format (s, "collector-port %d ", ntohs (mp->collector_port)); + (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); - s = format (s, "vrf-id %d ", ntohl (mp->vrf_id)); - s = format (s, "path-mtu %d ", ntohl (mp->path_mtu)); - s = format (s, "template-interval %d ", ntohl (mp->template_interval)); + (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)); s = format (s, "udp-checksum %d ", mp->udp_checksum); FINISH; @@ -2742,8 +2477,8 @@ static void *vl_api_set_ipfix_classify_stream_t_print s = format (0, "SCRIPT: set_ipfix_classify_stream "); - s = format (s, "domain-id %d ", ntohl (mp->domain_id)); - s = format (s, "src-port %d ", ntohs (mp->src_port)); + s = format (s, "domain-id %d ", (mp->domain_id)); + s = format (s, "src-port %d ", (mp->src_port)); FINISH; } @@ -2765,7 +2500,7 @@ static void *vl_api_ipfix_classify_table_add_del_t_print s = format (0, "SCRIPT: ipfix_classify_table_add_del "); - s = format (s, "table-id %d ", ntohl (mp->table_id)); + s = format (s, "table-id %d ", (mp->table_id)); s = format (s, "ip-version %d ", mp->ip_version); s = format (s, "transport-protocol %d ", mp->transport_protocol); @@ -2788,8 +2523,8 @@ static void *vl_api_sw_interface_span_enable_disable_t_print u8 *s; s = format (0, "SCRIPT: sw_interface_span_enable_disable "); - s = format (s, "src_sw_if_index %u ", ntohl (mp->sw_if_index_from)); - s = format (s, "dst_sw_if_index %u ", ntohl (mp->sw_if_index_to)); + s = format (s, "src_sw_if_index %u ", (mp->sw_if_index_from)); + s = format (s, "dst_sw_if_index %u ", (mp->sw_if_index_to)); if (mp->is_l2) s = format (s, "l2 "); @@ -2846,7 +2581,9 @@ static void *vl_api_pg_create_interface_t_print u8 *s; s = format (0, "SCRIPT: pg_create_interface "); - s = format (0, "if_id %d", ntohl (mp->interface_id)); + s = format (s, "if_id %d ", (mp->interface_id)); + s = format (s, "gso-enabled %u ", mp->gso_enabled); + s = format (s, "gso-size %u", (mp->gso_size)); FINISH; } @@ -2857,10 +2594,10 @@ static void *vl_api_pg_capture_t_print u8 *s; s = format (0, "SCRIPT: pg_capture "); - s = format (0, "if_id %d ", ntohl (mp->interface_id)); - s = format (0, "pcap %s", mp->pcap_file_name); + s = format (s, "if_id %d ", (mp->interface_id)); + s = format (s, "pcap %s", mp->pcap_file_name); if (mp->count != ~0) - s = format (s, "count %d ", ntohl (mp->count)); + s = format (s, "count %d ", (mp->count)); if (!mp->is_enabled) s = format (s, "disable"); @@ -2873,14 +2610,31 @@ static void *vl_api_pg_enable_disable_t_print u8 *s; s = format (0, "SCRIPT: pg_enable_disable "); - if (ntohl (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"); FINISH; } +static void *vl_api_pg_interface_enable_disable_coalesce_t_print + (vl_api_pg_interface_enable_disable_coalesce_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: pg_interface_enable_disable_coalesce "); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); + if (!mp->coalesce_enabled) + s = format (s, "disable"); + else + s = format (s, "enable"); + FINISH; +} + + static void *vl_api_ip_source_and_port_range_check_add_del_t_print (vl_api_ip_source_and_port_range_check_add_del_t * mp, void *handle) { @@ -2895,7 +2649,7 @@ static void *vl_api_ip_source_and_port_range_check_add_del_t_print s = format (s, "range %d - %d ", mp->low_ports[i], mp->high_ports[i]); } - s = format (s, "vrf %d ", ntohl (mp->vrf_id)); + s = format (s, "vrf %d ", (mp->vrf_id)); if (mp->is_add == 0) s = format (s, "del "); @@ -2911,19 +2665,19 @@ static void *vl_api_ip_source_and_port_range_check_interface_add_del_t_print s = format (0, "SCRIPT: ip_source_and_port_range_check_interface_add_del "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->tcp_out_vrf_id != ~0) - s = format (s, "tcp-out-vrf %d ", ntohl (mp->tcp_out_vrf_id)); + s = format (s, "tcp-out-vrf %d ", (mp->tcp_out_vrf_id)); if (mp->udp_out_vrf_id != ~0) - s = format (s, "udp-out-vrf %d ", ntohl (mp->udp_out_vrf_id)); + s = format (s, "udp-out-vrf %d ", (mp->udp_out_vrf_id)); if (mp->tcp_in_vrf_id != ~0) - s = format (s, "tcp-in-vrf %d ", ntohl (mp->tcp_in_vrf_id)); + s = format (s, "tcp-in-vrf %d ", (mp->tcp_in_vrf_id)); if (mp->udp_in_vrf_id != ~0) - s = format (s, "udp-in-vrf %d ", ntohl (mp->udp_in_vrf_id)); + s = format (s, "udp-in-vrf %d ", (mp->udp_in_vrf_id)); if (mp->is_add == 0) s = format (s, "del "); @@ -2937,7 +2691,7 @@ static void *vl_api_lisp_enable_disable_t_print u8 *s; s = format (0, "SCRIPT: lisp_enable_disable %s", - mp->is_en ? "enable" : "disable"); + mp->is_enable ? "enable" : "disable"); FINISH; } @@ -2971,21 +2725,32 @@ static void *vl_api_lisp_pitr_set_locator_set_t_print FINISH; } +static u8 * +format_nsh_address_vat (u8 * s, va_list * args) +{ + nsh_t *a = va_arg (*args, nsh_t *); + return format (s, "SPI:%d SI:%d", clib_net_to_host_u32 (a->spi), a->si); +} + static u8 * format_lisp_flat_eid (u8 * s, va_list * args) { - u32 type = va_arg (*args, u32); - u8 *eid = va_arg (*args, u8 *); - u32 eid_len = va_arg (*args, u32); + vl_api_eid_t *eid = va_arg (*args, vl_api_eid_t *); - switch (type) + switch (eid->type) { - case 0: - return format (s, "%U/%d", format_ip4_address, eid, eid_len); - case 1: - return format (s, "%U/%d", format_ip6_address, eid, eid_len); - case 3: - return format (s, "%U", format_ethernet_address, eid); + case EID_TYPE_API_PREFIX: + if (eid->address.prefix.address.af) + return format (s, "%U/%d", format_ip6_address, + eid->address.prefix.address.un.ip6, + eid->address.prefix.len); + return format (s, "%U/%d", format_ip4_address, + eid->address.prefix.address.un.ip4, + eid->address.prefix.len); + case EID_TYPE_API_MAC: + return format (s, "%U", format_ethernet_address, eid->address.mac); + case EID_TYPE_API_NSH: + return format (s, "%U", format_nsh_address_vat, eid->address.nsh); } return 0; } @@ -3002,17 +2767,15 @@ static void *vl_api_lisp_add_del_remote_mapping_t_print s = format (s, "del-all "); s = format (s, "%s ", mp->is_add ? "add" : "del"); - s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni)); + s = format (s, "vni %d ", (mp->vni)); - s = format (s, "eid %U ", format_lisp_flat_eid, - mp->eid_type, mp->eid, mp->eid_len); + s = format (s, "eid %U ", format_lisp_flat_eid, &mp->deid); if (mp->is_src_dst) { - s = format (s, "seid %U ", format_lisp_flat_eid, - mp->eid_type, mp->seid, mp->seid_len); + s = format (s, "seid %U ", format_lisp_flat_eid, &mp->seid); } - rloc_num = clib_net_to_host_u32 (mp->rloc_num); + rloc_num = (mp->rloc_num); if (0 == rloc_num) s = format (s, "action %d", mp->action); @@ -3028,10 +2791,10 @@ static void *vl_api_lisp_add_del_adjacency_t_print s = format (0, "SCRIPT: lisp_add_del_adjacency "); s = format (s, "%s ", mp->is_add ? "add" : "del"); - s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni)); + s = format (s, "vni %d ", (mp->vni)); s = format (s, "reid %U leid %U ", - format_lisp_flat_eid, mp->eid_type, mp->reid, mp->reid_len, - format_lisp_flat_eid, mp->eid_type, mp->leid, mp->leid_len); + format_lisp_flat_eid, &mp->reid, format_lisp_flat_eid, + &mp->leid); FINISH; } @@ -3061,10 +2824,8 @@ static void *vl_api_lisp_eid_table_add_del_map_t_print if (!mp->is_add) s = format (s, "del "); - s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni)); - s = format (s, "%s %d ", - mp->is_l2 ? "bd_index" : "vrf", - clib_net_to_host_u32 (mp->dp_table)); + s = format (s, "vni %d ", (mp->vni)); + s = format (s, "%s %d ", mp->is_l2 ? "bd_index" : "vrf", (mp->dp_table)); FINISH; } @@ -3078,15 +2839,14 @@ static void *vl_api_lisp_add_del_local_eid_t_print if (!mp->is_add) s = format (s, "del "); - s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni)); - s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type, mp->eid, - mp->prefix_len); + s = format (s, "vni %d ", (mp->vni)); + s = format (s, "eid %U ", format_lisp_flat_eid, &mp->eid); s = format (s, "locator-set %s ", mp->locator_set_name); - if (*mp->key) + if (mp->key.id) { - u32 key_id = mp->key_id; + u32 key_id = mp->key.id; s = format (s, "key-id %U", format_hmac_key_id, key_id); - s = format (s, "secret-key %s", mp->key); + s = format (s, "secret-key %s", mp->key.key); } FINISH; } @@ -3111,10 +2871,10 @@ static void *vl_api_lisp_add_del_map_resolver_t_print if (!mp->is_add) s = format (s, "del "); - if (mp->is_ipv6) - s = format (s, "%U ", format_ip6_address, mp->ip_address); + if (mp->ip_address.af) + s = format (s, "%U ", format_ip6_address, mp->ip_address.un.ip6); else - s = format (s, "%U ", format_ip4_address, mp->ip_address); + s = format (s, "%U ", format_ip4_address, mp->ip_address.un.ip4); FINISH; } @@ -3126,7 +2886,7 @@ static void *vl_api_gpe_enable_disable_t_print s = format (0, "SCRIPT: gpe_enable_disable "); - s = format (s, "%s ", mp->is_en ? "enable" : "disable"); + s = format (s, "%s ", mp->is_enable ? "enable" : "disable"); FINISH; } @@ -3184,7 +2944,7 @@ static void *vl_api_lisp_locator_dump_t_print s = format (0, "SCRIPT: lisp_locator_dump "); if (mp->is_index_set) - s = format (s, "ls_index %d", clib_net_to_host_u32 (mp->ls_index)); + s = format (s, "ls_index %d", (mp->ls_index)); else s = format (s, "ls_name %s", mp->ls_name); @@ -3198,16 +2958,7 @@ static void *vl_api_lisp_map_request_mode_t_print s = format (0, "SCRIPT: lisp_map_request_mode "); - switch (mp->mode) - { - case 0: - s = format (s, "dst-only"); - break; - case 1: - s = format (s, "src-dst"); - default: - break; - } + s = mp->is_src_dst ? format (s, "src-dst") : format (s, "dst-only"); FINISH; } @@ -3221,9 +2972,8 @@ static void *vl_api_lisp_eid_table_dump_t_print if (mp->eid_set) { - s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni)); - s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type, - mp->eid, mp->prefix_length); + s = format (s, "vni %d ", (mp->vni)); + s = format (s, "eid %U ", format_lisp_flat_eid, &mp->eid); switch (mp->filter) { case 1: @@ -3232,6 +2982,8 @@ static void *vl_api_lisp_eid_table_dump_t_print case 2: s = format (s, "remote "); break; + default: + break; } } FINISH; @@ -3243,7 +2995,7 @@ static void *vl_api_lisp_rloc_probe_enable_disable_t_print u8 *s; s = format (0, "SCRIPT: lisp_rloc_probe_enable_disable "); - if (mp->is_enabled) + if (mp->is_enable) s = format (s, "enable"); else s = format (s, "disable"); @@ -3257,7 +3009,7 @@ static void *vl_api_lisp_map_register_enable_disable_t_print u8 *s; s = format (0, "SCRIPT: lisp_map_register_enable_disable "); - if (mp->is_enabled) + if (mp->is_enable) s = format (s, "enable"); else s = format (s, "disable"); @@ -3271,7 +3023,7 @@ static void *vl_api_lisp_adjacencies_get_t_print u8 *s; s = format (0, "SCRIPT: lisp_adjacencies_get "); - s = format (s, "vni %d", clib_net_to_host_u32 (mp->vni)); + s = format (s, "vni %d", (mp->vni)); FINISH; } @@ -3308,11 +3060,11 @@ static void *vl_api_ipsec_tunnel_if_add_del_t_print s = format (s, "local-ip %U ", format_vl_api_address, &mp->remote_ip); s = format (s, "remote-ip %U ", format_vl_api_address, &mp->local_ip); - s = format (s, "tx-table-id %d ", ntohl (mp->tx_table_id)); + s = format (s, "tx-table-id %d ", (mp->tx_table_id)); - s = format (s, "local-spi %d ", ntohl (mp->local_spi)); + s = format (s, "local-spi %d ", (mp->local_spi)); - s = format (s, "remote-spi %d ", ntohl (mp->remote_spi)); + s = format (s, "remote-spi %d ", (mp->remote_spi)); s = format (s, "local-crypto-key-len %d ", mp->local_crypto_key_len); s = format (s, "local-crypto-key %U ", format_hex_bytes, @@ -3333,58 +3085,174 @@ static void *vl_api_ipsec_tunnel_if_add_del_t_print FINISH; } -static void *vl_api_ipsec_gre_tunnel_add_del_t_print - (vl_api_ipsec_gre_tunnel_add_del_t * mp, void *handle) +static const char *policy_strs[] = { + "BYPASS", + "DISCARD", + "RESOLVE", + "PROTECT", +}; + +static const char *proto_strs[] = { + "ESP", + "AH", +}; + +static const char *algo_strs[] = { + "NONE", + "AES_CBC_128", + "AES_CBC_192", + "AES_CBC_256", + "AES_CTR_128", + "AES_CTR_192", + "AES_CTR_256", + "AES_GCM_128", + "AES_GCM_192", + "AES_GCM_256", + "DES_CBC", + "3DES_CBC", +}; + + +static const char *integ_strs[] = { + "NONE", + "MD5_96", + "SHA1_96", + "SHA_256_96", + "SHA_256_128", + "SHA_384_192", + "SHA_512_256", +}; + +static void *vl_api_ipsec_spd_entry_add_del_t_print + (vl_api_ipsec_spd_entry_add_del_t * mp, void *handle) { u8 *s; + const char *str; + vl_api_ipsec_spd_entry_t *ep; + int policy_host_byte_order; - s = format (0, "SCRIPT: ipsec_gre_tunnel_add_del "); + ep = (vl_api_ipsec_spd_entry_t *) & mp->entry; - s = format (s, "dst %U ", format_vl_api_ip4_address, mp->tunnel.dst); + s = format (0, "SCRIPT: ipsec_spd_entry "); + s = format (s, "is_add %d spd_id %u priority %d is_outbound %d sa_id %u\n", + mp->is_add, + (ep->spd_id), ntohl (ep->priority), ep->is_outbound, + (ep->sa_id)); - s = format (s, "src %U ", format_vl_api_ip4_address, mp->tunnel.src); + policy_host_byte_order = (ep->policy); - s = format (s, "local_sa %d ", ntohl (mp->tunnel.local_sa_id)); + if (policy_host_byte_order < ARRAY_LEN (policy_strs)) + str = policy_strs[policy_host_byte_order]; + else + str = "BOGUS!"; - s = format (s, "remote_sa %d ", ntohl (mp->tunnel.remote_sa_id)); + s = format (s, " policy: %s protocol %d\n", str, ep->protocol); - if (mp->is_add == 0) - s = format (s, "del "); + s = format (s, " remote_address_start %U remote_address_stop %U\n", + format_vl_api_address, + &ep->remote_address_start, + format_vl_api_address, &ep->remote_address_stop); + + s = format (s, " local_address_start %U local_address_stop %U\n", + format_vl_api_address, + &ep->local_address_start, + format_vl_api_address, &ep->local_address_stop); + + s = format (s, " remote_port_start %d remote_port_stop %d\n", + (ep->remote_port_start), ntohs (ep->remote_port_stop)); + + s = format (s, " local_port_start %d local_port_stop %d ", + (ep->local_port_start), ntohs (ep->local_port_stop)); FINISH; } -static void *vl_api_ipsec_gre_tunnel_dump_t_print - (vl_api_ipsec_gre_tunnel_dump_t * mp, void *handle) +static void *vl_api_ipsec_interface_add_del_spd_t_print + (vl_api_ipsec_interface_add_del_spd_t * mp, void *handle) { u8 *s; - s = format (0, "SCRIPT: ipsec_gre_tunnel_dump "); + s = format (0, "SCRIPT: ipsec_interface_add_del_spd "); + s = format (s, "is_add %d sw_if_index %d spd_id %u ", + mp->is_add, (mp->sw_if_index), ntohl (mp->spd_id)); + FINISH; +} - if (mp->sw_if_index != ~0) - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); +static void *vl_api_ipsec_spd_add_del_t_print + (vl_api_ipsec_spd_add_del_t * mp, void *handle) +{ + u8 *s; + s = format (0, "SCRIPT: ipsec_spd_add_del "); + s = format (s, "spd_id %u is_add %d ", (mp->spd_id), mp->is_add); FINISH; } +static void *vl_api_ipsec_sad_entry_add_del_t_print + (vl_api_ipsec_sad_entry_add_del_t * mp, void *handle) +{ + u8 *s; + int tmp; + vl_api_ipsec_sad_entry_t *ep; + const char *protocol_str, *algo_str, *integ_str; + + protocol_str = "BOGUS protocol!"; + algo_str = "BOGUS crypto_algorithm!"; + integ_str = "BOGUS integrity_algorithm!"; + + ep = (vl_api_ipsec_sad_entry_t *) & mp->entry; + + s = format (0, "SCRIPT: ipsec_sad_entry_add_del is_add ", mp->is_add); + + tmp = (ep->protocol); + if (tmp < ARRAY_LEN (proto_strs)) + protocol_str = proto_strs[tmp]; + + tmp = (ep->crypto_algorithm); + if (tmp < ARRAY_LEN (algo_strs)) + algo_str = algo_strs[tmp]; + + tmp = (ep->integrity_algorithm); + if (tmp < ARRAY_LEN (integ_strs)) + integ_str = integ_strs[tmp]; + + s = format (s, "proto %s crypto alg %s integ alg %s\n", + protocol_str, algo_str, integ_str); + s = format (s, " crypto_key len %d value %U\n", + ep->crypto_key.length, format_hex_bytes, ep->crypto_key.data, + (int) (ep->crypto_key.length)); + s = format (s, " integ_key len %d value %U\n", + ep->integrity_key.length, format_hex_bytes, + ep->integrity_key.data, (int) (ep->integrity_key.length)); + s = format (s, " flags 0x%x ", (ep->flags)); + + s = format (s, "tunnel_src %U tunnel_dst %U\n", + format_vl_api_address, + &ep->tunnel_src, format_vl_api_address, &ep->tunnel_dst); + s = format (s, " tx_table_id %u salt %u ", + (ep->tx_table_id), ntohl (ep->salt)); + FINISH; +} + + static void *vl_api_l2_interface_pbb_tag_rewrite_t_print (vl_api_l2_interface_pbb_tag_rewrite_t * mp, void *handle) { u8 *s; - u32 vtr_op = ntohl (mp->vtr_op); + u32 vtr_op = (mp->vtr_op); s = format (0, "SCRIPT: l2_interface_pbb_tag_rewrite "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); s = format (s, "vtr_op %d ", vtr_op); if (vtr_op != L2_VTR_DISABLED && vtr_op != L2_VTR_POP_2) { if (vtr_op == L2_VTR_TRANSLATE_2_2) - s = format (s, "%d ", ntohs (mp->outer_tag)); + s = format (s, "%d ", (mp->outer_tag)); s = format (s, "dmac %U ", format_ethernet_address, &mp->b_dmac); s = format (s, "smac %U ", format_ethernet_address, &mp->b_smac); - s = format (s, "sid %d ", ntohl (mp->i_sid)); - s = format (s, "vlanid %d ", ntohs (mp->b_vlanid)); + s = format (s, "sid %d ", (mp->i_sid)); + s = format (s, "vlanid %d ", (mp->b_vlanid)); } FINISH; } @@ -3395,11 +3263,11 @@ static void *vl_api_flow_classify_set_interface_t_print u8 *s; s = format (0, "SCRIPT: flow_classify_set_interface "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->ip4_table_index != ~0) - s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index)); + s = format (s, "ip4-table %d ", (mp->ip4_table_index)); if (mp->ip6_table_index != ~0) - s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index)); + s = format (s, "ip6-table %d ", (mp->ip6_table_index)); if (mp->is_add == 0) s = format (s, "del "); @@ -3413,7 +3281,7 @@ vl_api_set_punt_t_print (vl_api_set_punt_t * mp, void *handle) s = format (0, "SCRIPT: punt "); - switch (clib_net_to_host_u32 (mp->punt.type)) + switch (mp->punt.type) { case PUNT_API_TYPE_L4: s = format (s, "%U", format_vl_api_address_family, mp->punt.punt.l4.af); @@ -3421,8 +3289,11 @@ vl_api_set_punt_t_print (vl_api_set_punt_t * mp, void *handle) s = format (s, "protocol %d ", mp->punt.punt.l4.protocol); if (mp->punt.punt.l4.port != (u16) ~ 0) - s = format (s, "port %d ", ntohs (mp->punt.punt.l4.port)); + s = format (s, "port %d ", (mp->punt.punt.l4.port)); break; + default: + break; + } if (!mp->is_add) @@ -3439,10 +3310,10 @@ static void *vl_api_flow_classify_dump_t_print s = format (0, "SCRIPT: flow_classify_dump "); switch (mp->type) { - case FLOW_CLASSIFY_TABLE_IP4: + case FLOW_CLASSIFY_API_TABLE_IP4: s = format (s, "type ip4 "); break; - case FLOW_CLASSIFY_TABLE_IP6: + case FLOW_CLASSIFY_API_TABLE_IP6: s = format (s, "type ip6 "); break; default: @@ -3506,20 +3377,35 @@ static void *vl_api_feature_enable_disable_t_print s = format (0, "SCRIPT: feature_enable_disable "); s = format (s, "arc_name %s ", mp->arc_name); s = format (s, "feature_name %s ", mp->feature_name); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (!mp->enable) s = format (s, "disable"); 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) { u8 *s; s = format (0, "SCRIPT: sw_interface_tag_add_del "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); if (mp->is_add) s = format (s, "tag %s ", mp->tag); else @@ -3534,8 +3420,8 @@ static void *vl_api_hw_interface_set_mtu_t_print u8 *s; s = format (0, "SCRIPT: sw_interface_set_mtu "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); - s = format (s, "tag %d ", ntohs (mp->mtu)); + s = format (s, "sw_if_index %d ", (mp->sw_if_index)); + s = format (s, "tag %d ", (mp->mtu)); FINISH; } @@ -3546,7 +3432,7 @@ static void *vl_api_p2p_ethernet_add_t_print u8 *s; s = format (0, "SCRIPT: p2p_ethernet_add "); - s = format (s, "sw_if_index %d ", ntohl (mp->parent_if_index)); + s = format (s, "sw_if_index %d ", (mp->parent_if_index)); s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac); FINISH; @@ -3558,7 +3444,7 @@ static void *vl_api_p2p_ethernet_del_t_print u8 *s; s = format (0, "SCRIPT: p2p_ethernet_del "); - s = format (s, "sw_if_index %d ", ntohl (mp->parent_if_index)); + s = format (s, "sw_if_index %d ", (mp->parent_if_index)); s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac); FINISH; @@ -3570,17 +3456,12 @@ static void *vl_api_tcp_configure_src_addresses_t_print u8 *s; s = format (0, "SCRIPT: tcp_configure_src_addresses "); - if (mp->is_ipv6) - s = format (s, "%U - %U ", - format_ip6_address, (ip6_address_t *) mp->first_address, - format_ip6_address, (ip6_address_t *) mp->last_address); - else - s = format (s, "%U - %U ", - format_ip4_address, (ip4_address_t *) mp->first_address, - format_ip4_address, (ip4_address_t *) mp->last_address); + s = format (s, "%U - %U ", + format_vl_api_address, &mp->first_address, + format_vl_api_address, &mp->last_address); if (mp->vrf_id) - s = format (s, "vrf %d ", ntohl (mp->vrf_id)); + s = format (s, "vrf %d ", (mp->vrf_id)); FINISH; } @@ -3589,38 +3470,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, - clib_net_to_host_u32 (mp->sw_if_index), - clib_net_to_host_u32 (mp->ip4_fib_id), - clib_net_to_host_u32 (mp->ip6_fib_id)); - FINISH; -} - -static void *vl_api_lldp_config_t_print - (vl_api_lldp_config_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: lldp_config "); - s = format (s, "system_name %s ", mp->system_name); - s = format (s, "tx_hold %d ", ntohl (mp->tx_hold)); - s = format (s, "tx_interval %d ", ntohl (mp->tx_interval)); - FINISH; -} - -static void *vl_api_dns_enable_disable_t_print - (vl_api_dns_enable_disable_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: dns_enable_disable "); - s = format (s, "%s ", mp->enable ? "enable" : "disable"); - + "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; } @@ -3633,9 +3489,9 @@ static void *vl_api_sw_interface_set_lldp_t_print clib_memset (null_data, 0, sizeof (null_data)); s = format (0, "SCRIPT: sw_interface_set_lldp "); - s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + 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))) @@ -3653,45 +3509,15 @@ static void *vl_api_sw_interface_set_lldp_t_print FINISH; } -static void *vl_api_dns_name_server_add_del_t_print - (vl_api_dns_name_server_add_del_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: dns_name_server_add_del "); - if (mp->is_ip6) - s = format (s, "%U ", format_ip6_address, - (ip6_address_t *) mp->server_address); - else - s = format (s, "%U ", format_ip4_address, - (ip4_address_t *) mp->server_address); - - if (mp->is_add == 0) - s = format (s, "del "); - - FINISH; -} - -static void *vl_api_dns_resolve_name_t_print - (vl_api_dns_resolve_name_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: dns_resolve_name "); - s = format (s, "%s ", mp->name); - FINISH; -} - -static void *vl_api_dns_resolve_ip_t_print - (vl_api_dns_resolve_ip_t * mp, void *handle) +static void *vl_api_lldp_config_t_print + (vl_api_lldp_config_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); + s = format (0, "SCRIPT: lldp_config "); + s = format (s, "system_name %s ", mp->system_name); + s = format (s, "tx_hold %d ", (mp->tx_hold)); + s = format (s, "tx_interval %d ", (mp->tx_interval)); FINISH; } @@ -3699,21 +3525,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; } @@ -3735,9 +3565,9 @@ static void *vl_api_qos_record_enable_disable_t_print 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, "sw_if_index %d ", (mp->record.sw_if_index)); s = format (s, "input_source %U ", format_qos_source, - ntohl (mp->input_source)); + mp->record.input_source); if (!mp->enable) s = format (s, "disable "); @@ -3745,6 +3575,18 @@ static void *vl_api_qos_record_enable_disable_t_print FINISH; } +#define foreach_no_print_function \ +_(memclnt_keepalive_reply) + +#define _(f) \ +static void * vl_api_ ## f ## _t_print \ + (vl_api_ ## f ## _t * mp, void * handle) \ +{ \ + return handle; \ +} +foreach_no_print_function; +#undef _ + #define foreach_custom_print_no_arg_function \ _(lisp_eid_table_vni_dump) \ _(lisp_map_resolver_dump) \ @@ -3761,7 +3603,7 @@ static void * vl_api_ ## f ## _t_print \ s = format (0, "SCRIPT: " #f ); \ FINISH; \ } -foreach_custom_print_no_arg_function +foreach_custom_print_no_arg_function; #undef _ #define foreach_custom_print_function \ _(CREATE_LOOPBACK, create_loopback) \ @@ -3775,32 +3617,31 @@ _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \ _(SW_INTERFACE_SET_VXLAN_BYPASS, sw_interface_set_vxlan_bypass) \ _(SW_INTERFACE_SET_GENEVE_BYPASS, sw_interface_set_geneve_bypass) \ _(BOND_CREATE, bond_create) \ +_(BOND_CREATE2, bond_create2) \ _(BOND_DELETE, bond_delete) \ -_(BOND_ENSLAVE, bond_enslave) \ -_(BOND_DETACH_SLAVE, bond_detach_slave) \ +_(BOND_ADD_MEMBER, bond_add_member) \ +_(BOND_DETACH_MEMBER, bond_detach_member) \ +_(SW_INTERFACE_SET_BOND_WEIGHT, sw_interface_set_bond_weight) \ +_(SW_MEMBER_INTERFACE_DUMP, sw_member_interface_dump) \ +_(SW_BOND_INTERFACE_DUMP, sw_bond_interface_dump) \ +_(SW_INTERFACE_RX_PLACEMENT_DUMP, sw_interface_rx_placement_dump) \ _(TAP_CREATE_V2, tap_create_v2) \ _(TAP_DELETE_V2, tap_delete_v2) \ _(SW_INTERFACE_TAP_V2_DUMP, sw_interface_tap_v2_dump) \ -_(IP_ADD_DEL_ROUTE, ip_add_del_route) \ _(IP_TABLE_ADD_DEL, ip_table_add_del) \ _(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \ _(MPLS_TABLE_ADD_DEL, mpls_table_add_del) \ -_(PROXY_ARP_ADD_DEL, proxy_arp_add_del) \ -_(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable) \ +_(IP_ROUTE_ADD_DEL, ip_route_add_del) \ _(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \ _(SR_MPLS_POLICY_ADD, sr_mpls_policy_add) \ _(SR_MPLS_POLICY_DEL, sr_mpls_policy_del) \ _(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered) \ -_(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) \ +_(IP_TABLE_REPLACE_BEGIN, ip_table_replace_begin) \ +_(IP_TABLE_FLUSH, ip_table_flush) \ +_(IP_TABLE_REPLACE_END, ip_table_replace_end) \ _(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) \ -_(SET_ARP_NEIGHBOR_LIMIT, set_arp_neighbor_limit) \ _(L2_PATCH_ADD_DEL, l2_patch_add_del) \ _(SR_LOCALSID_ADD_DEL, sr_localsid_add_del) \ _(SR_STEERING_ADD_DEL, sr_steering_add_del) \ @@ -3823,7 +3664,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) \ @@ -3858,10 +3698,6 @@ _(VXLAN_GBP_TUNNEL_ADD_DEL, vxlan_gbp_tunnel_add_del) \ _(VXLAN_GBP_TUNNEL_DUMP, vxlan_gbp_tunnel_dump) \ _(SW_INTERFACE_SET_VXLAN_GBP_BYPASS, sw_interface_set_vxlan_gbp_bypass) \ _(INTERFACE_NAME_RENUMBER, interface_name_renumber) \ -_(IP_PROBE_NEIGHBOR, ip_probe_neighbor) \ -_(IP_SCAN_NEIGHBOR_ENABLE_DISABLE, ip_scan_neighbor_enable_disable) \ -_(WANT_IP4_ARP_EVENTS, want_ip4_arp_events) \ -_(WANT_IP6_ND_EVENTS, want_ip6_nd_events) \ _(WANT_L2_MACS_EVENTS, want_l2_macs_events) \ _(INPUT_ACL_SET_INTERFACE, input_acl_set_interface) \ _(IP_ADDRESS_DUMP, ip_address_dump) \ @@ -3875,7 +3711,8 @@ _(AF_PACKET_CREATE, af_packet_create) \ _(AF_PACKET_DELETE, af_packet_delete) \ _(AF_PACKET_DUMP, af_packet_dump) \ _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats) \ -_(MPLS_FIB_DUMP, mpls_fib_dump) \ +_(MPLS_TABLE_DUMP, mpls_table_dump) \ +_(MPLS_ROUTE_DUMP, mpls_route_dump) \ _(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \ _(CLASSIFY_TABLE_IDS,classify_table_ids) \ _(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface) \ @@ -3893,6 +3730,7 @@ _(GET_NEXT_INDEX, get_next_index) \ _(PG_CREATE_INTERFACE,pg_create_interface) \ _(PG_CAPTURE, pg_capture) \ _(PG_ENABLE_DISABLE, pg_enable_disable) \ +_(PG_INTERFACE_ENABLE_DISABLE_COALESCE, pg_interface_enable_disable_coalesce) \ _(POLICER_ADD_DEL, policer_add_del) \ _(POLICER_DUMP, policer_dump) \ _(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface) \ @@ -3929,9 +3767,11 @@ _(SHOW_LISP_RLOC_PROBE_STATE, show_lisp_rloc_probe_state) \ _(SHOW_LISP_MAP_REGISTER_STATE, show_lisp_map_register_state) \ _(LISP_RLOC_PROBE_ENABLE_DISABLE, lisp_rloc_probe_enable_disable) \ _(LISP_MAP_REGISTER_ENABLE_DISABLE, lisp_map_register_enable_disable) \ +_(IPSEC_INTERFACE_ADD_DEL_SPD, ipsec_interface_add_del_spd) \ +_(IPSEC_SAD_ENTRY_ADD_DEL, ipsec_sad_entry_add_del) \ +_(IPSEC_SPD_ADD_DEL, ipsec_spd_add_del) \ +_(IPSEC_SPD_ENTRY_ADD_DEL, ipsec_spd_entry_add_del) \ _(IPSEC_TUNNEL_IF_ADD_DEL, ipsec_tunnel_if_add_del) \ -_(IPSEC_GRE_TUNNEL_ADD_DEL, ipsec_gre_tunnel_add_del) \ -_(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump) \ _(DELETE_SUBIF, delete_subif) \ _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite) \ _(SET_PUNT, set_punt) \ @@ -3940,9 +3780,10 @@ _(FLOW_CLASSIFY_DUMP, flow_classify_dump) \ _(GET_FIRST_MSG_ID, get_first_msg_id) \ _(IOAM_ENABLE, ioam_enable) \ _(IOAM_DISABLE, ioam_disable) \ -_(IP_FIB_DUMP, ip_fib_dump) \ -_(IP6_FIB_DUMP, ip6_fib_dump) \ +_(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) \ @@ -3951,14 +3792,12 @@ _(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses) \ _(APP_NAMESPACE_ADD_DEL, app_namespace_add_del) \ _(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_IP, dns_resolve_ip) \ _(SESSION_RULE_ADD_DEL, session_rule_add_del) \ _(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface) \ -_(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) - void +_(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) \ +_(MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply) + +void vl_msg_api_custom_dump_configure (api_main_t * am) { #define _(n,f) am->msg_print_handlers[VL_API_##n] \ @@ -3970,5 +3809,7 @@ vl_msg_api_custom_dump_configure (api_main_t * am) /* * fd.io coding-style-patch-verification: ON * - * Local Variables: eval: (c-set-style "gnu") End: + * Local Variables: + * eval: (c-set-style "gnu") + * End: */