FD.io VPP  v21.06
Vector Packet Processing
lcp_interface.h File Reference
+ Include dependency graph for lcp_interface.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lcp_itf_phy_adj
 
struct  lcp_itf_pair_t_
 A pair of interfaces. More...
 

Macros

#define foreach_lcp_itf_pair_flag   _ (STALE, 0, "stale")
 
#define N_LCP_ITF_HOST   (LCP_ITF_HOST_TUN + 1)
 

Typedefs

typedef enum lip_flag_t_ lip_flag_t
 
typedef struct lcp_itf_phy_adj lcp_itf_phy_adj_t
 
typedef struct lcp_itf_pair_t_ lcp_itf_pair_t
 A pair of interfaces. More...
 
typedef walk_rc_t(* lcp_itf_pair_walk_cb_t) (index_t index, void *ctx)
 Callback function invoked during a walk of all interface-pairs. More...
 

Enumerations

enum  lip_flag_t_ { foreach_lcp_itf_pair_flag }
 
enum  lip_host_type_t { LCP_ITF_HOST_TAP = 0, LCP_ITF_HOST_TUN = 1 }
 

Functions

u8format_lcp_itf_pair (u8 *s, va_list *args)
 
void lcp_itf_pair_show (u32 phy_sw_if_index)
 
u32 lcp_itf_num_pairs (void)
 
lcp_itf_pair_tlcp_itf_pair_get (index_t index)
 Get an interface-pair object from its VPP index. More...
 
index_t lcp_itf_pair_find_by_vif (u32 vif_index)
 Find a interface-pair object from the host interface. More...
 
int lcp_itf_pair_add (u32 host_sw_if_index, u32 phy_sw_if_index, u8 *host_name, u32 host_index, lip_host_type_t host_type, u8 *ns)
 Create an interface-pair. More...
 
int lcp_itf_pair_add_sub (u32 vif, u8 *host_name, u32 sub_sw_if_index, u32 phy_sw_if_index, u8 *ns)
 
int lcp_itf_pair_del (u32 phy_sw_if_index)
 
int lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name, lip_host_type_t host_if_type, u8 *ns, u32 *host_sw_if_indexp)
 Create an interface-pair from PHY sw_if_index and tap name. More...
 
int lcp_itf_pair_delete (u32 phy_sw_if_index)
 Delete a LCP_ITF_PAIR. More...
 
void lcp_itf_pair_walk (lcp_itf_pair_walk_cb_t cb, void *ctx)
 Walk/visit each of the interface pairs. More...
 
int lcp_itf_pair_replace_begin (void)
 Begin and End the replace process. More...
 
int lcp_itf_pair_replace_end (void)
 
static index_t lcp_itf_pair_find_by_phy (u32 phy_sw_if_index)
 
static index_t lcp_itf_pair_find_by_host (u32 host_sw_if_index)
 
void lcp_set_auto_intf (u8 is_auto)
 manage interface auto creation More...
 
int lcp_auto_intf (void)
 

Variables

lcp_itf_pair_tlcp_itf_pair_pool
 Pool of LIP objects. More...
 
vlib_node_registration_t lcp_ethernet_node
 
index_tlip_db_by_phy
 Retreive the pair in the DP. More...
 
u32lip_db_by_host
 

Macro Definition Documentation

◆ foreach_lcp_itf_pair_flag

#define foreach_lcp_itf_pair_flag   _ (STALE, 0, "stale")

Definition at line 24 of file lcp_interface.h.

◆ N_LCP_ITF_HOST

#define N_LCP_ITF_HOST   (LCP_ITF_HOST_TUN + 1)

Definition at line 39 of file lcp_interface.h.

Typedef Documentation

◆ lcp_itf_pair_t

A pair of interfaces.

◆ lcp_itf_pair_walk_cb_t

typedef walk_rc_t(* lcp_itf_pair_walk_cb_t) (index_t index, void *ctx)

Callback function invoked during a walk of all interface-pairs.

Definition at line 112 of file lcp_interface.h.

◆ lcp_itf_phy_adj_t

◆ lip_flag_t

typedef enum lip_flag_t_ lip_flag_t

Enumeration Type Documentation

◆ lip_flag_t_

Enumerator
foreach_lcp_itf_pair_flag 

Definition at line 26 of file lcp_interface.h.

◆ lip_host_type_t

Enumerator
LCP_ITF_HOST_TAP 
LCP_ITF_HOST_TUN 

