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

Go to the source code of this file.

Functions

adj_index_t adj_glean_add_or_lock (fib_protocol_t proto, vnet_link_t linkt, u32 sw_if_index, const fib_prefix_t *conn)
 Glean Adjacency. More...
 
adj_index_t adj_glean_get (fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh_addr)
 Get an existing glean. More...
 
void adj_glean_update_rewrite (adj_index_t adj_index)
 adj_glean_update_rewrite More...
 
void adj_glean_update_rewrite_itf (u32 sw_if_index)
 
const ip46_address_t * adj_glean_get_src (fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh_addr)
 Return the source address from the glean. More...
 
u8format_adj_glean (u8 *s, va_list *ap)
 Format/display a glean adjacency. More...
 
void adj_glean_walk (u32 sw_if_index, adj_walk_cb_t, void *)
 Walk all the gleans on an interface. More...
 
void adj_glean_module_init (void)
 Module initialisation. More...
 
u32 adj_glean_db_size (void)
 Return the size of the adjacency database. More...
 

Function Documentation

◆ adj_glean_add_or_lock()

adj_index_t adj_glean_add_or_lock ( fib_protocol_t  proto,
vnet_link_t  linkt,
u32  sw_if_index,
const fib_prefix_t conn 
)

Glean Adjacency.

A gleean adjacency represent the need to discover new peers on an attached link. Packets that hit a glean adjacency will generate an ARP/ND packet addessesed to the packet's destination address. Note this is different to an incomplete neighbour adjacency, which does not send ARP/ND requests to the packet's destination address, but instead to the next-hop address of the adjacency itself.

Add (and lock) a new or lock an existing glean adjacency

Parameters
protoThe protocol for the neighbours that we wish to glean
sw_if_indexThe interface on which to glean
nh_addrthe address applied to the interface on which to glean. This as the source address in packets when the ARP/ND packet is sent

Definition at line 112 of file adj_glean.c.

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

◆ adj_glean_db_size()

u32 adj_glean_db_size ( void  )

Return the size of the adjacency database.

for testing purposes

Definition at line 445 of file adj_glean.c.

+ Here is the call graph for this function:

◆ adj_glean_get()

adj_index_t adj_glean_get ( fib_protocol_t  proto,
u32  sw_if_index,
const ip46_address_t *  nh_addr 
)

Get an existing glean.

Returns
INVALID if it does not exist

Definition at line 231 of file adj_glean.c.

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

◆ adj_glean_get_src()

const ip46_address_t* adj_glean_get_src ( fib_protocol_t  proto,
u32  sw_if_index,
const ip46_address_t *  nh_addr 
)

Return the source address from the glean.

Definition at line 257 of file adj_glean.c.

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

◆ adj_glean_module_init()

void adj_glean_module_init ( void  )

Module initialisation.

Definition at line 508 of file adj_glean.c.

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

◆ adj_glean_update_rewrite()

void adj_glean_update_rewrite ( adj_index_t  adj_index)

adj_glean_update_rewrite

Called by an adjacency provider (an interface type) to configure a glean adj (i.e. and adjacency linked to a connected prefix) to its default behaviour. Other interface types (i.e. 6RD tunnels) can can choose not to use glean behaviour on an adjacency liked to a connected prefix.

Definition at line 163 of file adj_glean.c.

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

◆ adj_glean_update_rewrite_itf()

void adj_glean_update_rewrite_itf ( u32  sw_if_index)

Definition at line 190 of file adj_glean.c.

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

◆ adj_glean_walk()

void adj_glean_walk ( u32  sw_if_index,
adj_walk_cb_t  ,
void *   
)

Walk all the gleans on an interface.

Definition at line 196 of file adj_glean.c.

+ Here is the caller graph for this function:

◆ format_adj_glean()

u8* format_adj_glean ( u8 s,
va_list *  ap 
)

Format/display a glean adjacency.

Definition at line 429 of file adj_glean.c.

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