}
}
+#if VPP_API_TEST_BUILTIN == 0
static void vl_api_sw_interface_set_flags_t_handler
(vl_api_sw_interface_set_flags_t * mp)
{
mp->admin_up_down ? "admin-up" : "admin-down",
mp->link_up_down ? "link-up" : "link-down");
}
+#endif
static void vl_api_sw_interface_set_flags_t_handler_json
(vl_api_sw_interface_set_flags_t * mp)
#define foreach_vpe_api_reply_msg \
_(CREATE_LOOPBACK_REPLY, create_loopback_reply) \
_(SW_INTERFACE_DETAILS, sw_interface_details) \
-_(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \
_(SW_INTERFACE_SET_FLAGS_REPLY, sw_interface_set_flags_reply) \
_(CONTROL_PING_REPLY, control_ping_reply) \
_(CLI_REPLY, cli_reply) \
_(DELETE_LOOPBACK_REPLY, delete_loopback_reply) \
_(BD_IP_MAC_ADD_DEL_REPLY, bd_ip_mac_add_del_reply) \
_(DHCP_COMPL_EVENT, dhcp_compl_event) \
-_(VNET_INTERFACE_COUNTERS, vnet_interface_counters) \
-_(VNET_IP4_FIB_COUNTERS, vnet_ip4_fib_counters) \
-_(VNET_IP6_FIB_COUNTERS, vnet_ip6_fib_counters) \
-_(VNET_IP4_NBR_COUNTERS, vnet_ip4_nbr_counters) \
-_(VNET_IP6_NBR_COUNTERS, vnet_ip6_nbr_counters) \
_(MAP_ADD_DOMAIN_REPLY, map_add_domain_reply) \
_(MAP_DEL_DOMAIN_REPLY, map_del_domain_reply) \
_(MAP_ADD_DEL_RULE_REPLY, map_add_del_rule_reply) \
_(IP_NEIGHBOR_DETAILS, ip_neighbor_details) \
_(SW_INTERFACE_GET_TABLE_REPLY, sw_interface_get_table_reply)
+#define foreach_standalone_reply_msg \
+_(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \
+_(VNET_INTERFACE_COUNTERS, vnet_interface_counters) \
+_(VNET_IP4_FIB_COUNTERS, vnet_ip4_fib_counters) \
+_(VNET_IP6_FIB_COUNTERS, vnet_ip6_fib_counters) \
+_(VNET_IP4_NBR_COUNTERS, vnet_ip4_nbr_counters) \
+_(VNET_IP6_NBR_COUNTERS, vnet_ip6_nbr_counters)
+
typedef struct
{
u8 *name;
vec_free (host_if_name);
S (mp);
- W2 (ret, fprintf (vam->ofp, " new sw_if_index = %d ", vam->sw_if_index));
+
+ /* *INDENT-OFF* */
+ W2 (ret,
+ ({
+ if (ret == 0)
+ fprintf (vam->ofp ? vam->ofp : stderr,
+ " new sw_if_index = %d\n", vam->sw_if_index);
+ }));
+ /* *INDENT-ON* */
return ret;
}
} \
}
foreach_vpe_api_reply_msg;
+#if VPP_API_TEST_BUILTIN == 0
+foreach_standalone_reply_msg;
+#endif
#undef _
void
vl_api_##n##_t_print, \
sizeof(vl_api_##n##_t), 1);
foreach_vpe_api_reply_msg;
+#if VPP_API_TEST_BUILTIN == 0
+ foreach_standalone_reply_msg;
+#endif
#undef _
#if (VPP_API_TEST_BUILTIN==0)
#undef _
}
+#if VPP_API_TEST_BUILTIN
+static clib_error_t *
+vat_api_hookup_shim (vlib_main_t * vm)
+{
+ vat_api_hookup (&vat_main);
+ return 0;
+}
+
+VLIB_API_INIT_FUNCTION (vat_api_hookup_shim);
+#endif
+
/*
* fd.io coding-style-patch-verification: ON
*
unix_main_t *um = &unix_main;
linux_epoll_main_t *em = &linux_epoll_main;
struct epoll_event e;
+ int op;
memset (&e, 0, sizeof (e));
e.events |= EPOLLET;
e.data.u32 = f - um->file_pool;
- if (epoll_ctl (em->epoll_fd,
- (update_type == UNIX_FILE_UPDATE_ADD
- ? EPOLL_CTL_ADD
- : (update_type == UNIX_FILE_UPDATE_MODIFY
- ? EPOLL_CTL_MOD
- : EPOLL_CTL_DEL)), f->file_descriptor, &e) < 0)
- clib_warning ("epoll_ctl");
+ op = -1;
+
+ switch (update_type)
+ {
+ case UNIX_FILE_UPDATE_ADD:
+ op = EPOLL_CTL_ADD;
+ break;
+
+ case UNIX_FILE_UPDATE_MODIFY:
+ op = EPOLL_CTL_MOD;
+ break;
+
+ case UNIX_FILE_UPDATE_DELETE:
+ op = EPOLL_CTL_DEL;
+ break;
+
+ default:
+ clib_warning ("unknown update_type %d", update_type);
+ return;
+ }
+
+ if (epoll_ctl (em->epoll_fd, op, f->file_descriptor, &e) < 0)
+ clib_unix_warning ("epoll_ctl");
}
static uword
#define VLIB_API_INIT_FUNCTION(x) VLIB_DECLARE_INIT_FUNCTION(x,api_init)
+/* Call given init function: used for init function dependencies. */
+#define vlib_call_api_init_function(vm, x) \
+ ({ \
+ extern vlib_init_function_t * _VLIB_INIT_FUNCTION_SYMBOL (x,api_init); \
+ vlib_init_function_t * _f = _VLIB_INIT_FUNCTION_SYMBOL (x,api_init); \
+ clib_error_t * _error = 0; \
+ if (! hash_get (vm->init_functions_called, _f)) \
+ { \
+ hash_set1 (vm->init_functions_called, _f); \
+ _error = _f (vm); \
+ } \
+ _error; \
+ })
+
+
#endif /* included_api_h */
/*
foreach_msg_api_vector;
#undef _
+ if (am->msg_names[c->id])
+ clib_warning ("BUG: multiple registrations of 'vl_api_%s_t_handler'",
+ c->name);
+
am->msg_names[c->id] = c->name;
am->msg_handlers[c->id] = c->handler;
am->msg_cleanup_handlers[c->id] = c->cleanup;
_(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface) \
_(CLASSIFY_TABLE_INFO,classify_table_info) \
_(CLASSIFY_SESSION_DUMP,classify_session_dump) \
-_(CLASSIFY_SESSION_DETAILS,classify_session_details) \
_(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface) \
_(POLICER_CLASSIFY_DUMP, policer_classify_dump) \
_(FLOW_CLASSIFY_SET_INTERFACE, flow_classify_set_interface) \
vl_msg_api_send_shmem (q, (u8 *) & rmp);
}
-static void
-vl_api_classify_session_details_t_handler (vl_api_classify_session_details_t *
- mp)
-{
- clib_warning ("BUG");
-}
-
static void
send_classify_session_details (unix_shared_memory_queue_t * q,
u32 table_id,
_(CREATE_VHOST_USER_IF, create_vhost_user_if) \
_(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \
_(DELETE_VHOST_USER_IF, delete_vhost_user_if) \
-_(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump) \
-_(SW_INTERFACE_VHOST_USER_DETAILS, sw_interface_vhost_user_details)
+_(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump)
/*
* WARNING: replicated pending api refactor completion
}
}
-static void
- vl_api_sw_interface_vhost_user_details_t_handler
- (vl_api_sw_interface_vhost_user_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
send_sw_interface_vhost_user_details (vpe_api_main_t * am,
unix_shared_memory_queue_t * q,
#define foreach_vpe_api_msg \
_(DHCP_PROXY_CONFIG,dhcp_proxy_config) \
_(DHCP_PROXY_DUMP,dhcp_proxy_dump) \
-_(DHCP_PROXY_DETAILS,dhcp_proxy_details) \
_(DHCP_PROXY_SET_VSS,dhcp_proxy_set_vss) \
_(DHCP_CLIENT_CONFIG, dhcp_client_config)
vl_msg_api_send_shmem (q, (u8 *) & mp);
}
-
-static void
-vl_api_dhcp_proxy_details_t_handler (vl_api_dhcp_proxy_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
void
dhcp_compl_event_callback (u32 client_index, u32 pid, u8 * hostname,
u8 is_ipv6, u8 * host_address, u8 * router_address,
_(SW_INTERFACE_SET_MTU, sw_interface_set_mtu) \
_(WANT_INTERFACE_EVENTS, want_interface_events) \
_(SW_INTERFACE_DUMP, sw_interface_dump) \
-_(SW_INTERFACE_DETAILS, sw_interface_details) \
_(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address) \
_(SW_INTERFACE_SET_TABLE, sw_interface_set_table) \
_(SW_INTERFACE_GET_TABLE, sw_interface_get_table) \
REPLY_MACRO (VL_API_SW_INTERFACE_TAG_ADD_DEL_REPLY);
}
-static void
-vl_api_sw_interface_details_t_handler (vl_api_sw_interface_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
/*
* vpe_api_hookup
* Add vpe's API message handlers to the table.
#define foreach_ip_api_msg \
_(IP_FIB_DUMP, ip_fib_dump) \
-_(IP_FIB_DETAILS, ip_fib_details) \
_(IP6_FIB_DUMP, ip6_fib_dump) \
-_(IP6_FIB_DETAILS, ip6_fib_details) \
_(IP_MFIB_DUMP, ip_mfib_dump) \
-_(IP_MFIB_DETAILS, ip_mfib_details) \
_(IP6_MFIB_DUMP, ip6_mfib_dump) \
-_(IP6_MFIB_DETAILS, ip6_mfib_details) \
_(IP_NEIGHBOR_DUMP, ip_neighbor_dump) \
_(IP_MROUTE_ADD_DEL, ip_mroute_add_del) \
_(MFIB_SIGNAL_DUMP, mfib_signal_dump) \
-_(IP_NEIGHBOR_DETAILS, ip_neighbor_details) \
_(IP_ADDRESS_DUMP, ip_address_dump) \
_(IP_DUMP, ip_dump) \
_(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \
vl_msg_api_send_shmem (q, (u8 *) & mp);
}
-static void
-vl_api_ip_neighbor_details_t_handler (vl_api_ip_neighbor_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
vl_api_ip_neighbor_dump_t_handler (vl_api_ip_neighbor_dump_t * mp)
{
sizeof (api_rpath->rpath.frp_addr.ip6));
}
-static void
-vl_api_ip_fib_details_t_handler (vl_api_ip_fib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_ip_fib_details_t_endian (vl_api_ip_fib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_ip_fib_details_t_print (vl_api_ip_fib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
send_ip_fib_details (vpe_api_main_t * am,
unix_shared_memory_queue_t * q,
vec_free (lfeis);
}
-static void
-vl_api_ip6_fib_details_t_handler (vl_api_ip6_fib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_ip6_fib_details_t_endian (vl_api_ip6_fib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_ip6_fib_details_t_print (vl_api_ip6_fib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
send_ip6_fib_details (vpe_api_main_t * am,
unix_shared_memory_queue_t * q,
/* *INDENT-ON* */
}
-static void
-vl_api_ip_mfib_details_t_handler (vl_api_ip_mfib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_ip_mfib_details_t_endian (vl_api_ip_mfib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_ip_mfib_details_t_print (vl_api_ip_mfib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
send_ip_mfib_details (vpe_api_main_t * am,
unix_shared_memory_queue_t * q,
vec_free (api_rpaths);
}
-static void
-vl_api_ip6_mfib_details_t_handler (vl_api_ip6_mfib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_ip6_mfib_details_t_endian (vl_api_ip6_mfib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_ip6_mfib_details_t_print (vl_api_ip6_mfib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
send_ip6_mfib_details (vpe_api_main_t * am,
unix_shared_memory_queue_t * q,
_(L2_XCONNECT_DUMP, l2_xconnect_dump) \
_(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \
_(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \
-_(L2_FIB_TABLE_ENTRY, l2_fib_table_entry) \
_(L2FIB_ADD_DEL, l2fib_add_del) \
_(L2_FLAGS, l2_flags) \
_(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del) \
_(BRIDGE_DOMAIN_DUMP, bridge_domain_dump) \
-_(BRIDGE_DOMAIN_DETAILS, bridge_domain_details) \
-_(BRIDGE_DOMAIN_SW_IF_DETAILS, bridge_domain_sw_if_details) \
_(BRIDGE_FLAGS, bridge_flags) \
_(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \
_(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite)
vl_msg_api_send_shmem (q, (u8 *) & mp);
}
-static void
-vl_api_l2_fib_table_entry_t_handler (vl_api_l2_fib_table_entry_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
vl_api_l2_fib_table_dump_t_handler (vl_api_l2_fib_table_dump_t * mp)
{
REPLY_MACRO (VL_API_BRIDGE_DOMAIN_ADD_DEL_REPLY);
}
-static void
-vl_api_bridge_domain_details_t_handler (vl_api_bridge_domain_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
- vl_api_bridge_domain_sw_if_details_t_handler
- (vl_api_bridge_domain_sw_if_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
send_bridge_domain_details (unix_shared_memory_queue_t * q,
l2_bridge_domain_t * bd_config,
_(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \
_(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \
_(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \
-_(MPLS_TUNNEL_DETAILS, mpls_tunnel_details) \
-_(MPLS_FIB_DUMP, mpls_fib_dump) \
-_(MPLS_FIB_DETAILS, mpls_fib_details)
+_(MPLS_FIB_DUMP, mpls_fib_dump)
extern void stats_dslock_with_hint (int hint, int tag);
extern void stats_dsunlock (void);
/* *INDENT-ON* */
}
-static void
-vl_api_mpls_tunnel_details_t_handler (vl_api_mpls_tunnel_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
typedef struct mpls_tunnel_send_walk_ctx_t_
{
unix_shared_memory_queue_t *q;
mpls_tunnel_walk (send_mpls_tunnel_entry, &ctx);
}
-static void
-vl_api_mpls_fib_details_t_handler (vl_api_mpls_fib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_mpls_fib_details_t_endian (vl_api_mpls_fib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
-static void
-vl_api_mpls_fib_details_t_print (vl_api_mpls_fib_details_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
send_mpls_fib_details (vpe_api_main_t * am,
unix_shared_memory_queue_t * q,
_(CLASSIFY_SET_INTERFACE_L2_TABLES, classify_set_interface_l2_tables) \
_(GET_NODE_INDEX, get_node_index) \
_(ADD_NODE_NEXT, add_node_next) \
-_(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \
-_(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \
_(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \
_(SHOW_VERSION, show_version) \
-_(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \
-_(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \
_(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
_(WANT_IP4_ARP_EVENTS, want_ip4_arp_events) \
_(WANT_IP6_ND_EVENTS, want_ip6_nd_events) \
/* *INDENT-ON* */
}
-static void vl_api_vxlan_add_del_tunnel_t_handler
- (vl_api_vxlan_add_del_tunnel_t * mp)
-{
- vl_api_vxlan_add_del_tunnel_reply_t *rmp;
- int rv = 0;
- vnet_vxlan_add_del_tunnel_args_t _a, *a = &_a;
- u32 encap_fib_index;
- uword *p;
- ip4_main_t *im = &ip4_main;
- vnet_main_t *vnm = vnet_get_main ();
- u32 sw_if_index = ~0;
-
- p = hash_get (im->fib_index_by_table_id, ntohl (mp->encap_vrf_id));
- if (!p)
- {
- rv = VNET_API_ERROR_NO_SUCH_FIB;
- goto out;
- }
- encap_fib_index = p[0];
- memset (a, 0, sizeof (*a));
-
- a->is_add = mp->is_add;
- a->is_ip6 = mp->is_ipv6;
-
- /* ip addresses sent in network byte order */
- ip46_from_addr_buf (mp->is_ipv6, mp->dst_address, &a->dst);
- ip46_from_addr_buf (mp->is_ipv6, mp->src_address, &a->src);
-
- /* Check src & dst are different */
- if (ip46_address_cmp (&a->dst, &a->src) == 0)
- {
- rv = VNET_API_ERROR_SAME_SRC_DST;
- goto out;
- }
- a->mcast_sw_if_index = ntohl (mp->mcast_sw_if_index);
- if (ip46_address_is_multicast (&a->dst) &&
- pool_is_free_index (vnm->interface_main.sw_interfaces,
- a->mcast_sw_if_index))
- {
- rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
- goto out;
- }
- a->encap_fib_index = encap_fib_index;
- a->decap_next_index = ntohl (mp->decap_next_index);
- a->vni = ntohl (mp->vni);
- rv = vnet_vxlan_add_del_tunnel (a, &sw_if_index);
-
-out:
- /* *INDENT-OFF* */
- REPLY_MACRO2(VL_API_VXLAN_ADD_DEL_TUNNEL_REPLY,
- ({
- rmp->sw_if_index = ntohl (sw_if_index);
- }));
- /* *INDENT-ON* */
-}
-
static void send_vxlan_tunnel_details
(vxlan_tunnel_t * t, unix_shared_memory_queue_t * q, u32 context)
{
vl_msg_api_send_shmem (q, (u8 *) & rmp);
}
-static void vl_api_vxlan_tunnel_dump_t_handler
- (vl_api_vxlan_tunnel_dump_t * mp)
-{
- unix_shared_memory_queue_t *q;
- vxlan_main_t *vxm = &vxlan_main;
- vxlan_tunnel_t *t;
- u32 sw_if_index;
-
- q = vl_api_client_index_to_input_queue (mp->client_index);
- if (q == 0)
- {
- return;
- }
-
- sw_if_index = ntohl (mp->sw_if_index);
-
- if (~0 == sw_if_index)
- {
- /* *INDENT-OFF* */
- pool_foreach (t, vxm->tunnels,
- ({
- send_vxlan_tunnel_details(t, q, mp->context);
- }));
- /* *INDENT-ON* */
- }
- else
- {
- if ((sw_if_index >= vec_len (vxm->tunnel_index_by_sw_if_index)) ||
- (~0 == vxm->tunnel_index_by_sw_if_index[sw_if_index]))
- {
- return;
- }
- t = &vxm->tunnels[vxm->tunnel_index_by_sw_if_index[sw_if_index]];
- send_vxlan_tunnel_details (t, q, mp->context);
- }
-}
-
static void
vl_api_l2_patch_add_del_t_handler (vl_api_l2_patch_add_del_t * mp)
{
REPLY_MACRO (VL_API_L2_PATCH_ADD_DEL_REPLY);
}
-static void
- vl_api_vxlan_gpe_add_del_tunnel_t_handler
- (vl_api_vxlan_gpe_add_del_tunnel_t * mp)
-{
- vl_api_vxlan_gpe_add_del_tunnel_reply_t *rmp;
- int rv = 0;
- vnet_vxlan_gpe_add_del_tunnel_args_t _a, *a = &_a;
- u32 encap_fib_index, decap_fib_index;
- u8 protocol;
- uword *p;
- ip4_main_t *im = &ip4_main;
- u32 sw_if_index = ~0;
-
-
- p = hash_get (im->fib_index_by_table_id, ntohl (mp->encap_vrf_id));
- if (!p)
- {
- rv = VNET_API_ERROR_NO_SUCH_FIB;
- goto out;
- }
- encap_fib_index = p[0];
-
- protocol = mp->protocol;
-
- /* Interpret decap_vrf_id as an opaque if sending to other-than-ip4-input */
- if (protocol == VXLAN_GPE_INPUT_NEXT_IP4_INPUT)
- {
- p = hash_get (im->fib_index_by_table_id, ntohl (mp->decap_vrf_id));
- if (!p)
- {
- rv = VNET_API_ERROR_NO_SUCH_INNER_FIB;
- goto out;
- }
- decap_fib_index = p[0];
- }
- else
- {
- decap_fib_index = ntohl (mp->decap_vrf_id);
- }
-
- /* Check src & dst are different */
- if ((mp->is_ipv6 && memcmp (mp->local, mp->remote, 16) == 0) ||
- (!mp->is_ipv6 && memcmp (mp->local, mp->remote, 4) == 0))
- {
- rv = VNET_API_ERROR_SAME_SRC_DST;
- goto out;
- }
- memset (a, 0, sizeof (*a));
-
- a->is_add = mp->is_add;
- a->is_ip6 = mp->is_ipv6;
- /* ip addresses sent in network byte order */
- if (a->is_ip6)
- {
- clib_memcpy (&(a->local.ip6), mp->local, 16);
- clib_memcpy (&(a->remote.ip6), mp->remote, 16);
- }
- else
- {
- clib_memcpy (&(a->local.ip4), mp->local, 4);
- clib_memcpy (&(a->remote.ip4), mp->remote, 4);
- }
- a->encap_fib_index = encap_fib_index;
- a->decap_fib_index = decap_fib_index;
- a->protocol = protocol;
- a->vni = ntohl (mp->vni);
- rv = vnet_vxlan_gpe_add_del_tunnel (a, &sw_if_index);
-
-out:
- /* *INDENT-OFF* */
- REPLY_MACRO2(VL_API_VXLAN_GPE_ADD_DEL_TUNNEL_REPLY,
- ({
- rmp->sw_if_index = ntohl (sw_if_index);
- }));
- /* *INDENT-ON* */
-}
-
static void send_vxlan_gpe_tunnel_details
(vxlan_gpe_tunnel_t * t, unix_shared_memory_queue_t * q, u32 context)
{
vl_msg_api_send_shmem (q, (u8 *) & rmp);
}
-static void vl_api_vxlan_gpe_tunnel_dump_t_handler
- (vl_api_vxlan_gpe_tunnel_dump_t * mp)
-{
- unix_shared_memory_queue_t *q;
- vxlan_gpe_main_t *vgm = &vxlan_gpe_main;
- vxlan_gpe_tunnel_t *t;
- u32 sw_if_index;
-
- q = vl_api_client_index_to_input_queue (mp->client_index);
- if (q == 0)
- {
- return;
- }
-
- sw_if_index = ntohl (mp->sw_if_index);
-
- if (~0 == sw_if_index)
- {
- /* *INDENT-OFF* */
- pool_foreach (t, vgm->tunnels,
- ({
- send_vxlan_gpe_tunnel_details(t, q, mp->context);
- }));
- /* *INDENT-ON* */
- }
- else
- {
- if ((sw_if_index >= vec_len (vgm->tunnel_index_by_sw_if_index)) ||
- (~0 == vgm->tunnel_index_by_sw_if_index[sw_if_index]))
- {
- return;
- }
- t = &vgm->tunnels[vgm->tunnel_index_by_sw_if_index[sw_if_index]];
- send_vxlan_gpe_tunnel_details (t, q, mp->context);
- }
-}
-
static void
vl_api_interface_name_renumber_t_handler (vl_api_interface_name_renumber_t *
mp)
vam->vlib_main = vm;
vam->my_client_index = (u32) ~ 0;
init_error_string_table (vam);
- vat_api_hookup (vam);
rv = vat_plugin_init (vam);
if (rv)
clib_warning ("vat_plugin_init returned %d", rv);
#define foreach_stats_msg \
_(WANT_STATS, want_stats) \
-_(WANT_STATS_REPLY, want_stats_reply) \
_(VNET_INTERFACE_COUNTERS, vnet_interface_counters) \
_(VNET_IP4_FIB_COUNTERS, vnet_ip4_fib_counters) \
_(VNET_IP6_FIB_COUNTERS, vnet_ip6_fib_counters) \
}
}
-static void
-vl_api_want_stats_reply_t_handler (vl_api_want_stats_reply_t * mp)
-{
- clib_warning ("BUG");
-}
-
static void
vl_api_want_stats_t_handler (vl_api_want_stats_t * mp)
{