FD.io VPP  v20.05.1-6-gf53edbc3b
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...
 
static const ip_neighbor_vft_t ip6_nd_impl_vft
 VFT to act as an implementation of a neighbour protocol. More...
 
static const 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 419 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 376 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 367 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 357 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 317 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 455 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 335 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-drop",
},
}
static uword icmp6_neighbor_advertisement(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_nd.c:376
unsigned int u32
Definition: types.h:88
format_function_t format_icmp6_input_trace
Definition: icmp6.h:65

(constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_advertisement_node)

Definition at line 402 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 = {
},
}
unsigned int u32
Definition: types.h:88
static uword icmp6_neighbor_solicitation(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_nd.c:367
format_function_t format_icmp6_input_trace
Definition: icmp6.h:65

(constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_solicitation_node)

Definition at line 386 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 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,
}
static void ip6_nd_delegate_disable(index_t indi)
Definition: ip6_nd.c:357
static u8 * format_ip6_nd(u8 *s, va_list *args)
Definition: ip6_nd.c:419
static void ip6_nd_link_enable(u32 sw_if_index)
called when IP6 is enabled on a link.
Definition: ip6_nd.c:335

VFT for registering as a delegate to an IP6 link.

Definition at line 448 of file ip6_nd.c.

◆ ip6_nd_impl_vft

const 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,
}
int ip6_nd_proxy_add(u32 sw_if_index, const ip6_address_t *addr)
Definition: ip6_nd_proxy.c:72
int ip6_nd_proxy_del(u32 sw_if_index, const ip6_address_t *addr)
Definition: ip6_nd_proxy.c:78

VFT to act as an implementation of a neighbour protocol.

Definition at line 440 of file ip6_nd.c.

◆ ip6_nd_pool

ip6_nd_t* ip6_nd_pool
static

Definition at line 49 of file ip6_nd.c.