diff options
Diffstat (limited to 'src/vnet/lisp-cp/control.c')
-rw-r--r-- | src/vnet/lisp-cp/control.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/vnet/lisp-cp/control.c b/src/vnet/lisp-cp/control.c index 42b5b8b01b4..0d6d453de00 100644 --- a/src/vnet/lisp-cp/control.c +++ b/src/vnet/lisp-cp/control.c @@ -4351,6 +4351,7 @@ lisp_cp_init (vlib_main_t * vm) lcm->map_register_ttl = MAP_REGISTER_DEFAULT_TTL; lcm->max_expired_map_registers = MAX_EXPIRED_MAP_REGISTERS_DEFAULT; lcm->expired_map_registers = 0; + lcm->transport_protocol = LISP_TRANSPORT_PROTOCOL_UDP; return 0; } @@ -4720,6 +4721,26 @@ VLIB_REGISTER_NODE (lisp_retry_service_node,static) = { }; /* *INDENT-ON* */ +u32 +vnet_lisp_set_transport_protocol (u8 protocol) +{ + lisp_cp_main_t *lcm = vnet_lisp_cp_get_main (); + + if (protocol < LISP_TRANSPORT_PROTOCOL_UDP || + protocol > LISP_TRANSPORT_PROTOCOL_API) + return VNET_API_ERROR_INVALID_ARGUMENT; + + lcm->transport_protocol = protocol; + return 0; +} + +lisp_transport_protocol_t +vnet_lisp_get_transport_protocol (void) +{ + lisp_cp_main_t *lcm = vnet_lisp_cp_get_main (); + return lcm->transport_protocol; +} + VLIB_INIT_FUNCTION (lisp_cp_init); /* |