FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
control.h File Reference
+ Include dependency graph for control.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pending_map_request_t
 
struct  pending_map_register_t
 
struct  fwd_entry_t
 
struct  lisp_adjacency_t
 
struct  lisp_msmr_t
 
struct  miss_packet_t
 
struct  lisp_api_l2_arp_entry_t
 
struct  lisp_api_ndp_entry_t
 
struct  lisp_l2_arp_key_t
 
struct  map_records_arg_t
 
struct  lisp_cp_main_t
 
struct  vnet_lisp_add_del_locator_set_args_t
 
struct  vnet_lisp_add_del_mapping_args_t
 
struct  vnet_lisp_add_del_adjacency_args_t
 
struct  vnet_lisp_add_del_map_resolver_args_t
 
struct  vnet_lisp_add_del_mreq_itr_rloc_args_t
 

Macros

#define NUMBER_OF_RETRIES   1
 
#define PENDING_MREQ_EXPIRATION_TIME   3.0 /* seconds */
 
#define PENDING_MREQ_QUEUE_LEN   5
 
#define RLOC_PROBING_INTERVAL   60.0
 
#define QUICK_MAP_REGISTER_MSG_COUNT   5
 
#define QUICK_MAP_REGISTER_INTERVAL   3.0
 
#define MAP_REGISTER_INTERVAL   60.0
 
#define MAX_EXPIRED_MAP_REGISTERS_DEFAULT   3
 
#define PENDING_MREG_EXPIRATION_TIME   3.0 /* seconds */
 
#define MAP_REGISTER_DEFAULT_TTL   86400
 
#define foreach_lisp_flag_bit
 

Typedefs

typedef enum lisp_flag_bits lisp_flag_bits_e
 
typedef enum lisp_flags lisp_flags_e
 

Enumerations

enum  miss_packet_type_t { IP4_MISS_PACKET, IP6_MISS_PACKET }
 
enum  map_request_mode_t { MR_MODE_DST_ONLY = 0, MR_MODE_SRC_DST }
 
enum  lisp_flag_bits { foreach_lisp_flag_bit }
 
enum  lisp_flags { foreach_lisp_flag_bit }
 
enum  lisp_transport_protocol_t { LISP_TRANSPORT_PROTOCOL_UDP = 1, LISP_TRANSPORT_PROTOCOL_API }
 

Functions

clib_error_tlisp_cp_init ()
 
static lisp_cp_main_tvnet_lisp_cp_get_main ()
 
void get_src_and_dst_eids_from_buffer (lisp_cp_main_t *lcm, vlib_buffer_t *b, gid_address_t *src, gid_address_t *dst, u16 type)
 
int vnet_lisp_add_del_locator_set (vnet_lisp_add_del_locator_set_args_t *a, u32 *ls_index)
 
int vnet_lisp_add_del_locator (vnet_lisp_add_del_locator_set_args_t *a, locator_set_t *ls, u32 *ls_index)
 
int vnet_lisp_map_cache_add_del (vnet_lisp_add_del_mapping_args_t *a, u32 *map_index)
 Add/remove mapping to/from map-cache. More...
 
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. More...
 
int vnet_lisp_add_mapping (vnet_lisp_add_del_mapping_args_t *a, locator_t *rlocs, u32 *res_map_index, u8 *is_changed)
 Adds/updates mapping. More...
 
int vnet_lisp_del_mapping (gid_address_t *eid, u32 *res_map_index)
 Removes a mapping. More...
 
int vnet_lisp_add_del_adjacency (vnet_lisp_add_del_adjacency_args_t *a)
 Adds adjacency or removes forwarding entry associated to remote mapping. More...
 
int vnet_lisp_add_del_map_resolver (vnet_lisp_add_del_map_resolver_args_t *a)
 
int vnet_lisp_add_del_map_server (ip_address_t *addr, u8 is_add)
 
clib_error_tvnet_lisp_enable_disable (u8 is_enabled)
 
u8 vnet_lisp_enable_disable_status (void)
 
void vnet_lisp_create_retry_process (lisp_cp_main_t *lcm)
 
int vnet_lisp_pitr_set_locator_set (u8 *locator_set_name, u8 is_add)
 
int vnet_lisp_use_petr (ip_address_t *ip, u8 is_add)
 Configure Proxy-ETR. More...
 
int vnet_lisp_add_del_mreq_itr_rlocs (vnet_lisp_add_del_mreq_itr_rloc_args_t *a)
 
int vnet_lisp_clear_all_remote_adjacencies (void)
 
int vnet_lisp_eid_table_map (u32 vni, u32 vrf, u8 is_l2, u8 is_add)
 
int vnet_lisp_add_del_map_table_key (gid_address_t *eid, char *key, u8 is_add)
 
int vnet_lisp_set_map_request_mode (u8 mode)
 
