30 #define vl_api_remote_locator_t_endian vl_noop_handler 31 #define vl_api_remote_locator_t_print vl_noop_handler 32 #define vl_api_local_locator_t_endian vl_noop_handler 33 #define vl_api_local_locator_t_print vl_noop_handler 35 #define vl_api_lisp_add_del_locator_set_t_endian vl_noop_handler 36 #define vl_api_lisp_add_del_locator_set_t_print vl_noop_handler 37 #define vl_api_lisp_add_del_remote_mapping_t_endian vl_noop_handler 38 #define vl_api_lisp_add_del_remote_mapping_t_print vl_noop_handler 40 #define vl_api_one_add_del_locator_set_t_endian vl_noop_handler 41 #define vl_api_one_add_del_locator_set_t_print vl_noop_handler 42 #define vl_api_one_add_del_remote_mapping_t_endian vl_noop_handler 43 #define vl_api_one_add_del_remote_mapping_t_print vl_noop_handler 54 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 61 #define foreach_vpe_api_msg \ 62 _(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \ 63 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \ 64 _(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \ 65 _(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \ 66 _(LISP_ADD_DEL_MAP_SERVER, lisp_add_del_map_server) \ 67 _(LISP_ENABLE_DISABLE, lisp_enable_disable) \ 68 _(LISP_RLOC_PROBE_ENABLE_DISABLE, lisp_rloc_probe_enable_disable) \ 69 _(LISP_MAP_REGISTER_ENABLE_DISABLE, lisp_map_register_enable_disable) \ 70 _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \ 71 _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \ 72 _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \ 73 _(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \ 74 _(LISP_EID_TABLE_ADD_DEL_MAP, lisp_eid_table_add_del_map) \ 75 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \ 76 _(LISP_LOCATOR_DUMP, lisp_locator_dump) \ 77 _(LISP_EID_TABLE_DUMP, lisp_eid_table_dump) \ 78 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \ 79 _(LISP_MAP_SERVER_DUMP, lisp_map_server_dump) \ 80 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump) \ 81 _(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump) \ 82 _(LISP_ADJACENCIES_GET, lisp_adjacencies_get) \ 83 _(SHOW_LISP_RLOC_PROBE_STATE, show_lisp_rloc_probe_state) \ 84 _(SHOW_LISP_MAP_REGISTER_STATE, show_lisp_map_register_state) \ 85 _(SHOW_LISP_STATUS, show_lisp_status) \ 86 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \ 87 lisp_add_del_map_request_itr_rlocs) \ 88 _(LISP_GET_MAP_REQUEST_ITR_RLOCS, lisp_get_map_request_itr_rlocs) \ 89 _(SHOW_LISP_PITR, show_lisp_pitr) \ 90 _(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \ 91 _(LISP_USE_PETR, lisp_use_petr) \ 92 _(SHOW_LISP_USE_PETR, show_lisp_use_petr) \ 101 for (i = 0; i < rloc_num; i++)
126 u32 ls_index = ~0, locator_num;
127 u8 *locator_name = NULL;
136 a->
name = locator_name;
139 locator_num = clib_net_to_host_u32 (mp->
locator_num);
142 for (i = 0; i < locator_num; i++)
164 rmp->
ls_index = clib_host_to_net_u32 (ls_index);
172 vl_api_lisp_add_del_locator_reply_t *rmp;
177 u8 *locator_name = NULL;
192 a->
name = locator_name;
229 return VNET_API_ERROR_INVALID_VALUE;
240 vl_api_lisp_add_del_local_eid_reply_t *rmp;
245 u32 locator_set_index = ~0, map_index = ~0;
262 rv = VNET_API_ERROR_INVALID_VALUE;
265 locator_set_index = p[0];
292 vl_api_lisp_eid_table_add_del_map_reply_t *rmp;
295 clib_net_to_host_u32 (mp->
dp_table),
297 REPLY_MACRO (VL_API_LISP_EID_TABLE_ADD_DEL_MAP_REPLY)}
303 vl_api_lisp_add_del_map_server_reply_t *rmp;
312 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_SERVER_REPLY);
319 vl_api_lisp_add_del_map_resolver_reply_t *rmp;
330 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_RESOLVER_REPLY);
337 vl_api_lisp_map_register_enable_disable_reply_t *rmp;
348 vl_api_lisp_rloc_probe_enable_disable_reply_t *rmp;
358 vl_api_lisp_enable_disable_reply_t *rmp;
383 vl_api_lisp_map_request_mode_reply_t *rmp;
395 vl_api_lisp_pitr_set_locator_set_reply_t *rmp;
405 REPLY_MACRO (VL_API_LISP_PITR_SET_LOCATOR_SET_REPLY);
411 vl_api_lisp_use_petr_reply_t *rmp;
434 status = lcm->
flags & LISP_FLAG_USE_PETR;
476 vl_api_lisp_add_del_map_request_itr_rlocs_reply_t *rmp;
478 u8 *locator_set_name = NULL;
492 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY);
500 vl_api_lisp_add_del_remote_mapping_reply_t *rmp;
503 u32 rloc_num = clib_net_to_host_u32 (mp->
rloc_num);
551 REPLY_MACRO (VL_API_LISP_ADD_DEL_REMOTE_MAPPING_REPLY);
557 vl_api_lisp_add_del_adjacency_reply_t *rmp;
587 rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_DETAILS);
614 u32 ls_index = ~0, *locit = 0;
660 rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_SET_DETAILS);
667 strncpy ((
char *) rmp->
ls_name, (
char *) lsit->
name,
672 str =
format (0,
"<remote-%d>", ls_index);
696 if (filter && !((1 == filter && lsit->local) ||
697 (2 == filter && !lsit->local)))
724 prefix_length[0] = 0;
786 clib_warning (
"Filter error, unknown filter: %d", filter);
800 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_DETAILS);
809 rmp->
ttl = clib_host_to_net_u32 (mapit->
ttl);
886 send_lisp_eid_table_details(mapit, reg, mp->context,
901 rmp->_vl_msg_id = ntohs (VL_API_LISP_MAP_SERVER_DETAILS);
950 rmp->_vl_msg_id = ntohs (VL_API_LISP_MAP_RESOLVER_DETAILS);
999 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_MAP_DETAILS);
1001 rmp->
vni = clib_host_to_net_u32 (p->
key);
1014 uword *vni_table = 0;
1044 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_VNI_DETAILS);
1046 rmp->
vni = clib_host_to_net_u32 (vni);
1057 for (i = 0; i < n; i++)
1115 REPLY_MACRO2 (VL_API_SHOW_LISP_MAP_REGISTER_STATE_REPLY,
1129 u32 vni = clib_net_to_host_u32 (mp->
vni);
1161 hash_set (vnis, p->key, 0);
1166 hash_set (vnis, p->key, 0);
1205 tmp_str =
format (0,
" ");
1215 REPLY_MACRO2(VL_API_LISP_GET_MAP_REQUEST_ITR_RLOCS_REPLY,
1235 u8 is_enabled = (lcm->
flags & LISP_FLAG_PITR_MODE)
1240 tmp_str =
format (0,
"N/A");
1253 tmp_str =
format (0,
"N/A");
1275 #define vl_msg_name_crc_list 1277 #undef vl_msg_name_crc_list 1282 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 1283 foreach_vl_msg_name_crc_lisp;
1293 vl_msg_api_set_handlers(VL_API_##N, #n, \ 1294 vl_api_##n##_t_handler, \ 1296 vl_api_##n##_t_endian, \ 1297 vl_api_##n##_t_print, \ 1298 sizeof(vl_api_##n##_t), 1);
Reply for show_lisp_map_register_state.
static void send_lisp_eid_table_details(mapping_t *mapit, vl_api_registration_t *reg, u32 context, u8 filter)
vl_api_local_locator_t locators[locator_num]
#define gid_address_ip_version(_a)
static void send_eid_table_map_pair(hash_pair_t *p, vl_api_registration_t *reg, u32 context)
enable/disable LISP RLOC probing
#define gid_address_type(_a)
static u8 fid_type_to_api_type(fid_address_t *fid)
u8 vnet_lisp_gpe_enable_disable_status(void)
Check if LISP-GPE is enabled.
void ip_address_set(ip_address_t *dst, const void *src, u8 version)
static void vl_api_lisp_get_map_request_itr_rlocs_t_handler(vl_api_lisp_get_map_request_itr_rlocs_t *mp)
lisp_msmr_t * map_resolvers
VLIB_API_INIT_FUNCTION(lisp_api_hookup)
configure or disable LISP PITR node
Reply for locator_set add/del.
#define REPLY_MACRO4(t, n, body)
LISP map resolver status.
vl_api_lisp_adjacency_t adjacencies[count]
#define REPLY_MACRO2(t, body)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void lisp_adjacency_copy(vl_api_lisp_adjacency_t *dst, lisp_adjacency_t *adjs)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static void send_lisp_map_resolver_details(ip_address_t *ip, vl_api_registration_t *reg, u32 context)
u8 vnet_lisp_get_map_request_mode(void)
static void vl_api_lisp_add_del_map_server_t_handler(vl_api_lisp_add_del_map_server_t *mp)
#define vec_terminate_c_string(V)
(If necessary) NULL terminate a vector containing a c-string.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Request for lisp_eid_table_map_details.
configure or disable use of PETR
static void vl_api_lisp_pitr_set_locator_set_t_handler(vl_api_lisp_pitr_set_locator_set_t *mp)
Request for LISP PETR status.
static void send_lisp_locator_details(lisp_cp_main_t *lcm, locator_t *loc, vl_api_registration_t *reg, u32 context)
static void vl_api_lisp_eid_table_add_del_map_t_handler(vl_api_lisp_eid_table_add_del_map_t *mp)
static void vl_api_lisp_add_del_locator_set_t_handler(vl_api_lisp_add_del_locator_set_t *mp)
int vnet_lisp_add_mapping(vnet_lisp_add_del_mapping_args_t *a, locator_t *rlocs, u32 *res_map_index, u8 *is_updated)
Adds/updates mapping.
static void vl_api_lisp_locator_dump_t_handler(vl_api_lisp_locator_dump_t *mp)
#define ip_addr_version(_a)
void * vl_msg_api_alloc(int nbytes)
u8 vnet_lisp_map_register_state_get(void)
int vnet_lisp_set_map_request_mode(u8 mode)
Reply for show_lisp_map_request_mode.
int vnet_lisp_add_del_adjacency(vnet_lisp_add_del_adjacency_args_t *a)
Adds adjacency or removes forwarding entry associated to remote mapping.
Request for map resolver summary status.
static void vl_api_lisp_map_register_enable_disable_t_handler(vl_api_lisp_map_register_enable_disable_t *mp)
#define clib_memcpy(d, s, n)
lisp_msmr_t * map_servers
add or delete LISP adjacency adjacency
#define foreach_vpe_api_msg
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
static void vl_api_lisp_rloc_probe_enable_disable_t_handler(vl_api_lisp_rloc_probe_enable_disable_t *mp)
static void vl_api_lisp_add_del_remote_mapping_t_handler(vl_api_lisp_add_del_remote_mapping_t *mp)
#define gid_address_sd_src(_a)
static void vl_api_show_lisp_map_register_state_t_handler(vl_api_show_lisp_map_register_state_t *mp)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static void vl_api_lisp_adjacencies_get_t_handler(vl_api_lisp_adjacencies_get_t *mp)
void ip_prefix_normalize(ip_prefix_t *a)
Get LISP map request itr rlocs status.
Reply for show_lisp_rloc_probe_state.
add or delete map request itr rlocs
int vnet_lisp_eid_table_map(u32 vni, u32 dp_id, u8 is_l2, u8 is_add)
static lisp_cp_main_t * vnet_lisp_cp_get_main()
u32 petr_map_index
Proxy ETR map index used for 'use-petr'.
void ip_address_copy_addr(void *dst, const ip_address_t *src)
static void vl_api_lisp_use_petr_t_handler(vl_api_lisp_use_petr_t *mp)
vl_api_fib_path_type_t type
clib_error_t * vnet_lisp_enable_disable(u8 is_enable)
static void vl_api_show_lisp_pitr_t_handler(vl_api_show_lisp_pitr_t *mp)
Get state of LISP map-register.
Get state of LISP RLOC probing.
int vnet_lisp_pitr_set_locator_set(u8 *locator_set_name, u8 is_add)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u8 vnet_lisp_rloc_probe_state_get(void)
#define gid_address_mac(_a)
set LISP map-request mode.
int vnet_lisp_add_del_local_mapping(vnet_lisp_add_del_mapping_args_t *a, u32 *map_index_result)
Add/update/delete mapping to/in/from map-cache.
Request for LISP adjacencies.
void gid_address_free(gid_address_t *a)
add or delete lisp eid-table
static void vl_api_lisp_map_server_dump_t_handler(vl_api_lisp_map_server_dump_t *mp)
static void vl_api_lisp_add_del_adjacency_t_handler(vl_api_lisp_add_del_adjacency_t *mp)
#define gid_address_ippref(_a)
LISP PETR status, enable or disable.
API main structure, used by both vpp and binary API clients.
lisp_adjacency_t * vnet_lisp_adjacencies_get_by_vni(u32 vni)
Returns vector of adjacencies.
An API client registration, only in vpp/vlib.
#define BAD_SW_IF_INDEX_LABEL
Request for lisp-gpe protocol status.
int vnet_lisp_add_del_mreq_itr_rlocs(vnet_lisp_add_del_mreq_itr_rloc_args_t *a)
enable or disable LISP feature
Shows relationship between vni and vrf/bd.
void gid_address_ip_set(gid_address_t *dst, void *src, u8 version)
static void vl_api_show_lisp_status_t_handler(vl_api_show_lisp_status_t *mp)
#define vec_free(V)
Free vector's memory (no header).
#define gid_address_ippref_len(_a)
#define clib_warning(format, args...)
static void vl_api_lisp_locator_set_dump_t_handler(vl_api_lisp_locator_set_dump_t *mp)
int vnet_lisp_map_register_enable_disable(u8 is_enable)
add or delete map-resolver
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
Request for map lisp locator status.
#define fid_addr_ippref(_a)
u8 vnet_lisp_enable_disable_status(void)
struct _gid_address_t gid_address_t
static clib_error_t * lisp_api_hookup(vlib_main_t *vm)
int vnet_lisp_add_del_map_server(ip_address_t *addr, u8 is_add)
#define fid_addr_type(_a)
Request for eid table summary status.
enable/disable LISP map-register
int vnet_lisp_clear_all_remote_adjacencies(void)
Request for locator_set summary status.
#define gid_address_sd_dst(_a)
static void vl_api_show_lisp_use_petr_t_handler(vl_api_show_lisp_use_petr_t *mp)
Reply for lisp_add_del_map_request_itr_rlocs.
static void send_lisp_map_server_details(ip_address_t *ip, vl_api_registration_t *reg, u32 context)
gid_dictionary_t mapping_index_by_gid
locator_set_t * locator_set_pool
Status of lisp pitr, enable or disable.
static void vl_api_lisp_map_resolver_dump_t_handler(vl_api_lisp_map_resolver_dump_t *mp)
int vnet_lisp_rloc_probe_enable_disable(u8 is_enable)
add or delete locator_set
vl_api_remote_locator_t rlocs[rloc_num]
static void lisp_fid_put_api(u8 *dst, fid_address_t *src, u8 *prefix_length)
static void vl_api_lisp_add_del_map_request_itr_rlocs_t_handler(vl_api_lisp_add_del_map_request_itr_rlocs_t *mp)
u64 gid_dictionary_lookup(gid_dictionary_t *db, gid_address_t *key)
static void vl_api_lisp_add_del_local_eid_t_handler(vl_api_lisp_add_del_local_eid_t *mp)
int vnet_lisp_add_del_locator_set(vnet_lisp_add_del_locator_set_args_t *a, u32 *ls_result)
#define gid_address_ip(_a)
Status of lisp, enable or disable.
#define gid_address_vni(_a)
Request for map server summary status.
static void vl_api_lisp_eid_table_dump_t_handler(vl_api_lisp_eid_table_dump_t *mp)
static void vl_api_show_lisp_map_request_mode_t_handler(vl_api_show_lisp_map_request_mode_t *mp)
static locator_t * unformat_lisp_locs(vl_api_remote_locator_t *rmt_locs, u32 rloc_num)
static void send_eid_table_vni(u32 vni, vl_api_registration_t *reg, u32 context)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define hash_foreach_pair(p, v, body)
Iterate over hash pairs.
static void send_lisp_locator_set_details(lisp_cp_main_t *lcm, locator_set_t *lsit, vl_api_registration_t *reg, u32 context, u32 ls_index)
add or delete locator for locator_set
int vnet_lisp_del_mapping(gid_address_t *eid, u32 *res_map_index)
Removes a mapping.
int vnet_lisp_add_del_locator(vnet_lisp_add_del_locator_set_args_t *a, locator_set_t *ls, u32 *ls_result)
#define ip_prefix_len(_a)
uword * locator_set_index_by_name
add or delete remote static mapping
static void setup_message_id_table(api_main_t *am)
static void vl_api_lisp_map_request_mode_t_handler(vl_api_lisp_map_request_mode_t *mp)
void gid_address_copy(gid_address_t *dst, gid_address_t *src)
#define ip_prefix_version(_a)
#define hash_get_mem(h, key)
void mac_copy(void *dst, void *src)
static void vl_api_lisp_enable_disable_t_handler(vl_api_lisp_enable_disable_t *mp)
int vnet_lisp_add_del_map_resolver(vnet_lisp_add_del_map_resolver_args_t *a)
static void vl_api_lisp_eid_table_vni_dump_t_handler(vl_api_lisp_eid_table_vni_dump_t *mp)
#define vec_foreach(var, vec)
Vector iterator.
Dumps all VNIs used in mappings.
Request for map request itr rlocs summary status.
static void vl_api_lisp_add_del_locator_t_handler(vl_api_lisp_add_del_locator_t *mp)
Request for LISP map-request mode.
static int unformat_lisp_eid_api(gid_address_t *dst, u32 vni, u8 type, void *src, u8 len)
static void vl_api_show_lisp_rloc_probe_state_t_handler(vl_api_show_lisp_rloc_probe_state_t *mp)
int vnet_lisp_use_petr(ip_address_t *ip, u8 is_add)
Configure Proxy-ETR.
reply to lisp_eid_table_vni_dump
static void vl_api_lisp_eid_table_map_dump_t_handler(vl_api_lisp_eid_table_map_dump_t *mp)
Request for lisp pitr status.
#define VALIDATE_SW_IF_INDEX(mp)
static void vl_api_lisp_add_del_map_resolver_t_handler(vl_api_lisp_add_del_map_resolver_t *mp)