FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
ip6_nd.c File Reference

IPv6 Neighbor Adjacency and Neighbor Discovery. More...

+ Include dependency graph for ip6_nd.c:

Go to the source code of this file.

Data Structures

struct  ip6_nd_t_
 

Macros

#define DEF_MAX_RADV_INTERVAL   200
 
#define DEF_MIN_RADV_INTERVAL   .75 * DEF_MAX_RADV_INTERVAL
 

Typedefs

typedef struct ip6_nd_t_ ip6_nd_t
 

Enumerations

enum  icmp6_neighbor_solicitation_or_advertisement_next_t { ICMP6_NEIGHBOR_SOLICITATION_NEXT_DROP, ICMP6_NEIGHBOR_SOLICITATION_NEXT_REPLY, ICMP6_NEIGHBOR_SOLICITATION_N_NEXT }
 

Functions

static_always_inline uword icmp6_neighbor_solicitation_or_advertisement (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, uword is_solicitation)
 
static const ethernet_interface_tip6_nd_get_eth_itf (u32 sw_if_index)
 
static void ip6_nd_link_enable (u32 sw_if_index)
 called when IP6 is enabled on a link. More...
 
static void ip6_nd_delegate_disable (index_t indi)
 
static uword icmp6_neighbor_solicitation (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword icmp6_neighbor_advertisement (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_ip6_nd (u8 *s, va_list *args)
 
static clib_error_tip6_nd_init (vlib_main_t *vm)
 

Variables

static ip6_link_delegate_id_t ip6_nd_delegate_id
 
static ip6_nd_tip6_nd_pool
 
static vlib_node_registration_t ip6_icmp_neighbor_solicitation_node
 (constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_solicitation_node) More...
 
static vlib_node_registration_t ip6_icmp_neighbor_advertisement_node
 (constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_advertisement_node) More...
 
const static ip_neighbor_vft_t ip6_nd_impl_vft
 VFT to act as an implementation of a neighbour protocol. More...
 
const static ip6_link_delegate_vft_t ip6_nd_delegate_vft
 VFT for registering as a delegate to an IP6 link. More...
 

Detailed Description

IPv6 Neighbor Adjacency and Neighbor Discovery.

The files contains the API and CLI code for managing IPv6 neighbor adjacency tables and neighbor discovery logic.

Definition in file ip6_nd.c.

Macro Definition Documentation

◆ DEF_MAX_RADV_INTERVAL

#define DEF_MAX_RADV_INTERVAL   200

Definition at line 35 of file ip6_nd.c.

◆ DEF_MIN_RADV_INTERVAL

#define DEF_MIN_RADV_INTERVAL   .75 * DEF_MAX_RADV_INTERVAL

Definition at line 36 of file ip6_nd.c.

Typedef Documentation

◆ ip6_nd_t

typedef struct ip6_nd_t_ ip6_nd_t

Enumeration Type Documentation

◆ icmp6_neighbor_solicitation_or_advertisement_next_t

Enumerator
ICMP6_NEIGHBOR_SOLICITATION_NEXT_DROP 
ICMP6_NEIGHBOR_SOLICITATION_NEXT_REPLY 
ICMP6_NEIGHBOR_SOLICITATION_N_NEXT 

Definition at line 52 of file ip6_nd.c.

Function Documentation

◆ format_ip6_nd()

static u8* format_ip6_nd ( u8 s,
va_list *  args 
)
static

Definition at line 429 of file ip6_nd.c.

+ Here is the call graph for this function:

◆ icmp6_neighbor_advertisement()

static uword icmp6_neighbor_advertisement ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 386 of file ip6_nd.c.

+ Here is the call graph for this function:

◆ icmp6_neighbor_solicitation()

static uword icmp6_neighbor_solicitation ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 377 of file ip6_nd.c.

+ Here is the call graph for this function:

◆ icmp6_neighbor_solicitation_or_advertisement()

static_always_inline uword icmp6_neighbor_solicitation_or_advertisement ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
uword  is_solicitation 
)

Definition at line 60 of file ip6_nd.c.

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

◆ ip6_nd_delegate_disable()

static void ip6_nd_delegate_disable ( index_t  indi)
static

Definition at line 367 of file ip6_nd.c.

◆ ip6_nd_get_eth_itf()

static const ethernet_interface_t* ip6_nd_get_eth_itf ( u32  sw_if_index)
static

Definition at line 327 of file ip6_nd.c.

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

◆ ip6_nd_init()

static clib_error_t* ip6_nd_init ( vlib_main_t vm)
static

Definition at line 465 of file ip6_nd.c.

+ Here is the call graph for this function:

◆ ip6_nd_link_enable()

static void ip6_nd_link_enable ( u32  sw_if_index)
static

called when IP6 is enabled on a link.

create and initialize router advertisement parameters with default values for this intfc

Definition at line 345 of file ip6_nd.c.

+ Here is the call graph for this function:

Variable Documentation

◆ ip6_icmp_neighbor_advertisement_node

vlib_node_registration_t ip6_icmp_neighbor_advertisement_node
static
Initial value:
=
{
.name = "icmp6-neighbor-advertisement",
.vector_size = sizeof (u32),
.format_trace = format_icmp6_input_trace,
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip6-punt",
},
}

(constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_advertisement_node)

Definition at line 412 of file ip6_nd.c.

◆ ip6_icmp_neighbor_solicitation_node

vlib_node_registration_t ip6_icmp_neighbor_solicitation_node
static
Initial value:
=
{
.name = "icmp6-neighbor-solicitation",
.vector_size = sizeof (u32),
.format_trace = format_icmp6_input_trace,
.next_nodes = {
},
}

(constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_solicitation_node)

Definition at line 396 of file ip6_nd.c.

◆ ip6_nd_delegate_id

ip6_link_delegate_id_t ip6_nd_delegate_id
static

Definition at line 48 of file ip6_nd.c.

◆ ip6_nd_delegate_vft

const static ip6_link_delegate_vft_t ip6_nd_delegate_vft
static
Initial value:
= {
.ildv_disable = ip6_nd_delegate_disable,
.ildv_enable = ip6_nd_link_enable,
.ildv_format = format_ip6_nd,
}

VFT for registering as a delegate to an IP6 link.

Definition at line 458 of file ip6_nd.c.

◆ ip6_nd_impl_vft

const static ip_neighbor_vft_t ip6_nd_impl_vft
static
Initial value:
= {
.inv_proxy6_add = ip6_nd_proxy_add,
.inv_proxy6_del = ip6_nd_proxy_del,
}

VFT to act as an implementation of a neighbour protocol.

Definition at line 450 of file ip6_nd.c.

◆ ip6_nd_pool

ip6_nd_t* ip6_nd_pool
static

Definition at line 49 of file ip6_nd.c.

icmp6_neighbor_advertisement
static uword icmp6_neighbor_advertisement(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_nd.c:386
ip6_nd_delegate_disable
static void ip6_nd_delegate_disable(index_t indi)
Definition: ip6_nd.c:367
ICMP6_NEIGHBOR_SOLICITATION_NEXT_DROP
@ ICMP6_NEIGHBOR_SOLICITATION_NEXT_DROP
Definition: ip6_nd.c:54
ip6_nd_proxy_add
int ip6_nd_proxy_add(u32 sw_if_index, const ip6_address_t *addr)
Definition: ip6_nd_proxy.c:76
format_ip6_nd
static u8 * format_ip6_nd(u8 *s, va_list *args)
Definition: ip6_nd.c:429
format_icmp6_input_trace
format_function_t format_icmp6_input_trace
Definition: icmp6.h:67
ICMP6_NEIGHBOR_SOLICITATION_N_NEXT
@ ICMP6_NEIGHBOR_SOLICITATION_N_NEXT
Definition: ip6_nd.c:56
u32
unsigned int u32
Definition: types.h:88
icmp6_neighbor_solicitation
static uword icmp6_neighbor_solicitation(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_nd.c:377
ip6_nd_proxy_del
int ip6_nd_proxy_del(u32 sw_if_index, const ip6_address_t *addr)
Definition: ip6_nd_proxy.c:82
ICMP6_NEIGHBOR_SOLICITATION_NEXT_REPLY
@ ICMP6_NEIGHBOR_SOLICITATION_NEXT_REPLY
Definition: ip6_nd.c:55
ip6_nd_link_enable
static void ip6_nd_link_enable(u32 sw_if_index)
called when IP6 is enabled on a link.
Definition: ip6_nd.c:345