s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+ if (mp->admin_up_down)
+ s = format (s, "admin-up ");
+ else
+ s = format (s, "admin-down ");
+
+ FINISH;
+}
+
+static void *vl_api_sw_interface_event_t_print
+ (vl_api_sw_interface_event_t * mp, void *handle)
+{
+ u8 *s;
+ s = format (0, "SCRIPT: sw_interface_event ");
+
+ s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+
if (mp->admin_up_down)
s = format (s, "admin-up ");
else
else
s = format (s, "link-down");
+ if (mp->deleted)
+ s = format (s, " deleted");
+
FINISH;
}
if (mp->is_add)
{
+ if (mp->bd_tag[0])
+ s = format (s, "bd_tag %s ", mp->bd_tag);
s = format (s, "flood %d uu-flood %d ", mp->flood, mp->uu_flood);
s = format (s, "forward %d learn %d ", mp->forward, mp->learn);
s = format (s, "arp-term %d mac-age %d", mp->arp_term, mp->mac_age);
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
-#define _(a,b) \
- if (flags & L2INPUT_FEAT_ ## a) s = format (s, #a " ");
- foreach_l2input_feat;
-#undef _
+ if (flags & L2_LEARN)
+ s = format (s, "learn ");
+ if (flags & L2_FWD)
+ s = format (s, "forward ");
+ if (flags & L2_FLOOD)
+ s = format (s, "flood ");
+ if (flags & L2_UU_FLOOD)
+ s = format (s, "uu-flood ");
+ if (flags & L2_ARP_TERM)
+ s = format (s, "arp-term ");
+
+ if (mp->is_set == 0)
+ s = format (s, "clear ");
FINISH;
}
if (mp->table_id != 0)
s = format (s, "vrf %d ", ntohl (mp->table_id));
- if (mp->create_vrf_if_needed)
- s = format (s, "create-vrf ");
-
if (mp->next_hop_weight != 1)
s = format (s, "weight %d ", mp->next_hop_weight);
(vl_api_sr_policy_mod_t * mp, void *handle)
{
u8 *s;
- u32 weight;
ip6_address_t *segments = 0, *seg;
ip6_address_t *this_address = (ip6_address_t *) mp->segments;
u8 *s;
s = format (0, "SCRIPT: sr_policy_del ");
- u8 bsid_addr[16];
- u32 sr_policy_index;
s = format (s, "To be delivered. Good luck.");
FINISH;
}
s = format (0, "SCRIPT: vxlan_gpe_add_del_tunnel ");
- s = format (s, "local %U ", format_ip46_address, &mp->local, mp->is_ipv6);
+ ip46_address_t local = to_ip46 (mp->is_ipv6, mp->local);
+ ip46_address_t remote = to_ip46 (mp->is_ipv6, mp->remote);
+
+ u8 is_grp = ip46_address_is_multicast (&remote);
+ char *remote_name = is_grp ? "group" : "remote";
- s = format (s, "remote %U ", format_ip46_address, &mp->remote, mp->is_ipv6);
+ s = format (s, "local %U ", format_ip46_address, &local, IP46_TYPE_ANY);
+ s = format (s, "%s %U ", remote_name, format_ip46_address,
+ &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, "vni %d ", ntohl (mp->vni));
FINISH;
}
+static void *vl_api_want_l2_macs_events_t_print
+ (vl_api_want_l2_macs_events_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: want_l2_macs_events ");
+ s = format (s, "learn-limit %d ", ntohl (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)
+ s = format (s, "disable");
+
+ FINISH;
+}
+
static void *vl_api_input_acl_set_interface_t_print
(vl_api_input_acl_set_interface_t * mp, void *handle)
{
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));
+ if (mp->is_l2)
+ s = format (s, "l2 ");
+
switch (mp->state)
{
case 0:
s = format (0, "SCRIPT: sw_interface_span_dump ");
+ if (mp->is_l2)
+ s = format (s, "l2 ");
+
FINISH;
}
(vl_api_lisp_add_del_remote_mapping_t * mp, void *handle)
{
u8 *s;
- u32 i, rloc_num = 0;
+ u32 rloc_num = 0;
s = format (0, "SCRIPT: lisp_add_del_remote_mapping ");
(vl_api_lisp_add_del_locator_set_t * mp, void *handle)
{
u8 *s;
- u32 loc_num = 0, i;
s = format (0, "SCRIPT: lisp_add_del_locator_set ");
s = format (s, "locator-set %s ", mp->locator_set_name);
- loc_num = clib_net_to_host_u32 (mp->locator_num);
-
FINISH;
}
FINISH;
}
+static void *vl_api_p2p_ethernet_add_t_print
+ (vl_api_p2p_ethernet_add_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: p2p_ethernet_add ");
+ s = format (s, "sw_if_index %d ", ntohl (mp->parent_if_index));
+ s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac);
+
+ FINISH;
+}
+
+static void *vl_api_p2p_ethernet_del_t_print
+ (vl_api_p2p_ethernet_del_t * mp, void *handle)
+{
+ u8 *s;
+
+ s = format (0, "SCRIPT: p2p_ethernet_del ");
+ s = format (s, "sw_if_index %d ", ntohl (mp->parent_if_index));
+ s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac);
+
+ FINISH;
+}
+
+static void *vl_api_tcp_configure_src_addresses_t_print
+ (vl_api_tcp_configure_src_addresses_t * mp, void *handle)
+{
+ 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);
+
+ if (mp->vrf_id)
+ s = format (s, "vrf %d ", ntohl (mp->vrf_id));
+
+ FINISH;
+}
+
#define foreach_custom_print_no_arg_function \
_(lisp_eid_table_vni_dump) \
_(lisp_map_resolver_dump) \
_(CREATE_LOOPBACK, create_loopback) \
_(CREATE_LOOPBACK_INSTANCE, create_loopback_instance) \
_(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \
+_(SW_INTERFACE_EVENT, sw_interface_event) \
_(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address) \
_(SW_INTERFACE_SET_TABLE, sw_interface_set_table) \
_(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable) \
_(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
_(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) \
_(IP_DUMP, ip_dump) \
_(IP6_FIB_DUMP, ip6_fib_dump) \
_(FEATURE_ENABLE_DISABLE, feature_enable_disable) \
_(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del) \
-_(SW_INTERFACE_SET_MTU, sw_interface_set_mtu)
+_(SW_INTERFACE_SET_MTU, sw_interface_set_mtu) \
+_(P2P_ETHERNET_ADD, p2p_ethernet_add) \
+_(P2P_ETHERNET_DEL, p2p_ethernet_del) \
+_(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses)
void
vl_msg_api_custom_dump_configure (api_main_t * am)
{