diff options
Diffstat (limited to 'vpp')
-rw-r--r-- | vpp/vpp-api/api.c | 28 | ||||
-rw-r--r-- | vpp/vpp-api/custom_dump.c | 24 | ||||
-rw-r--r-- | vpp/vpp-api/vpe.api | 47 |
3 files changed, 99 insertions, 0 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c index 1a46eb9c..3bdc80af 100644 --- a/vpp/vpp-api/api.c +++ b/vpp/vpp-api/api.c @@ -364,6 +364,7 @@ _(LISP_GPE_ADD_DEL_IFACE, lisp_gpe_add_del_iface) \ _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \ _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \ _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \ +_(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \ _(LISP_EID_TABLE_ADD_DEL_MAP, lisp_eid_table_add_del_map) \ _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \ _(LISP_LOCATOR_DUMP, lisp_locator_dump) \ @@ -377,6 +378,7 @@ _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \ lisp_add_del_map_request_itr_rlocs) \ _(LISP_GET_MAP_REQUEST_ITR_RLOCS, lisp_get_map_request_itr_rlocs) \ _(SHOW_LISP_PITR, show_lisp_pitr) \ +_(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \ _(SR_MULTICAST_MAP_ADD_DEL, sr_multicast_map_add_del) \ _(AF_PACKET_CREATE, af_packet_create) \ _(AF_PACKET_DELETE, af_packet_delete) \ @@ -5240,6 +5242,32 @@ vl_api_lisp_gpe_add_del_iface_t_handler (vl_api_lisp_gpe_add_del_iface_t * mp) } static void + vl_api_show_lisp_map_request_mode_t_handler + (vl_api_show_lisp_map_request_mode_t * mp) +{ + int rv = 0; + vl_api_show_lisp_map_request_mode_reply_t *rmp; + + /* *INDENT-OFF* */ + REPLY_MACRO2(VL_API_SHOW_LISP_MAP_REQUEST_MODE_REPLY, + ({ + rmp->mode = vnet_lisp_get_map_request_mode (); + })); + /* *INDENT-ON* */ +} + +static void +vl_api_lisp_map_request_mode_t_handler (vl_api_lisp_map_request_mode_t * mp) +{ + vl_api_lisp_map_request_mode_reply_t *rmp; + int rv = 0; + + rv = vnet_lisp_set_map_request_mode (mp->mode); + + REPLY_MACRO (VL_API_LISP_MAP_REQUEST_MODE_REPLY); +} + +static void vl_api_lisp_pitr_set_locator_set_t_handler (vl_api_lisp_pitr_set_locator_set_t * mp) { diff --git a/vpp/vpp-api/custom_dump.c b/vpp/vpp-api/custom_dump.c index 98598ce3..37360b8a 100644 --- a/vpp/vpp-api/custom_dump.c +++ b/vpp/vpp-api/custom_dump.c @@ -2600,6 +2600,27 @@ static void *vl_api_lisp_locator_dump_t_print FINISH; } +static void *vl_api_lisp_map_request_mode_t_print + (vl_api_lisp_map_request_mode_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: lisp_map_request_mode "); + + switch (mp->mode) + { + case 0: + s = format (s, "dst-only"); + break; + case 1: + s = format (s, "src-dst"); + default: + break; + } + + FINISH; +} + static void *vl_api_lisp_eid_table_dump_t_print (vl_api_lisp_eid_table_dump_t * mp, void *handle) { @@ -2680,6 +2701,7 @@ static void *vl_api_ipsec_gre_tunnel_dump_t_print #define foreach_custom_print_no_arg_function \ _(lisp_eid_table_vni_dump) \ _(lisp_map_resolver_dump) \ +_(show_lisp_map_request_mode) \ _(lisp_gpe_tunnel_dump) #define _(f) \ @@ -2812,6 +2834,8 @@ _(LISP_ENABLE_DISABLE, lisp_enable_disable) \ _(LISP_GPE_ENABLE_DISABLE, lisp_gpe_enable_disable) \ _(LISP_GPE_ADD_DEL_IFACE, lisp_gpe_add_del_iface) \ _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \ +_(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \ +_(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \ _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \ _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \ _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \ diff --git a/vpp/vpp-api/vpe.api b/vpp/vpp-api/vpe.api index 5c75986f..33793b03 100644 --- a/vpp/vpp-api/vpe.api +++ b/vpp/vpp-api/vpe.api @@ -2621,6 +2621,53 @@ define lisp_pitr_set_locator_set_reply i32 retval; }; +/** \brief set LISP map-request mode. Based on configuration VPP will send + src/dest or just normal destination map requests. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param mode - new map-request mode. Supported values are: + 0 - destination only + 1 - source/destaination +*/ +define lisp_map_request_mode +{ + u32 client_index; + u32 context; + u8 mode; +}; + +/** \brief Reply for lisp_map_request_mode + @param context - returned sender context, to match reply w/ request + @param retval - return code +*/ +define lisp_map_request_mode_reply +{ + u32 context; + i32 retval; +}; + +/** \brief Request for LISP map-request mode + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define show_lisp_map_request_mode +{ + u32 client_index; + u32 context; +}; + +/** \brief Reply for show_lisp_map_request_mode + @param context - returned sender context, to match reply w/ request + @param retval - return code + @param mode - map-request mode +*/ +define show_lisp_map_request_mode_reply +{ + u32 context; + i32 retval; + u8 mode; +}; + /** \brief add or delete remote static mapping @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request |