|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
33 #include <lisp/lisp-cp/lisp.api_enum.h>
34 #include <lisp/lisp-cp/lisp.api_types.h>
40 #define REPLY_MSG_ID_BASE lisp_base_msg_id
49 vl_api_remote_locator_t *
r;
51 for (
i = 0;
i < rloc_num;
i++)
57 loc.address.ippref.len =
60 loc.priority =
r->priority;
61 loc.weight =
r->weight;
76 vl_api_local_locator_t *ls_loc;
77 u32 ls_index = ~0, locator_num;
78 u8 *locator_name = NULL;
87 a->name = locator_name;
90 locator_num = clib_net_to_host_u32 (mp->
locator_num);
93 for (
i = 0;
i < locator_num;
i++)
100 locator.
weight = ls_loc->weight;
115 rmp->
ls_index = clib_host_to_net_u32 (ls_index);
123 vl_api_lisp_add_del_locator_reply_t *rmp;
128 u8 *locator_name = NULL;
143 a->name = locator_name;
144 a->locators = locators;
159 vl_api_lisp_add_del_local_eid_reply_t *rmp;
164 u32 locator_set_index = ~0, map_index = ~0;
180 rv = VNET_API_ERROR_INVALID_VALUE;
183 locator_set_index = p[0];
191 a->locator_set_index = locator_set_index;
194 a->key_id = clib_net_to_host_u16 (mp->
key.id);
210 vl_api_lisp_eid_table_add_del_map_reply_t *rmp;
213 clib_net_to_host_u32 (mp->
dp_table),
215 REPLY_MACRO (VL_API_LISP_EID_TABLE_ADD_DEL_MAP_REPLY)}
221 vl_api_lisp_add_del_map_server_reply_t *rmp;
230 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_SERVER_REPLY);
237 vl_api_lisp_add_del_map_resolver_reply_t *rmp;
248 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_RESOLVER_REPLY);
255 vl_api_lisp_map_register_enable_disable_reply_t *rmp;
266 vl_api_lisp_rloc_probe_enable_disable_reply_t *rmp;
276 vl_api_lisp_enable_disable_reply_t *rmp;
301 vl_api_lisp_map_request_mode_reply_t *rmp;
313 vl_api_lisp_pitr_set_locator_set_reply_t *rmp;
323 REPLY_MACRO (VL_API_LISP_PITR_SET_LOCATOR_SET_REPLY);
329 vl_api_lisp_use_petr_reply_t *rmp;
352 status = lcm->
flags & LISP_FLAG_USE_PETR;
378 vl_api_lisp_add_del_map_request_itr_rlocs_reply_t *rmp;
380 u8 *locator_set_name = NULL;
388 a->locator_set_name = locator_set_name;
394 REPLY_MACRO (VL_API_LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY);
402 vl_api_lisp_add_del_remote_mapping_reply_t *rmp;
405 u32 rloc_num = clib_net_to_host_u32 (mp->
rloc_num);
452 REPLY_MACRO (VL_API_LISP_ADD_DEL_REMOTE_MAPPING_REPLY);
458 vl_api_lisp_add_del_adjacency_reply_t *rmp;
512 u32 ls_index = ~0, *locit = 0;
566 strncpy ((
char *) rmp->
ls_name, (
char *) lsit->
name,
571 str =
format (0,
"<remote-%d>", ls_index);
595 if (filter && !((1 == filter && lsit->
local) ||
596 (2 == filter && !lsit->
local)))
630 clib_warning (
"Filter error, unknown filter: %d", filter);
651 rmp->
ttl = clib_host_to_net_u32 (mapit->
ttl);
672 rmp->
key.id = clib_host_to_net_u16 (mapit->
key_id);
795 rmp->
vni = clib_host_to_net_u32 (p->
key);
808 uword *vni_table = 0;
841 rmp->
vni = clib_host_to_net_u32 (
vni);
849 vl_api_lisp_adjacency_t
a;
852 for (
i = 0;
i < n;
i++)
887 REPLY_MACRO2 (VL_API_SHOW_LISP_MAP_REGISTER_STATE_REPLY,
901 u32 vni = clib_net_to_host_u32 (mp->
vni);
904 size =
vec_len (adjs) *
sizeof (vl_api_lisp_adjacency_t);
933 hash_set (vnis, p->key, 0);
938 hash_set (vnis, p->key, 0);
977 tmp_str =
format (0,
" ");
987 REPLY_MACRO2(VL_API_LISP_GET_MAP_REQUEST_ITR_RLOCS_REPLY,
1007 u8 is_enabled = (lcm->
flags & LISP_FLAG_PITR_MODE)
1012 tmp_str =
format (0,
"N/A");
1025 tmp_str =
format (0,
"N/A");
1047 #include <lisp/lisp-cp/lisp.api.c>
static void vl_api_lisp_eid_table_dump_t_handler(vl_api_lisp_eid_table_dump_t *mp)
Status of lisp, enable or disable.
Request for map resolver summary status.
static void vl_api_show_lisp_map_register_state_t_handler(vl_api_show_lisp_map_register_state_t *mp)
#define VALIDATE_SW_IF_INDEX(mp)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static void vl_api_lisp_add_del_map_resolver_t_handler(vl_api_lisp_add_del_map_resolver_t *mp)
Request for map server summary status.
static void vl_api_lisp_map_register_enable_disable_t_handler(vl_api_lisp_map_register_enable_disable_t *mp)
void lisp_fid_put_api(vl_api_eid_t *eid, const fid_address_t *fid)
Request for LISP adjacencies.
Get state of LISP map-register.
static clib_error_t * lisp_api_hookup(vlib_main_t *vm)
static void send_lisp_locator_details(lisp_cp_main_t *lcm, locator_t *loc, vl_api_registration_t *reg, u32 context)
u8 vnet_lisp_map_register_state_get(void)
#define REPLY_MACRO2(t, body)
Reply for show_lisp_map_register_state.
bool is_add[default=true]
vl_api_address_t ip_address
int vnet_lisp_use_petr(ip_address_t *ip, u8 is_add)
Configure Proxy-ETR.
vl_api_address_t ip_address
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
Request for eid table summary status.
static void vl_api_lisp_add_del_map_server_t_handler(vl_api_lisp_add_del_map_server_t *mp)
#define gid_address_sd_dst(_a)
string locator_set_name[64]
bool is_add[default=true]
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
string locator_set_name[64]
lisp_msmr_t * map_resolvers
LISP map resolver status.
#define REPLY_MACRO4(t, n, body)
static void vl_api_lisp_add_del_adjacency_t_handler(vl_api_lisp_add_del_adjacency_t *mp)
lisp_msmr_t * map_servers
static void vl_api_lisp_map_server_dump_t_handler(vl_api_lisp_map_server_dump_t *mp)
bool is_add[default=true]
add or delete lisp eid-table
static void vl_api_show_lisp_pitr_t_handler(vl_api_show_lisp_pitr_t *mp)
int vnet_lisp_add_del_adjacency(vnet_lisp_add_del_adjacency_args_t *a)
Adds adjacency or removes forwarding entry associated to remote mapping.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void vl_api_lisp_locator_set_dump_t_handler(vl_api_lisp_locator_set_dump_t *mp)
add or delete LISP adjacency adjacency
bool is_add[default=true]
static void vl_api_lisp_add_del_locator_set_t_handler(vl_api_lisp_add_del_locator_set_t *mp)
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)
Shows relationship between vni and vrf/bd.
Request for lisp_eid_table_map_details.
Request for LISP map-request mode.
int vnet_lisp_pitr_set_locator_set(u8 *locator_set_name, u8 is_add)
#define gid_address_ip(_a)
vnet_hw_if_output_node_runtime_t * r
static void vl_api_lisp_use_petr_t_handler(vl_api_lisp_use_petr_t *mp)
static void vl_api_lisp_eid_table_add_del_map_t_handler(vl_api_lisp_eid_table_add_del_map_t *mp)
add or delete locator for locator_set
u32 petr_map_index
Proxy ETR map index used for 'use-petr'.
static void vl_api_lisp_add_del_remote_mapping_t_handler(vl_api_lisp_add_del_remote_mapping_t *mp)
u8 vnet_lisp_get_map_request_mode(void)
int vnet_lisp_eid_table_map(u32 vni, u32 dp_id, u8 is_l2, u8 is_add)
int unformat_lisp_eid_api(gid_address_t *dst, u32 vni, const vl_api_eid_t *eid)
static void vl_api_lisp_map_resolver_dump_t_handler(vl_api_lisp_map_resolver_dump_t *mp)
static locator_t * unformat_lisp_locs(vl_api_remote_locator_t *rmt_locs, u32 rloc_num)
void ip_address_encode2(const ip_address_t *in, vl_api_address_t *out)
#define hash_foreach_pair(p, v, body)
Iterate over hash pairs.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
static void vl_api_show_lisp_status_t_handler(vl_api_show_lisp_status_t *mp)
static void setup_message_id_table(api_main_t *am)
string locator_set_name[64]
#define pool_foreach(VAR, POOL)
Iterate through pool.
u8 ip_address_max_len(u8 version)
u8 vnet_lisp_rloc_probe_state_get(void)
clib_error_t * vnet_lisp_enable_disable(u8 is_enable)
reply to lisp_eid_table_vni_dump
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static void send_lisp_map_resolver_details(ip_address_t *ip, vl_api_registration_t *reg, 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.
static void send_eid_table_vni(u32 vni, vl_api_registration_t *reg, u32 context)
vl_api_remote_locator_t rlocs[rloc_num]
locator_set_t * locator_set_pool
int vnet_lisp_set_map_request_mode(u8 mode)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
bool is_add[default=true]
bool is_enable[default=true]
static lisp_cp_main_t * vnet_lisp_cp_get_main()
An API client registration, only in vpp/vlib.
static void vl_api_lisp_map_request_mode_t_handler(vl_api_lisp_map_request_mode_t *mp)
bool is_add[default=true]
bool is_enable[default=true]
gid_dictionary_t mapping_index_by_gid
#define gid_address_vni(_a)
static void vl_api_lisp_eid_table_map_dump_t_handler(vl_api_lisp_eid_table_map_dump_t *mp)
configure or disable LISP PITR node
set LISP map-request mode.
enable/disable LISP RLOC probing
static void vl_api_lisp_eid_table_vni_dump_t_handler(vl_api_lisp_eid_table_vni_dump_t *mp)
if(node->flags &VLIB_NODE_FLAG_TRACE) vnet_interface_output_trace(vm
static void send_lisp_map_server_details(ip_address_t *ip, vl_api_registration_t *reg, u32 context)
Status of lisp pitr, enable or disable.
Dumps all VNIs used in mappings.
sll srl srl sll sra u16x4 i
vl_api_local_locator_t locators[locator_num]
void lisp_gid_put_api(vl_api_eid_t *eid, const gid_address_t *gid)
int vnet_lisp_add_del_map_server(ip_address_t *addr, u8 is_add)
string locator_set_name[64]
string locator_set_name[64]
uword * locator_set_index_by_name
static void vl_api_lisp_pitr_set_locator_set_t_handler(vl_api_lisp_pitr_set_locator_set_t *mp)
static void vl_api_lisp_add_del_map_request_itr_rlocs_t_handler(vl_api_lisp_add_del_map_request_itr_rlocs_t *mp)
int vnet_lisp_clear_all_remote_adjacencies(void)
vl_api_address_t ip_address
vl_api_lisp_locator_set_filter_t filter
#define gid_address_sd_src(_a)
Reply for lisp_add_del_map_request_itr_rlocs.
vl_api_address_t ip_address
void ip_address_decode2(const vl_api_address_t *in, ip_address_t *out)
u8 vnet_lisp_gpe_enable_disable_status(void)
Check if LISP-GPE is enabled.
#define BAD_SW_IF_INDEX_LABEL
u8 vnet_lisp_enable_disable_status(void)
vl_api_lisp_locator_set_filter_t filter
int vnet_lisp_add_del_mreq_itr_rlocs(vnet_lisp_add_del_mreq_itr_rloc_args_t *a)
static void lisp_adjacency_copy(vl_api_lisp_adjacency_t *dst, lisp_adjacency_t *adjs)
static void vl_api_lisp_locator_dump_t_handler(vl_api_lisp_locator_dump_t *mp)
Get LISP map request itr rlocs status.
Request for lisp-gpe protocol status.
static u32 lisp_base_msg_id
Base message ID fot the plugin.
#define vec_free(V)
Free vector's memory (no header).
vl_api_address_t ip_address
void gid_address_copy(gid_address_t *dst, gid_address_t *src)
enable/disable LISP map-register
#define hash_get_mem(h, key)
description fragment has unexpected format
lisp_adjacency_t * vnet_lisp_adjacencies_get_by_vni(u32 vni)
Returns vector of adjacencies.
Get state of LISP RLOC probing.
vl_api_lisp_adjacency_t adjacencies[count]
bool is_enable[default=true]
static void vl_api_lisp_rloc_probe_enable_disable_t_handler(vl_api_lisp_rloc_probe_enable_disable_t *mp)
#define REPLY_MSG_ID_BASE
vl_api_address_t ip_address
vl_api_interface_index_t sw_if_index
enable or disable LISP feature
static void vl_api_show_lisp_map_request_mode_t_handler(vl_api_show_lisp_map_request_mode_t *mp)
int vnet_lisp_add_del_locator_set(vnet_lisp_add_del_locator_set_args_t *a, u32 *ls_result)
#define vec_foreach(var, vec)
Vector iterator.
add or delete map request itr rlocs
bool is_add[default=true]
static void vl_api_lisp_add_del_local_eid_t_handler(vl_api_lisp_add_del_local_eid_t *mp)
static void vl_api_show_lisp_rloc_probe_state_t_handler(vl_api_show_lisp_rloc_probe_state_t *mp)
static void vl_api_show_lisp_use_petr_t_handler(vl_api_show_lisp_use_petr_t *mp)
int vnet_lisp_rloc_probe_enable_disable(u8 is_enable)
configure or disable use of PETR
Request for lisp pitr status.
int vnet_lisp_del_mapping(gid_address_t *eid, u32 *res_map_index)
Removes a mapping.
int vnet_lisp_map_register_enable_disable(u8 is_enable)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u64 gid_dictionary_lookup(gid_dictionary_t *db, gid_address_t *key)
static void vl_api_lisp_enable_disable_t_handler(vl_api_lisp_enable_disable_t *mp)
#define gid_address_type(_a)
void gid_address_free(gid_address_t *a)
#define vec_terminate_c_string(V)
(If necessary) NULL terminate a vector containing a c-string.
static void vl_api_lisp_get_map_request_itr_rlocs_t_handler(vl_api_lisp_get_map_request_itr_rlocs_t *mp)
#define clib_warning(format, args...)
struct _gid_address_t gid_address_t
add or delete map-resolver
Reply for show_lisp_rloc_probe_state.
Request for map request itr rlocs summary status.
static void send_lisp_eid_table_details(mapping_t *mapit, vl_api_registration_t *reg, u32 context, u8 filter)
Request for LISP PETR status.
add or delete locator_set
Request for map lisp locator status.
add or delete remote static mapping
bool is_add[default=true]
bool is_add[default=true]
static void vl_api_lisp_add_del_locator_t_handler(vl_api_lisp_add_del_locator_t *mp)
vl_api_address_t ip_address
bool is_add[default=true]
int vnet_lisp_add_del_map_resolver(vnet_lisp_add_del_map_resolver_args_t *a)
bool is_add[default=true]
static void vl_api_lisp_adjacencies_get_t_handler(vl_api_lisp_adjacencies_get_t *mp)
string locator_set_name[64]
LISP PETR status, enable or disable.
VLIB_API_INIT_FUNCTION(lisp_api_hookup)
static void send_eid_table_map_pair(hash_pair_t *p, vl_api_registration_t *reg, u32 context)
vl_api_interface_index_t sw_if_index
Reply for locator_set add/del.
Request for locator_set summary status.
int vnet_lisp_add_del_locator(vnet_lisp_add_del_locator_set_args_t *a, locator_set_t *ls, u32 *ls_result)
Reply for show_lisp_map_request_mode.
void * vl_msg_api_alloc(int nbytes)