FD.io VPP  v18.07-34-g55fbdb9
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 ip46_address_t sixrd_special_nh
 
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

Adj delegate data.

Function Documentation

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

Definition at line 101 of file sixrd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ip6ip_tunnel_stack ( adj_index_t  ai,
u32  fib_entry_index 
)
static

Definition at line 137 of file sixrd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 282 of file sixrd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void sixrd_adj_delegate_adj_deleted ( adj_delegate_t aed)
static

Definition at line 429 of file sixrd.c.

+ Here is the call graph for this function:

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

Definition at line 442 of file sixrd.c.

+ Here is the call graph for this function:

static sixrd_adj_delegate_t* sixrd_adj_delegate_from_fib_node ( fib_node_t node)
static

Definition at line 459 of file sixrd.c.

+ Here is the caller graph for this function:

static sixrd_adj_delegate_t* sixrd_adj_from_base ( adj_delegate_t ad)
inlinestatic

Definition at line 69 of file sixrd.c.

+ Here is the caller graph for this function:

static const sixrd_adj_delegate_t* sixrd_adj_from_const_base ( const adj_delegate_t ad)
inlinestatic

Definition at line 77 of file sixrd.c.

+ Here is the caller graph for this function:

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 113 of file sixrd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int sixrd_del_tunnel ( u32  sw_if_index)

Definition at line 387 of file sixrd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 467 of file sixrd.c.

+ Here is the call graph for this function:

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 482 of file sixrd.c.

static void sixrd_fib_node_last_lock_gone ( fib_node_t node)
static

Definition at line 453 of file sixrd.c.

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

Definition at line 87 of file sixrd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* sixrd_init ( vlib_main_t vm)
static

Definition at line 509 of file sixrd.c.

+ Here is the call graph for this function:

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

Definition at line 256 of file sixrd.c.

+ Here is the call graph for this function:

static void sixrd_tunnel_stack ( adj_index_t  ai,
u32  fib_index 
)
static

Definition at line 166 of file sixrd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 193 of file sixrd.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_DEVICE_CLASS ( sixrd_device_class  )

+ Here is the caller graph for this function:

VNET_HW_INTERFACE_CLASS ( sixrd_hw_interface_class  )

+ Here is the caller graph for this function:

Variable Documentation

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_t* sixrd_adj_delegate_pool
static

Pool of delegate structs.

Definition at line 56 of file sixrd.c.

adj_delegate_type_t sixrd_adj_delegate_type
static

Adj delegate registered type.

Definition at line 61 of file sixrd.c.

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:442
static void sixrd_adj_delegate_adj_deleted(adj_delegate_t *aed)
Definition: sixrd.c:429

VFT registered with the adjacency delegate.

Definition at line 494 of file sixrd.c.

fib_node_type_t sixrd_fib_node_type
static

FIB node registered type.

Definition at line 66 of file sixrd.c.

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:453
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:482
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:467

VFT registered with the FIB node for the adj delegate.

Definition at line 502 of file sixrd.c.

const ip46_address_t sixrd_special_nh
static
Initial value:
= {
.ip6 = {
.as_u64 = {
[0] = 0xffffffffffffffff,
[1] = 0xffffffffffffffff,
},
},
}

Definition at line 183 of file sixrd.c.