u8 vnet_lisp_get_map_request_mode (void)
 
lisp_adjacency_tvnet_lisp_adjacencies_get_by_vni (u32 vni)
 Returns vector of adjacencies. More...
 
int vnet_lisp_rloc_probe_enable_disable (u8 is_enable)
 
int vnet_lisp_map_register_enable_disable (u8 is_enable)
 
u8 vnet_lisp_map_register_state_get (void)
 
u8 vnet_lisp_rloc_probe_state_get (void)
 
int vnet_lisp_add_del_l2_arp_ndp_entry (gid_address_t *key, u8 *mac, u8 is_add)
 
u32vnet_lisp_l2_arp_bds_get (void)
 
lisp_api_l2_arp_entry_tvnet_lisp_l2_arp_entries_get_by_bd (u32 bd)
 
int vnet_lisp_nsh_set_locator_set (u8 *locator_set_name, u8 is_add)
 
int vnet_lisp_map_register_set_ttl (u32 ttl)
 
u32 vnet_lisp_map_register_get_ttl (void)
 
int vnet_lisp_map_register_fallback_threshold_set (u32 value)
 
u32 vnet_lisp_map_register_fallback_threshold_get (void)
 
u32vnet_lisp_ndp_bds_get (void)
 
lisp_api_ndp_entry_tvnet_lisp_ndp_entries_get_by_bd (u32 bd)
 
u32 vnet_lisp_set_transport_protocol (u8 protocol)
 
lisp_transport_protocol_t vnet_lisp_get_transport_protocol (void)
 
int vnet_lisp_enable_disable_xtr_mode (u8 is_enabled)
 
int vnet_lisp_enable_disable_pitr_mode (u8 is_enabled)
 
int vnet_lisp_enable_disable_petr_mode (u8 is_enabled)
 
u8 vnet_lisp_get_xtr_mode (void)
 
u8 vnet_lisp_get_pitr_mode (void)
 
u8 vnet_lisp_get_petr_mode (void)
 
map_records_arg_tparse_map_reply (vlib_buffer_t *b)
 
static mapping_tlisp_get_petr_mapping (lisp_cp_main_t *lcm)
 

Variables

lisp_cp_main_t lisp_control_main
 
vlib_node_registration_t lisp_cp_input_node
 (constructor) VLIB_REGISTER_NODE (lisp_cp_input_node) More...
 
vlib_node_registration_t lisp_cp_lookup_ip4_node
 (constructor) VLIB_REGISTER_NODE (lisp_cp_lookup_ip4_node) More...
 
vlib_node_registration_t lisp_cp_lookup_ip6_node
 (constructor) VLIB_REGISTER_NODE (lisp_cp_lookup_ip6_node) More...
 

Macro Definition Documentation

◆ foreach_lisp_flag_bit

foreach_lisp_flag_bit
Value:
_(USE_PETR, "Use Proxy-ETR") \
_(XTR_MODE, "ITR/ETR mode") \
_(PETR_MODE, "Proxy-ETR mode") \
_(PITR_MODE, "Proxy-ITR mode") \
_(STATS_ENABLED, "Statistics enabled")

Definition at line 119 of file control.h.

◆ MAP_REGISTER_DEFAULT_TTL

#define MAP_REGISTER_DEFAULT_TTL   86400

Definition at line 45 of file control.h.

◆ MAP_REGISTER_INTERVAL

#define MAP_REGISTER_INTERVAL   60.0

Definition at line 37 of file control.h.

◆ MAX_EXPIRED_MAP_REGISTERS_DEFAULT

#define MAX_EXPIRED_MAP_REGISTERS_DEFAULT   3

Definition at line 40 of file control.h.

◆ NUMBER_OF_RETRIES

#define NUMBER_OF_RETRIES   1

Definition at line 24 of file control.h.

◆ PENDING_MREG_EXPIRATION_TIME

#define PENDING_MREG_EXPIRATION_TIME   3.0 /* seconds */

Definition at line 42 of file control.h.

◆ PENDING_MREQ_EXPIRATION_TIME

#define PENDING_MREQ_EXPIRATION_TIME   3.0 /* seconds */

Definition at line 25 of file control.h.

◆ PENDING_MREQ_QUEUE_LEN

#define PENDING_MREQ_QUEUE_LEN   5

Definition at line 26 of file control.h.

◆ QUICK_MAP_REGISTER_INTERVAL

#define QUICK_MAP_REGISTER_INTERVAL   3.0

Definition at line 34 of file control.h.

◆ QUICK_MAP_REGISTER_MSG_COUNT

#define QUICK_MAP_REGISTER_MSG_COUNT   5

Definition at line 33 of file control.h.

◆ RLOC_PROBING_INTERVAL

#define RLOC_PROBING_INTERVAL   60.0

Definition at line 28 of file control.h.

