summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/one_api.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-08-02 12:45:07 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-08-02 17:10:14 +0000
commit1e553a00389fb0eb2d54b950a3cfd91dd1a72644 (patch)
tree7203f85d0e4ddda6b0f79f9d40b7bbe810a8239d /src/vnet/lisp-cp/one_api.c
parent5780898e5be8e8c279ac469417688d5b884f0217 (diff)
LISP: make TTL for map register messages configurable
Change-Id: I38e1c6a6b033e12ef3f4345a1deff73fa4adbea0 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/one_api.c')
-rw-r--r--src/vnet/lisp-cp/one_api.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/vnet/lisp-cp/one_api.c b/src/vnet/lisp-cp/one_api.c
index cac3313f7d1..2922993ff30 100644
--- a/src/vnet/lisp-cp/one_api.c
+++ b/src/vnet/lisp-cp/one_api.c
@@ -101,9 +101,11 @@ _(ONE_MAP_SERVER_DUMP, one_map_server_dump) \
_(ONE_EID_TABLE_MAP_DUMP, one_eid_table_map_dump) \
_(ONE_EID_TABLE_VNI_DUMP, one_eid_table_vni_dump) \
_(ONE_ADJACENCIES_GET, one_adjacencies_get) \
+_(ONE_MAP_REGISTER_SET_TTL, one_map_register_set_ttl) \
_(SHOW_ONE_NSH_MAPPING, show_one_nsh_mapping) \
_(SHOW_ONE_RLOC_PROBE_STATE, show_one_rloc_probe_state) \
_(SHOW_ONE_MAP_REGISTER_STATE, show_one_map_register_state) \
+_(SHOW_ONE_MAP_REGISTER_TTL, show_one_map_register_ttl) \
_(SHOW_ONE_STATUS, show_one_status) \
_(ONE_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \
one_add_del_map_request_itr_rlocs) \
@@ -144,6 +146,35 @@ unformat_one_locs (vl_api_one_remote_locator_t * rmt_locs, u32 rloc_num)
}
static void
+vl_api_one_map_register_set_ttl_t_handler (vl_api_one_map_register_set_ttl_t *
+ mp)
+{
+ vl_api_one_map_register_set_ttl_reply_t *rmp;
+ int rv = 0;
+
+ vl_api_one_map_register_set_ttl_t_endian (mp);
+ rv = vnet_lisp_map_register_set_ttl (mp->ttl);
+
+ REPLY_MACRO (VL_API_ONE_MAP_REGISTER_SET_TTL_REPLY);
+}
+
+static void
+ vl_api_show_one_map_register_ttl_t_handler
+ (vl_api_show_one_map_register_ttl_t * mp)
+{
+ vl_api_show_one_map_register_ttl_reply_t *rmp;
+ int rv = 0;
+
+ u32 ttl = vnet_lisp_map_register_get_ttl ();
+ /* *INDENT-OFF* */
+ REPLY_MACRO2 (VL_API_SHOW_ONE_MAP_REGISTER_TTL_REPLY,
+ ({
+ rmp->ttl = clib_host_to_net_u32 (ttl);
+ }));
+ /* *INDENT-ON* */
+}
+
+static void
vl_api_one_add_del_locator_set_t_handler (vl_api_one_add_del_locator_set_t *
mp)
{