FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
nhrp.c File Reference
+ Include dependency graph for nhrp.c:

Go to the source code of this file.

Data Structures

struct  nhrp_key_t_
 
struct  nhrp_entry_t_
 

Macros

#define NHRP_NOTIFY(_ne, _fn)
 

Typedefs

typedef struct nhrp_key_t_ nhrp_key_t
 

Functions

u32 nhrp_entry_get_sw_if_index (const nhrp_entry_t *ne)
 accessors for the opaque struct More...
 
u32 nhrp_entry_get_fib_index (const nhrp_entry_t *ne)
 
const ip46_address_t * nhrp_entry_get_peer (const nhrp_entry_t *ne)
 
const fib_prefix_tnhrp_entry_get_nh (const nhrp_entry_t *ne)
 
void nhrp_entry_adj_stack (const nhrp_entry_t *ne, adj_index_t ai)
 
static adj_walk_rc_t nhrp_entry_add_adj_walk (adj_index_t ai, void *ctx)
 
static adj_walk_rc_t nhrp_entry_del_adj_walk (adj_index_t ai, void *ctx)
 
nhrp_entry_tnhrp_entry_get (index_t nei)
 
nhrp_entry_tnhrp_entry_find (u32 sw_if_index, const ip46_address_t *peer)
 
int nhrp_entry_add (u32 sw_if_index, const ip46_address_t *peer, u32 nh_table_id, const ip46_address_t *nh)
 Create a new NHRP entry. More...
 
int nhrp_entry_del (u32 sw_if_index, const ip46_address_t *peer)
 
u8format_nhrp_entry (u8 *s, va_list *args)
 
void nhrp_walk (nhrp_walk_cb_t fn, void *ctx)
 
void nhrp_walk_itf (u32 sw_if_index, nhrp_walk_cb_t fn, void *ctx)
 
void nhrp_register (const nhrp_vft_t *vft)
 
static clib_error_tnhrp_init (vlib_main_t *vm)
 

Variables

static uwordnhrp_db
 
static nhrp_entry_tnhrp_pool
 
static nhrp_vft_tnhrp_vfts
 

Macro Definition Documentation

◆ NHRP_NOTIFY

#define NHRP_NOTIFY (   _ne,
  _fn 
)
Value:
{ \
nhrp_vft_t *_vft; \
vec_foreach(_vft, nhrp_vfts) { \
if (_vft->_fn) { \
_vft->_fn(_ne); \
} \
} \
}
static nhrp_vft_t * nhrp_vfts
Definition: nhrp.c:38

Definition at line 40 of file nhrp.c.

Typedef Documentation

◆ nhrp_key_t

typedef struct nhrp_key_t_ nhrp_key_t

Function Documentation

◆ format_nhrp_entry()

u8* format_nhrp_entry ( u8 s,
va_list *  args 
)

Definition at line 199 of file nhrp.c.

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

◆ nhrp_entry_add()

int nhrp_entry_add ( u32  sw_if_index,
const ip46_address_t *  peer,
u32  nh_table_id,
const ip46_address_t *  nh 
)

Create a new NHRP entry.

Definition at line 119 of file nhrp.c.

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

◆ nhrp_entry_add_adj_walk()

static adj_walk_rc_t nhrp_entry_add_adj_walk ( adj_index_t  ai,
void *  ctx 
)
static

Definition at line 80 of file nhrp.c.

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

◆ nhrp_entry_adj_stack()

void nhrp_entry_adj_stack ( const nhrp_entry_t ne,
adj_index_t  ai 
)

Definition at line 74 of file nhrp.c.

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

◆ nhrp_entry_del()

int nhrp_entry_del ( u32  sw_if_index,
const ip46_address_t *  peer 
)

Definition at line 173 of file nhrp.c.

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

◆ nhrp_entry_del_adj_walk()

static adj_walk_rc_t nhrp_entry_del_adj_walk ( adj_index_t  ai,
void *  ctx 
)
static

Definition at line 88 of file nhrp.c.

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

◆ nhrp_entry_find()

nhrp_entry_t* nhrp_entry_find ( u32  sw_if_index,
const ip46_address_t *  peer 
)

Definition at line 102 of file nhrp.c.

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

◆ nhrp_entry_get()

nhrp_entry_t* nhrp_entry_get ( index_t  nei)

Definition at line 96 of file nhrp.c.

+ Here is the caller graph for this function:

◆ nhrp_entry_get_fib_index()

u32 nhrp_entry_get_fib_index ( const nhrp_entry_t ne)

Definition at line 56 of file nhrp.c.

+ Here is the caller graph for this function:

◆ nhrp_entry_get_nh()

const fib_prefix_t* nhrp_entry_get_nh ( const nhrp_entry_t ne)

Definition at line 68 of file nhrp.c.

+ Here is the caller graph for this function:

◆ nhrp_entry_get_peer()

const ip46_address_t* nhrp_entry_get_peer ( const nhrp_entry_t ne)

Definition at line 62 of file nhrp.c.

+ Here is the caller graph for this function:

◆ nhrp_entry_get_sw_if_index()

u32 nhrp_entry_get_sw_if_index ( const nhrp_entry_t ne)

accessors for the opaque struct

Definition at line 50 of file nhrp.c.

+ Here is the caller graph for this function:

◆ nhrp_init()

static clib_error_t* nhrp_init ( vlib_main_t vm)
static

Definition at line 253 of file nhrp.c.

◆ nhrp_register()

void nhrp_register ( const nhrp_vft_t vft)

Definition at line 247 of file nhrp.c.

+ Here is the caller graph for this function:

◆ nhrp_walk()

void nhrp_walk ( nhrp_walk_cb_t  fn,
void *  ctx 
)

Definition at line 220 of file nhrp.c.

+ Here is the caller graph for this function:

◆ nhrp_walk_itf()

void nhrp_walk_itf ( u32  sw_if_index,
nhrp_walk_cb_t  fn,
void *  ctx 
)

Definition at line 233 of file nhrp.c.

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

Variable Documentation

◆ nhrp_db

uword* nhrp_db
static

Definition at line 36 of file nhrp.c.

◆ nhrp_pool

nhrp_entry_t* nhrp_pool
static

Definition at line 37 of file nhrp.c.

◆ nhrp_vfts

nhrp_vft_t* nhrp_vfts
static

Definition at line 38 of file nhrp.c.