Typedef Documentation

◆ lisp_flag_bits_e

◆ lisp_flags_e

typedef enum lisp_flags lisp_flags_e

Enumeration Type Documentation

◆ lisp_flag_bits

Enumerator
foreach_lisp_flag_bit 

Definition at line 126 of file control.h.

◆ lisp_flags

enum lisp_flags
Enumerator
foreach_lisp_flag_bit 

Definition at line 133 of file control.h.

◆ lisp_transport_protocol_t

Enumerator
LISP_TRANSPORT_PROTOCOL_UDP 
LISP_TRANSPORT_PROTOCOL_API 

Definition at line 146 of file control.h.

◆ map_request_mode_t

Enumerator
MR_MODE_DST_ONLY 
MR_MODE_SRC_DST 

Definition at line 112 of file control.h.

◆ miss_packet_type_t

Enumerator
IP4_MISS_PACKET 
IP6_MISS_PACKET 

Definition at line 77 of file control.h.

Function Documentation

◆ get_src_and_dst_eids_from_buffer()

void get_src_and_dst_eids_from_buffer ( lisp_cp_main_t lcm,
vlib_buffer_t b,
gid_address_t src,
gid_address_t dst,
u16  type 
)

Definition at line 3300 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lisp_cp_init()

clib_error_t* lisp_cp_init ( )

◆ lisp_get_petr_mapping()

static mapping_t* lisp_get_petr_mapping ( lisp_cp_main_t lcm)
inlinestatic

Definition at line 434 of file control.h.

+ Here is the caller graph for this function:

◆ parse_map_reply()

map_records_arg_t* parse_map_reply ( vlib_buffer_t b)

Definition at line 4340 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_add_del_adjacency()

int vnet_lisp_add_del_adjacency ( vnet_lisp_add_del_adjacency_args_t a)

Adds adjacency or removes forwarding entry associated to remote mapping.

Note that adjacencies are not stored, they only result in forwarding entries being created.

Definition at line 1474 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_add_del_l2_arp_ndp_entry()

int vnet_lisp_add_del_l2_arp_ndp_entry ( gid_address_t key,
u8 mac,
u8  is_add 
)

Definition at line 1026 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_add_del_local_mapping()

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.

Definition at line 870 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_add_del_locator()

int vnet_lisp_add_del_locator ( vnet_lisp_add_del_locator_set_args_t a,
locator_set_t ls,
u32 ls_index 
)

Definition at line 1927 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_add_del_locator_set()

int vnet_lisp_add_del_locator_set ( vnet_lisp_add_del_locator_set_args_t a,
u32 ls_index 
)

Definition at line 2031 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_add_del_map_resolver()

int vnet_lisp_add_del_map_resolver ( vnet_lisp_add_del_map_resolver_args_t a)

Definition at line 2313 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_add_del_map_server()

int vnet_lisp_add_del_map_server ( ip_address_t addr,
u8  is_add 
)

Definition at line 666 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_add_del_map_table_key()

int vnet_lisp_add_del_map_table_key ( gid_address_t eid,
char *  key,
u8  is_add 
)

◆ vnet_lisp_add_del_mreq_itr_rlocs()

int vnet_lisp_add_del_mreq_itr_rlocs ( vnet_lisp_add_del_mreq_itr_rloc_args_t a)

Definition at line 2376 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_add_mapping()

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.

Does not program forwarding.

Parameters
aparameters of the new mapping
rlocsvector of remote locators
res_map_indexindex of the newly created mapping
locators_changedindicator if locators were updated in the mapping
Returns
return code

Definition at line 1265 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_adjacencies_get_by_vni()

lisp_adjacency_t* vnet_lisp_adjacencies_get_by_vni ( u32  vni)

Returns vector of adjacencies.

The caller must free the vector returned by this function.

Parameters
vnivirtual network identifier
Returns
vector of adjacencies

Definition at line 612 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_clear_all_remote_adjacencies()

int vnet_lisp_clear_all_remote_adjacencies ( void  )

Definition at line 1423 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_cp_get_main()

static lisp_cp_main_t* vnet_lisp_cp_get_main ( )
inlinestatic

Definition at line 304 of file control.h.

+ Here is the call graph for this function:

◆ vnet_lisp_create_retry_process()

void vnet_lisp_create_retry_process ( lisp_cp_main_t lcm)

Definition at line 4907 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_del_mapping()

int vnet_lisp_del_mapping ( gid_address_t eid,
u32 res_map_index 
)

Removes a mapping.

Does not program forwarding.

Parameters
eidend-host identifier
res_map_indexindex of the removed mapping
Returns
return code

Definition at line 1374 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_eid_table_map()

int vnet_lisp_eid_table_map ( u32  vni,
u32  vrf,
u8  is_l2,
u8  is_add 
)

Definition at line 1065 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_enable_disable()

