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++)
105 memset (&loc, 0,
sizeof (loc));
125 u32 ls_index = ~0, locator_num;
129 memset (a, 0,
sizeof (a[0]));
133 a->
name = locator_name;
136 locator_num = clib_net_to_host_u32 (mp->
locator_num);
138 memset (&locator, 0,
sizeof (locator));
139 for (i = 0; i < locator_num; i++)
161 rmp->
ls_index = clib_host_to_net_u32 (ls_index);
169 vl_api_lisp_add_del_locator_reply_t *rmp;
176 memset (&locator, 0,
sizeof (locator));
177 memset (a, 0,
sizeof (a[0]));
187 a->
name = locator_name;
224 return VNET_API_ERROR_INVALID_VALUE;
235 vl_api_lisp_add_del_local_eid_reply_t *rmp;
240 u32 locator_set_index = ~0, map_index = ~0;
243 memset (a, 0,
sizeof (a[0]));
244 memset (eid, 0,
sizeof (eid[0]));
255 rv = VNET_API_ERROR_INVALID_VALUE;
258 locator_set_index = p[0];
285 vl_api_lisp_eid_table_add_del_map_reply_t *rmp;
288 clib_net_to_host_u32 (mp->
dp_table),
290 REPLY_MACRO (VL_API_LISP_EID_TABLE_ADD_DEL_MAP_REPLY)}
296 vl_api_lisp_add_del_map_server_reply_t *rmp;
300 memset (&addr, 0,
sizeof (addr));
305 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_SERVER_REPLY);
312 vl_api_lisp_add_del_map_resolver_reply_t *rmp;
316 memset (a, 0,
sizeof (a[0]));
323 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_RESOLVER_REPLY);
330 vl_api_lisp_map_register_enable_disable_reply_t *rmp;
341 vl_api_lisp_rloc_probe_enable_disable_reply_t *rmp;
351 vl_api_lisp_enable_disable_reply_t *rmp;
376 vl_api_lisp_map_request_mode_reply_t *rmp;
388 vl_api_lisp_pitr_set_locator_set_reply_t *rmp;
396 REPLY_MACRO (VL_API_LISP_PITR_SET_LOCATOR_SET_REPLY);
402 vl_api_lisp_use_petr_reply_t *rmp;
431 memset (&addr, 0,
sizeof (addr));
432 status = lcm->
flags & LISP_FLAG_USE_PETR;
474 vl_api_lisp_add_del_map_request_itr_rlocs_reply_t *rmp;
476 u8 *locator_set_name =
NULL;
488 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY);
496 vl_api_lisp_add_del_remote_mapping_reply_t *rmp;
499 u32 rloc_num = clib_net_to_host_u32 (mp->
rloc_num);
501 memset (eid, 0,
sizeof (eid[0]));
533 REPLY_MACRO (VL_API_LISP_ADD_DEL_REMOTE_MAPPING_REPLY);
539 vl_api_lisp_add_del_adjacency_reply_t *rmp;
543 memset (a, 0,
sizeof (a[0]));
568 memset (rmp, 0,
sizeof (*rmp));
569 rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_DETAILS);
596 u32 ls_index = ~0, *locit = 0;
636 u32 context,
u32 ls_index)
642 memset (rmp, 0,
sizeof (*rmp));
643 rmp->_vl_msg_id = ntohs (VL_API_LISP_LOCATOR_SET_DETAILS);
650 strncpy ((
char *) rmp->
ls_name, (
char *) lsit->
name,
655 str =
format (0,
"<remote-%d>", ls_index);
681 if (filter && !((1 == filter && lsit->local) ||
682 (2 == filter && !lsit->local)))
709 prefix_length[0] = 0;
747 u32 context,
u8 filter)
755 ip_prefix_t *ip_prefix =
NULL;
771 clib_warning (
"Filter error, unknown filter: %d", filter);
784 memset (rmp, 0,
sizeof (*rmp));
785 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_DETAILS);
794 rmp->
ttl = clib_host_to_net_u32 (mapit->
ttl);
855 memset (eid, 0,
sizeof (*eid));
873 send_lisp_eid_table_details(mapit, q, mp->context,
887 memset (rmp, 0,
sizeof (*rmp));
888 rmp->_vl_msg_id = ntohs (VL_API_LISP_MAP_SERVER_DETAILS);
938 memset (rmp, 0,
sizeof (*rmp));
939 rmp->_vl_msg_id = ntohs (VL_API_LISP_MAP_RESOLVER_DETAILS);
989 memset (rmp, 0,
sizeof (*rmp));
990 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_MAP_DETAILS);
992 rmp->
vni = clib_host_to_net_u32 (p->
key);
1005 uword *vni_table = 0;
1036 memset (rmp, 0,
sizeof (*rmp));
1037 rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_VNI_DETAILS);
1039 rmp->
vni = clib_host_to_net_u32 (vni);
1050 for (i = 0; i < n; i++)
1053 memset (&a, 0,
sizeof (a));
1108 REPLY_MACRO2 (VL_API_SHOW_LISP_MAP_REGISTER_STATE_REPLY,
1122 u32 vni = clib_net_to_host_u32 (mp->
vni);
1156 hash_set (vnis, p->key, 0);
1161 hash_set (vnis, p->key, 0);
1214 tmp_str =
format (0,
" ");
1224 REPLY_MACRO2(VL_API_LISP_GET_MAP_REQUEST_ITR_RLOCS_REPLY,
1253 tmp_str =
format (0,
"N/A");
1266 tmp_str =
format (0,
"N/A");
1288 #define vl_msg_name_crc_list 1290 #undef vl_msg_name_crc_list 1295 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 1296 foreach_vl_msg_name_crc_lisp;
1306 vl_msg_api_set_handlers(VL_API_##N, #n, \ 1307 vl_api_##n##_t_handler, \ 1309 vl_api_##n##_t_endian, \ 1310 vl_api_##n##_t_print, \ 1311 sizeof(vl_api_##n##_t), 1);
Reply for show_lisp_map_register_state.
vl_api_local_locator_t locators[locator_num]
#define gid_address_ip_version(_a)
sll srl srl sll sra u16x4 i
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.
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)
static void lisp_adjacency_copy(vl_api_lisp_adjacency_t *dst, lisp_adjacency_t *adjs)
u8 vnet_lisp_get_map_request_mode(void)
#define ip_prefix_len(_a)
static void vl_api_lisp_add_del_map_server_t_handler(vl_api_lisp_add_del_map_server_t *mp)
#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 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)
static void vl_api_lisp_locator_dump_t_handler(vl_api_lisp_locator_dump_t *mp)
void ip_address_set(ip_address_t *dst, const void *src, u8 version)
#define ip_prefix_version(_a)
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)
static void send_lisp_map_server_details(ip_address_t *ip, unix_shared_memory_queue_t *q, u32 context)
lisp_msmr_t * map_servers
add or delete LISP adjacency adjacency
#define foreach_vpe_api_msg
static void send_eid_table_vni(u32 vni, unix_shared_memory_queue_t *q, u32 context)
#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)
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()
void * vl_msg_api_alloc(int nbytes)
u32 petr_map_index
Proxy ETR map index.
#define ip_addr_version(_a)
static void vl_api_lisp_use_petr_t_handler(vl_api_lisp_use_petr_t *mp)
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.
void ip_address_copy_addr(void *dst, const ip_address_t *src)
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)
static void send_lisp_locator_set_details(lisp_cp_main_t *lcm, locator_set_t *lsit, unix_shared_memory_queue_t *q, u32 context, u32 ls_index)
#define gid_address_mac(_a)
set LISP map-request mode.
static void send_lisp_map_resolver_details(ip_address_t *ip, unix_shared_memory_queue_t *q, u32 context)
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)
static void send_lisp_locator_details(lisp_cp_main_t *lcm, locator_t *loc, unix_shared_memory_queue_t *q, u32 context)
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)
int vnet_lisp_add_del_mapping(gid_address_t *eid, locator_t *rlocs, u8 action, u8 authoritative, u32 ttl, u8 is_add, u8 is_static, u32 *res_map_index)
Adds/removes/updates mapping.
void ip_prefix_normalize(ip_prefix_t *a)
#define gid_address_ippref(_a)
LISP PETR status, enable or disable.
lisp_adjacency_t * vnet_lisp_adjacencies_get_by_vni(u32 vni)
Returns vector of adjacencies.
#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...)
#define clib_memcpy(a, b, c)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
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.
Request for map lisp locator status.
#define fid_addr_ippref(_a)
u8 vnet_lisp_enable_disable_status(void)
static void send_lisp_eid_table_details(mapping_t *mapit, unix_shared_memory_queue_t *q, u32 context, u8 filter)
struct _gid_address_t gid_address_t
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
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.
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)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define hash_foreach_pair(p, v, body)
Iterate over hash pairs.
add or delete locator for locator_set
int vnet_lisp_add_del_locator(vnet_lisp_add_del_locator_set_args_t *a, locator_set_t *ls, u32 *ls_result)
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 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 send_eid_table_map_pair(hash_pair_t *p, unix_shared_memory_queue_t *q, u32 context)
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)
struct _unix_shared_memory_queue unix_shared_memory_queue_t