diff options
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r-- | src/vat/api_format.c | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 27286686d36..f97cdeef417 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -2931,6 +2931,39 @@ static void } static void + vl_api_show_one_map_register_fallback_threshold_reply_t_handler + (vl_api_show_one_map_register_fallback_threshold_reply_t * mp) +{ + vat_main_t *vam = &vat_main; + int retval = clib_net_to_host_u32 (mp->retval); + + vl_api_show_one_map_register_fallback_threshold_reply_t_endian (mp); + print (vam->ofp, "fallback threshold value: %d", mp->value); + + vam->retval = retval; + vam->result_ready = 1; +} + +static void + vl_api_show_one_map_register_fallback_threshold_reply_t_handler_json + (vl_api_show_one_map_register_fallback_threshold_reply_t * mp) +{ + vat_main_t *vam = &vat_main; + vat_json_node_t _node, *node = &_node; + int retval = clib_net_to_host_u32 (mp->retval); + + vl_api_show_one_map_register_fallback_threshold_reply_t_endian (mp); + vat_json_init_object (node); + vat_json_object_add_uint (node, "value", mp->value); + + vat_json_print (vam->ofp, node); + vat_json_free (node); + + vam->retval = retval; + vam->result_ready = 1; +} + +static void vl_api_show_one_map_register_state_reply_t_handler (vl_api_show_one_map_register_state_reply_t * mp) { @@ -4663,6 +4696,7 @@ _(one_enable_disable_reply) \ _(one_rloc_probe_enable_disable_reply) \ _(one_map_register_enable_disable_reply) \ _(one_map_register_set_ttl_reply) \ +_(one_map_register_fallback_threshold_reply) \ _(one_pitr_set_locator_set_reply) \ _(one_map_request_mode_reply) \ _(one_add_del_map_request_itr_rlocs_reply) \ @@ -4890,6 +4924,8 @@ _(ONE_ENABLE_DISABLE_REPLY, one_enable_disable_reply) \ _(ONE_MAP_REGISTER_ENABLE_DISABLE_REPLY, \ one_map_register_enable_disable_reply) \ _(ONE_MAP_REGISTER_SET_TTL_REPLY, one_map_register_set_ttl_reply) \ +_(ONE_MAP_REGISTER_FALLBACK_THRESHOLD_REPLY, \ + one_map_register_fallback_threshold_reply) \ _(ONE_RLOC_PROBE_ENABLE_DISABLE_REPLY, \ one_rloc_probe_enable_disable_reply) \ _(ONE_PITR_SET_LOCATOR_SET_REPLY, one_pitr_set_locator_set_reply) \ @@ -4937,6 +4973,8 @@ _(SHOW_ONE_RLOC_PROBE_STATE_REPLY, show_one_rloc_probe_state_reply) \ _(SHOW_ONE_MAP_REGISTER_STATE_REPLY, \ show_one_map_register_state_reply) \ _(SHOW_ONE_MAP_REGISTER_TTL_REPLY, show_one_map_register_ttl_reply) \ +_(SHOW_ONE_MAP_REGISTER_FALLBACK_THRESHOLD_REPLY, \ + show_one_map_register_fallback_threshold_reply) \ _(AF_PACKET_CREATE_REPLY, af_packet_create_reply) \ _(AF_PACKET_DELETE_REPLY, af_packet_delete_reply) \ _(POLICER_ADD_DEL_REPLY, policer_add_del_reply) \ @@ -16162,6 +16200,60 @@ api_lisp_gpe_add_del_iface (vat_main_t * vam) } static int +api_one_map_register_fallback_threshold (vat_main_t * vam) +{ + unformat_input_t *input = vam->input; + vl_api_one_map_register_fallback_threshold_t *mp; + u32 value = 0; + u8 is_set = 0; + int ret; + + /* Parse args required to build the message */ + while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) + { + if (unformat (input, "%u", &value)) + is_set = 1; + else + { + clib_warning ("parse error '%U'", format_unformat_error, input); + return -99; + } + } + + if (!is_set) + { + errmsg ("fallback threshold value is missing!"); + return -99; + } + + M (ONE_MAP_REGISTER_FALLBACK_THRESHOLD, mp); + mp->value = clib_host_to_net_u32 (value); + + /* send it... */ + S (mp); + + /* Wait for a reply... */ + W (ret); + return ret; +} + +static int +api_show_one_map_register_fallback_threshold (vat_main_t * vam) +{ + vl_api_show_one_map_register_fallback_threshold_t *mp; + int ret; + + M (SHOW_ONE_MAP_REGISTER_FALLBACK_THRESHOLD, mp); + + /* send it... */ + S (mp); + + /* Wait for a reply... */ + W (ret); + return ret; +} + +static int api_one_map_register_set_ttl (vat_main_t * vam) { unformat_input_t *input = vam->input; @@ -20115,6 +20207,7 @@ _(one_add_del_map_resolver, "<ip4|6-addr> [del]") \ _(one_add_del_map_server, "<ip4|6-addr> [del]") \ _(one_enable_disable, "enable|disable") \ _(one_map_register_enable_disable, "enable|disable") \ +_(one_map_register_fallback_threshold, "<value>") \ _(one_rloc_probe_enable_disable, "enable|disable") \ _(one_add_del_remote_mapping, "add|del vni <vni> eid <dest-eid> " \ "[seid <seid>] " \ @@ -20155,6 +20248,7 @@ _(show_one_pitr, "") \ _(show_one_use_petr, "") \ _(show_one_map_request_mode, "") \ _(show_one_map_register_ttl, "") \ +_(show_one_map_register_fallback_threshold, "") \ _(lisp_add_del_locator_set, "locator-set <locator_name> [iface <intf> |"\ " sw_if_index <sw_if_index> p <priority> " \ "w <weight>] [del]") \ |