clib_error_t* vnet_lisp_enable_disable ( u8  is_enabled)

Definition at line 2241 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_enable_disable_petr_mode()

int vnet_lisp_enable_disable_petr_mode ( u8  is_enabled)

Definition at line 5005 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_enable_disable_pitr_mode()

int vnet_lisp_enable_disable_pitr_mode ( u8  is_enabled)

Definition at line 4976 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_enable_disable_status()

u8 vnet_lisp_enable_disable_status ( void  )

Definition at line 2306 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_enable_disable_xtr_mode()

int vnet_lisp_enable_disable_xtr_mode ( u8  is_enabled)

Definition at line 4939 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_get_map_request_mode()

u8 vnet_lisp_get_map_request_mode ( void  )

Definition at line 57 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_get_petr_mode()

u8 vnet_lisp_get_petr_mode ( void  )

Definition at line 5050 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_get_pitr_mode()

u8 vnet_lisp_get_pitr_mode ( void  )

Definition at line 5043 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_get_transport_protocol()

lisp_transport_protocol_t vnet_lisp_get_transport_protocol ( void  )

Definition at line 4932 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_get_xtr_mode()

u8 vnet_lisp_get_xtr_mode ( void  )

Definition at line 5036 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_l2_arp_bds_get()

u32* vnet_lisp_l2_arp_bds_get ( void  )

Definition at line 916 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_l2_arp_entries_get_by_bd()

lisp_api_l2_arp_entry_t* vnet_lisp_l2_arp_entries_get_by_bd ( u32  bd)

Definition at line 976 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_map_cache_add_del()

int vnet_lisp_map_cache_add_del ( vnet_lisp_add_del_mapping_args_t a,
u32 map_index_result 
)

Add/remove mapping to/from map-cache.

Overwriting not allowed.

Definition at line 717 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_map_register_enable_disable()

int vnet_lisp_map_register_enable_disable ( u8  is_enable)

Definition at line 2175 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_map_register_fallback_threshold_get()

u32 vnet_lisp_map_register_fallback_threshold_get ( void  )

Definition at line 1669 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_map_register_fallback_threshold_set()

int vnet_lisp_map_register_fallback_threshold_set ( u32  value)

Definition at line 1656 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_map_register_get_ttl()

u32 vnet_lisp_map_register_get_ttl ( void  )

Definition at line 2369 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_map_register_set_ttl()

int vnet_lisp_map_register_set_ttl ( u32  ttl)

Definition at line 2361 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_map_register_state_get()

u8 vnet_lisp_map_register_state_get ( void  )

Definition at line 409 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_ndp_bds_get()

u32* vnet_lisp_ndp_bds_get ( void  )

Definition at line 939 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_ndp_entries_get_by_bd()

lisp_api_ndp_entry_t* vnet_lisp_ndp_entries_get_by_bd ( u32  bd)

Definition at line 1011 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_nsh_set_locator_set()

int vnet_lisp_nsh_set_locator_set ( u8 locator_set_name,
u8  is_add 
)

Definition at line 1566 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_pitr_set_locator_set()

int vnet_lisp_pitr_set_locator_set ( u8 locator_set_name,
u8  is_add 
)

Definition at line 1617 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_rloc_probe_enable_disable()

int vnet_lisp_rloc_probe_enable_disable ( u8  is_enable)

Definition at line 2166 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_rloc_probe_state_get()

u8 vnet_lisp_rloc_probe_state_get ( void  )

Definition at line 416 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_set_map_request_mode()

int vnet_lisp_set_map_request_mode ( u8  mode)

Definition at line 1545 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_set_transport_protocol()

u32 vnet_lisp_set_transport_protocol ( u8  protocol)

Definition at line 4919 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_lisp_use_petr()

int vnet_lisp_use_petr ( ip_address_t ip,
u8  is_add 
)

Configure Proxy-ETR.

Parameters
ipPETR's IP address
is_addFlag that indicates if this is an addition or removal

return 0 on success

Definition at line 1684 of file control.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ lisp_control_main

lisp_cp_main_t lisp_control_main

Definition at line 37 of file control.c.

◆ lisp_cp_input_node

vlib_node_registration_t lisp_cp_input_node

(constructor) VLIB_REGISTER_NODE (lisp_cp_input_node)

Definition at line 4485 of file control.c.

◆ lisp_cp_lookup_ip4_node

vlib_node_registration_t lisp_cp_lookup_ip4_node

(constructor) VLIB_REGISTER_NODE (lisp_cp_lookup_ip4_node)

Definition at line 3636 of file control.c.

◆ lisp_cp_lookup_ip6_node

vlib_node_registration_t lisp_cp_lookup_ip6_node

(constructor) VLIB_REGISTER_NODE (lisp_cp_lookup_ip6_node)

Definition at line 3656 of file control.c.