LISP: add API handlers for set/get transport protocol
Change-Id: Ib675164c475edcdbe3013df7b847adf5e050c53f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
diff --git a/src/vnet/lisp-cp/one_api.c b/src/vnet/lisp-cp/one_api.c
index ae52381..e3a2afe 100644
--- a/src/vnet/lisp-cp/one_api.c
+++ b/src/vnet/lisp-cp/one_api.c
@@ -133,6 +133,8 @@
_(ONE_ADD_DEL_NDP_ENTRY, one_add_del_ndp_entry) \
_(ONE_NDP_BD_GET, one_ndp_bd_get) \
_(ONE_NDP_ENTRIES_GET, one_ndp_entries_get) \
+_(ONE_SET_TRANSPORT_PROTOCOL, one_set_transport_protocol) \
+_(ONE_GET_TRANSPORT_PROTOCOL, one_get_transport_protocol)
static locator_t *
unformat_one_locs (vl_api_one_remote_locator_t * rmt_locs, u32 rloc_num)
@@ -1698,6 +1700,34 @@
}
static void
+ vl_api_one_set_transport_protocol_t_handler
+ (vl_api_one_set_transport_protocol_t * mp)
+{
+ vl_api_one_set_transport_protocol_reply_t *rmp;
+ int rv = 0;
+
+ rv = vnet_lisp_set_transport_protocol (mp->protocol);
+
+ REPLY_MACRO (VL_API_ONE_SET_TRANSPORT_PROTOCOL_REPLY);
+}
+
+static void
+ vl_api_one_get_transport_protocol_t_handler
+ (vl_api_one_get_transport_protocol_t * mp)
+{
+ vl_api_one_get_transport_protocol_reply_t *rmp;
+ int rv = 0;
+ u8 proto = (u8) vnet_lisp_get_transport_protocol ();
+
+ /* *INDENT-OFF* */
+ REPLY_MACRO2 (VL_API_ONE_GET_TRANSPORT_PROTOCOL_REPLY,
+ ({
+ rmp->protocol = proto;
+ }));
+ /* *INDENT-ON* */
+}
+
+static void
vl_api_one_ndp_entries_get_t_handler (vl_api_one_ndp_entries_get_t * mp)
{
vl_api_one_ndp_entries_get_reply_t *rmp = 0;