FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
adj_mcast.h File Reference
+ Include dependency graph for adj_mcast.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_mcast_add_or_lock (fib_protocol_t proto, vnet_link_t link_type, u32 sw_if_index)
 Mcast Adjacency. More...
 
void adj_mcast_update_rewrite (adj_index_t adj_index, u8 *rewrite, u8 offset)
 Update the rewrite string for an existing adjacecny. More...
 
void adj_mcast_midchain_update_rewrite (adj_index_t adj_index, adj_midchain_fixup_t fixup, const void *fixup_data, adj_flags_t flags, u8 *rewrite, u8 offset, u32 mask)
 Update the rewrite string for an existing adjacecny and Convert the adjacency into a midchain. More...
 
void adj_mcast_walk (u32 sw_if_index, fib_protocol_t adj_nh_proto, adj_walk_cb_t cb, void *ctx)
 Walk the multicast Adjacencies on a given interface. More...
 
u8format_adj_mcast (u8 *s, va_list *ap)
 Format/display a mcast adjacency. More...
 
u8format_adj_mcast_midchain (u8 *s, va_list *ap)
 
u32 adj_mcast_db_size (void)
 Get the sze of the mcast adj DB. More...
 
void adj_mcast_module_init (void)
 Module initialisation. More...
 

Function Documentation

◆ adj_mcast_add_or_lock()

adj_index_t adj_mcast_add_or_lock ( fib_protocol_t  proto,
vnet_link_t  link_type,
u32  sw_if_index 
)

Mcast Adjacency.

The multicast adjacency forwards IP traffic on an interface toward a multicast group address. This is a different type of adjacency to a unicast adjacency since the application of the MAC header is different, and so the VLIB node visited is also different. DPO types have different VLIB nodes.

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

Parameters
protoThe protocol for the neighbours that we wish to mcast
link_typeA description of the protocol of the packets that will forward through this adj. On an ethernet interface this is the MAC header's ether-type
sw_if_indexThe interface on which to mcast

Definition at line 51 of file adj_mcast.c.

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

◆ adj_mcast_db_size()

u32 adj_mcast_db_size ( void  )

Get the sze of the mcast adj DB.

Test purposes only.

Get the sze of the mcast adj DB.

This is only for testing purposes so an efficient implementation is not needed

Definition at line 451 of file adj_mcast.c.

◆ adj_mcast_midchain_update_rewrite()

void adj_mcast_midchain_update_rewrite ( adj_index_t  adj_index,
adj_midchain_fixup_t  fixup,
const void *  fixup_data,
adj_flags_t  flags,
u8 rewrite,
u8  offset,
u32  mask 
)

Update the rewrite string for an existing adjacecny and Convert the adjacency into a midchain.

Parameters
Theindex of the adj to update
fixupThe function that will be invoked at paket switch time to 'fixup' the rewrite applied with necessary per-packet info (i.e. length, checksums).
fixup_dataContext data set by the caller that is provided as an argument in the fixup function.
flagsFlags controlling the adjacency behaviour
Thenew rewrite

Update the rewrite string for an existing adjacecny and Convert the adjacency into a midchain.

Update the adjacency's rewrite string. A NULL string implies the rewrite is reset (i.e. when ARP/ND entry is gone). NB: the adj being updated may be handling traffic in the DP.

Definition at line 136 of file adj_mcast.c.

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

◆ adj_mcast_module_init()

void adj_mcast_module_init ( void  )

Module initialisation.

Definition at line 474 of file adj_mcast.c.

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

◆ adj_mcast_update_rewrite()

void adj_mcast_update_rewrite ( adj_index_t  adj_index,
u8 rewrite,
u8  offset 
)

Update the rewrite string for an existing adjacecny.

Parameters
Theindex of the adj to update
Thenew rewrite
Theoffset in the rewrite a which to write in packet's IP Address

Update the rewrite string for an existing adjacecny.

Update the adjacency's rewrite string. A NULL string implies the rewrite is reset (i.e. when ARP/ND entry is gone). NB: the adj being updated may be handling traffic in the DP.

Definition at line 102 of file adj_mcast.c.

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

◆ adj_mcast_walk()

void adj_mcast_walk ( u32  sw_if_index,
fib_protocol_t  adj_nh_proto,
adj_walk_cb_t  cb,
void *  ctx 
)

Walk the multicast Adjacencies on a given interface.

Definition at line 313 of file adj_mcast.c.

+ Here is the caller graph for this function:

◆ format_adj_mcast()

u8* format_adj_mcast ( u8 s,
va_list *  ap 
)

Format/display a mcast adjacency.

Definition at line 328 of file adj_mcast.c.

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

◆ format_adj_mcast_midchain()

u8* format_adj_mcast_midchain ( u8 s,
va_list *  ap 
)

Definition at line 351 of file adj_mcast.c.

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