FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
sixrd.c File Reference
+ Include dependency graph for sixrd.c:

Go to the source code of this file.

Data Structures

struct  sixrd_adj_delegate_t_
 Adj delegate data. More...
 

Typedefs

typedef struct sixrd_adj_delegate_t_ sixrd_adj_delegate_t
 Adj delegate data. More...
 

Functions

static sixrd_adj_delegate_tsixrd_adj_from_base (adj_delegate_t *ad)
 
static const sixrd_adj_delegate_tsixrd_adj_from_const_base (const adj_delegate_t *ad)
 
static void sixrd_fixup (vlib_main_t *vm, ip_adjacency_t *adj, vlib_buffer_t *b0, const void *data)
 
static void ip6ip_fixup (vlib_main_t *vm, ip_adjacency_t *adj, vlib_buffer_t *b0, const void *data)
 
static u8sixrd_build_rewrite (vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
 
static void ip6ip_tunnel_stack (adj_index_t ai, u32 fib_entry_index)
 
static void sixrd_tunnel_stack (adj_index_t ai, u32 fib_index)
 
static void sixrd_update_adj (vnet_main_t *vnm, u32 sw_if_index, adj_index_t ai)
 
clib_error_tsixrd_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
 VNET_HW_INTERFACE_CLASS (sixrd_hw_interface_class)
 
 VNET_DEVICE_CLASS (sixrd_device_class)
 
int sixrd_add_tunnel (ip6_address_t *ip6_prefix, u8 ip6_prefix_len, ip4_address_t *ip4_prefix, u8 ip4_prefix_len, ip4_address_t *ip4_src, bool security_check, u32 ip4_fib_index, u32 ip6_fib_index, u32 *sw_if_index)
 
int sixrd_del_tunnel (u32 sw_if_index)
 
static void sixrd_adj_delegate_adj_deleted (adj_delegate_t *aed)
 
static u8sixrd_adj_delegate_format (const adj_delegate_t *aed, u8 *s)
 
static void sixrd_fib_node_last_lock_gone (fib_node_t *node)
 
static sixrd_adj_delegate_tsixrd_adj_delegate_from_fib_node (fib_node_t *node)
 
static fib_node_back_walk_rc_t sixrd_fib_node_back_walk_notify (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 
static fib_node_tsixrd_fib_node_get (fib_node_index_t index)
 Function definition to get a FIB node from its index. More...
 
static clib_error_tsixrd_init (vlib_main_t *vm)
 

Variables

vlib_node_registration_t ip4_sixrd_node
 This code supports the following sixrd modes: More...
 
static sixrd_adj_delegate_tsixrd_adj_delegate_pool
 Pool of delegate structs. More...
 
static adj_delegate_type_t sixrd_adj_delegate_type
 Adj delegate registered type. More...
 
static fib_node_type_t sixrd_fib_node_type
 FIB node registered type. More...
 
static const adj_delegate_vft_t sixrd_adj_delegate_vft
 VFT registered with the adjacency delegate. More...
 
static const fib_node_vft_t sixrd_fib_node_vft
 VFT registered with the FIB node for the adj delegate. More...
 

Typedef Documentation

◆ sixrd_adj_delegate_t

Adj delegate data.

Function Documentation

◆ ip6ip_fixup()

static void ip6ip_fixup ( vlib_main_t vm,
ip_adjacency_t adj,
vlib_buffer_t b0,
const void *  data 
)
static

Definition at line 102 of file sixrd.c.

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

◆ ip6ip_tunnel_stack()

static void ip6ip_tunnel_stack ( adj_index_t  ai,
u32  fib_entry_index 
)
static

Definition at line 138 of file sixrd.c.

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

◆ sixrd_add_tunnel()

int sixrd_add_tunnel ( ip6_address_t ip6_prefix,
u8  ip6_prefix_len,
ip4_address_t ip4_prefix,
u8  ip4_prefix_len,
ip4_address_t ip4_src,
bool  security_check,
u32  ip4_fib_index,
u32  ip6_fib_index,
u32 sw_if_index 
)

Definition at line 271 of file sixrd.c.

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

◆ sixrd_adj_delegate_adj_deleted()

static void sixrd_adj_delegate_adj_deleted ( adj_delegate_t aed)
static

Definition at line 418 of file sixrd.c.

+ Here is the call graph for this function:

◆ sixrd_adj_delegate_format()

static u8* sixrd_adj_delegate_format ( const adj_delegate_t aed,
u8 s 
)
static

Definition at line 429 of file sixrd.c.

+ Here is the call graph for this function:

◆ sixrd_adj_delegate_from_fib_node()

static sixrd_adj_delegate_t* sixrd_adj_delegate_from_fib_node ( fib_node_t node)
static

Definition at line 446 of file sixrd.c.

+ Here is the caller graph for this function:

◆ sixrd_adj_from_base()

static sixrd_adj_delegate_t* sixrd_adj_from_base ( adj_delegate_t ad)
inlinestatic

Definition at line 70 of file sixrd.c.

+ Here is the caller graph for this function:

◆ sixrd_adj_from_const_base()

static const sixrd_adj_delegate_t* sixrd_adj_from_const_base ( const adj_delegate_t ad)
inlinestatic

Definition at line 78 of file sixrd.c.

+ Here is the caller graph for this function:

◆ sixrd_build_rewrite()

static u8* sixrd_build_rewrite ( vnet_main_t vnm,
u32  sw_if_index,
vnet_link_t  link_type,
const void *  dst_address 
)
static

Definition at line 114 of file sixrd.c.

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

◆ sixrd_del_tunnel()

int sixrd_del_tunnel ( u32  sw_if_index)

Definition at line 376 of file sixrd.c.

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

◆ sixrd_fib_node_back_walk_notify()

static fib_node_back_walk_rc_t sixrd_fib_node_back_walk_notify ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Definition at line 454 of file sixrd.c.

+ Here is the call graph for this function:

◆ sixrd_fib_node_get()

static fib_node_t* sixrd_fib_node_get ( fib_node_index_t  index)
static

Function definition to get a FIB node from its index.

Definition at line 469 of file sixrd.c.

◆ sixrd_fib_node_last_lock_gone()

static void sixrd_fib_node_last_lock_gone ( fib_node_t node)
static

Definition at line 440 of file sixrd.c.

◆ sixrd_fixup()

static void sixrd_fixup ( vlib_main_t vm,
ip_adjacency_t adj,
vlib_buffer_t b0,
const void *  data 
)
static

Definition at line 88 of file sixrd.c.

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

◆ sixrd_init()

static clib_error_t* sixrd_init ( vlib_main_t vm)
static

Definition at line 496 of file sixrd.c.

+ Here is the call graph for this function:

◆ sixrd_interface_admin_up_down()

clib_error_t* sixrd_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)

Definition at line 245 of file sixrd.c.

+ Here is the call graph for this function:

◆ sixrd_tunnel_stack()

static void sixrd_tunnel_stack ( adj_index_t  ai,
u32  fib_index 
)
static

Definition at line 167 of file sixrd.c.

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

◆ sixrd_update_adj()

static void sixrd_update_adj ( vnet_main_t vnm,
u32  sw_if_index,
adj_index_t  ai 
)
static

Definition at line 185 of file sixrd.c.

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

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( sixrd_device_class  )
+ Here is the caller graph for this function:

◆ VNET_HW_INTERFACE_CLASS()

VNET_HW_INTERFACE_CLASS ( sixrd_hw_interface_class  )
+ Here is the caller graph for this function:

Variable Documentation

◆ ip4_sixrd_node

vlib_node_registration_t ip4_sixrd_node

This code supports the following sixrd modes:

32 EA bits (Complete IPv4 address is embedded): ea_bits_len = 32 IPv4 suffix is embedded: ea_bits_len = < 32 No embedded address bits (1:1 mode): ea_bits_len = 0

◆ sixrd_adj_delegate_pool

sixrd_adj_delegate_t* sixrd_adj_delegate_pool
static

Pool of delegate structs.

Definition at line 57 of file sixrd.c.

◆ sixrd_adj_delegate_type

adj_delegate_type_t sixrd_adj_delegate_type
static

Adj delegate registered type.

Definition at line 62 of file sixrd.c.

◆ sixrd_adj_delegate_vft

const adj_delegate_vft_t sixrd_adj_delegate_vft
static
Initial value:
= {
.adv_adj_deleted = sixrd_adj_delegate_adj_deleted,
}
static u8 * sixrd_adj_delegate_format(const adj_delegate_t *aed, u8 *s)
Definition: sixrd.c:429
static void sixrd_adj_delegate_adj_deleted(adj_delegate_t *aed)
Definition: sixrd.c:418

VFT registered with the adjacency delegate.

Definition at line 481 of file sixrd.c.

◆ sixrd_fib_node_type

fib_node_type_t sixrd_fib_node_type
static

FIB node registered type.

Definition at line 67 of file sixrd.c.

◆ sixrd_fib_node_vft

const fib_node_vft_t sixrd_fib_node_vft
static
Initial value:
= {
.fnv_get = sixrd_fib_node_get,
}
static void sixrd_fib_node_last_lock_gone(fib_node_t *node)
Definition: sixrd.c:440
static fib_node_t * sixrd_fib_node_get(fib_node_index_t index)
Function definition to get a FIB node from its index.
Definition: sixrd.c:469
static fib_node_back_walk_rc_t sixrd_fib_node_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Definition: sixrd.c:454

VFT registered with the FIB node for the adj delegate.

Definition at line 489 of file sixrd.c.