Definition at line 33 of file lcp_interface.h.

Function Documentation

◆ format_lcp_itf_pair()

u8* format_lcp_itf_pair ( u8 s,
va_list *  args 
)

Definition at line 70 of file lcp_interface.c.

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

◆ lcp_auto_intf()

int lcp_auto_intf ( void  )

Definition at line 53 of file lcp_api.c.

+ Here is the caller graph for this function:

◆ lcp_itf_num_pairs()

u32 lcp_itf_num_pairs ( void  )

Definition at line 48 of file lcp_interface.c.

+ Here is the call graph for this function:

◆ lcp_itf_pair_add()

int lcp_itf_pair_add ( u32  host_sw_if_index,
u32  phy_sw_if_index,
u8 host_name,
u32  host_index,
lip_host_type_t  host_type,
u8 ns 
)

Create an interface-pair.

Returns
error code

Definition at line 226 of file lcp_interface.c.

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

◆ lcp_itf_pair_add_sub()

int lcp_itf_pair_add_sub ( u32  vif,
u8 host_name,
u32  sub_sw_if_index,
u32  phy_sw_if_index,
u8 ns 
)

Definition at line 160 of file lcp_interface.c.

+ Here is the call graph for this function:

◆ lcp_itf_pair_create()

int lcp_itf_pair_create ( u32  phy_sw_if_index,
u8 host_if_name,
lip_host_type_t  host_if_type,
u8 ns,
u32 host_sw_if_indexp 
)

Create an interface-pair from PHY sw_if_index and tap name.

Returns
error code

Definition at line 642 of file lcp_interface.c.

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

◆ lcp_itf_pair_del()

int lcp_itf_pair_del ( u32  phy_sw_if_index)

Definition at line 380 of file lcp_interface.c.

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

◆ lcp_itf_pair_delete()

int lcp_itf_pair_delete ( u32  phy_sw_if_index)

Delete a LCP_ITF_PAIR.

Definition at line 460 of file lcp_interface.c.

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

◆ lcp_itf_pair_find_by_host()

static index_t lcp_itf_pair_find_by_host ( u32  host_sw_if_index)
inlinestatic

Definition at line 140 of file lcp_interface.h.

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

◆ lcp_itf_pair_find_by_phy()

static index_t lcp_itf_pair_find_by_phy ( u32  phy_sw_if_index)
inlinestatic

Definition at line 132 of file lcp_interface.h.

+ Here is the caller graph for this function:

◆ lcp_itf_pair_find_by_vif()

index_t lcp_itf_pair_find_by_vif ( u32  vif_index)

Find a interface-pair object from the host interface.

Parameters
host_sw_if_indexhost interface
Returns
VPP's object index

Definition at line 147 of file lcp_interface.c.

◆ lcp_itf_pair_get()

lcp_itf_pair_t* lcp_itf_pair_get ( index_t  index)

Get an interface-pair object from its VPP index.

Definition at line 141 of file lcp_interface.c.

+ Here is the caller graph for this function:

◆ lcp_itf_pair_replace_begin()

int lcp_itf_pair_replace_begin ( void  )

Begin and End the replace process.

Definition at line 846 of file lcp_interface.c.

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

◆ lcp_itf_pair_replace_end()

int lcp_itf_pair_replace_end ( void  )

Definition at line 873 of file lcp_interface.c.

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

◆ lcp_itf_pair_show()

void lcp_itf_pair_show ( u32  phy_sw_if_index)

Definition at line 117 of file lcp_interface.c.

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

◆ lcp_itf_pair_walk()

void lcp_itf_pair_walk ( lcp_itf_pair_walk_cb_t  cb,
void *  ctx 
)

Walk/visit each of the interface pairs.

Definition at line 475 of file lcp_interface.c.

+ Here is the caller graph for this function:

◆ lcp_set_auto_intf()

void lcp_set_auto_intf ( u8  is_auto)

manage interface auto creation

Definition at line 45 of file lcp_api.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ lcp_ethernet_node

vlib_node_registration_t lcp_ethernet_node

◆ lcp_itf_pair_pool

lcp_itf_pair_t* lcp_itf_pair_pool

Pool of LIP objects.

Definition at line 45 of file lcp_interface.c.

◆ lip_db_by_host

u32* lip_db_by_host

Definition at line 61 of file lcp_interface.c.

◆ lip_db_by_phy

index_t* lip_db_by_phy

Retreive the pair in the DP.

Definition at line 60 of file lcp_interface.c.