summaryrefslogtreecommitdiffstats
path: root/src/vnet/mpls/mpls_api.c
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-11-10 06:53:54 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-10 21:10:46 +0000
commitb8d4481a93f919291d4b682ef0ac8948a9f1be32 (patch)
tree3505693e8a697635773fc54c9c7f1cc2aafaf6a1 /src/vnet/mpls/mpls_api.c
parente178399942c655d0fea162611527ea57192669c0 (diff)
Break up vpe.api
- makes the VAPI generated file more consumable. - VOM build times improve. Change-Id: I838488930bd23a0d3818adfdffdbca3eead382df Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/mpls/mpls_api.c')
-rw-r--r--src/vnet/mpls/mpls_api.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index f345ca6aeea..a772f7869ea 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -53,6 +53,7 @@ _(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \
_(MPLS_TABLE_ADD_DEL, mpls_table_add_del) \
_(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \
_(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \
+_(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable) \
_(MPLS_FIB_DUMP, mpls_fib_dump)
extern void stats_dslock_with_hint (int hint, int tag);
@@ -356,6 +357,23 @@ vl_api_mpls_tunnel_add_del_t_handler (vl_api_mpls_tunnel_add_del_t * mp)
/* *INDENT-ON* */
}
+static void
+ vl_api_sw_interface_set_mpls_enable_t_handler
+ (vl_api_sw_interface_set_mpls_enable_t * mp)
+{
+ vl_api_sw_interface_set_mpls_enable_reply_t *rmp;
+ int rv = 0;
+
+ VALIDATE_SW_IF_INDEX (mp);
+
+ rv = mpls_sw_interface_enable_disable (&mpls_main,
+ ntohl (mp->sw_if_index),
+ mp->enable, 1);
+
+ BAD_SW_IF_INDEX_LABEL;
+ REPLY_MACRO (VL_API_SW_INTERFACE_SET_MPLS_ENABLE_REPLY);
+}
+
typedef struct mpls_tunnel_send_walk_ctx_t_
{
unix_shared_memory_queue_t *q;