FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
ip4_neighbor.c File Reference
+ Include dependency graph for ip4_neighbor.c:

Go to the source code of this file.

Macros

#define log_debug(fmt, ...)   vlib_log_debug (ip4_neighbor_log.class, fmt, __VA_ARGS__)
 
#define foreach_notrace_ip4_arp_error
 

Functions

 VLIB_REGISTER_LOG_CLASS (ip4_neighbor_log, static)
 
void ip4_neighbor_probe_dst (u32 sw_if_index, const ip4_address_t *dst)
 
void ip4_neighbor_advertise (vlib_main_t *vm, vnet_main_t *vnm, u32 sw_if_index, const ip4_address_t *addr)
 
static uword ip4_arp_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_glean)
 
VLIB_NODE_FN() ip4_arp_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip4_glean_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_tarp_notrace_init (vlib_main_t *vm)
 
static clib_error_tip4_neighbor_main_loop_enter (vlib_main_t *vm)
 

Variables

static throttle_t arp_throttle
 ARP throttling. More...
 
static char * ip4_arp_error_strings []
 
vlib_node_registration_t ip4_arp_node
 (constructor) VLIB_REGISTER_NODE (ip4_arp_node) More...
 
vlib_node_registration_t ip4_glean_node
 (constructor) VLIB_REGISTER_NODE (ip4_glean_node) More...
 

Macro Definition Documentation

◆ foreach_notrace_ip4_arp_error

#define foreach_notrace_ip4_arp_error
Value:
_(THROTTLED) \
_(RESOLVED) \
_(NO_BUFFERS) \
_(REQUEST_SENT) \
_(NON_ARP_ADJ) \
_(NO_SOURCE_ADDRESS)

Definition at line 299 of file ip4_neighbor.c.

◆ log_debug

#define log_debug (   fmt,
  ... 
)    vlib_log_debug (ip4_neighbor_log.class, fmt, __VA_ARGS__)

Definition at line 53 of file ip4_neighbor.c.

Function Documentation

◆ arp_notrace_init()

static clib_error_t* arp_notrace_init ( vlib_main_t vm)
static

Definition at line 308 of file ip4_neighbor.c.

+ Here is the call graph for this function:

◆ ip4_arp_inline()

static uword ip4_arp_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_glean 
)
inlinestatic

Definition at line 129 of file ip4_neighbor.c.

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

◆ ip4_arp_node()

VLIB_NODE_FN() ip4_arp_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 250 of file ip4_neighbor.c.

+ Here is the call graph for this function:

◆ ip4_glean_node()

VLIB_NODE_FN() ip4_glean_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 256 of file ip4_neighbor.c.

+ Here is the call graph for this function:

◆ ip4_neighbor_advertise()

void ip4_neighbor_advertise ( vlib_main_t vm,
vnet_main_t vnm,
u32  sw_if_index,
const ip4_address_t addr 
)

Definition at line 71 of file ip4_neighbor.c.

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

◆ ip4_neighbor_main_loop_enter()

static clib_error_t* ip4_neighbor_main_loop_enter ( vlib_main_t vm)
static

Definition at line 325 of file ip4_neighbor.c.

+ Here is the call graph for this function:

◆ ip4_neighbor_probe_dst()

void ip4_neighbor_probe_dst ( u32  sw_if_index,
const ip4_address_t dst 
)

Definition at line 57 of file ip4_neighbor.c.

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

◆ VLIB_REGISTER_LOG_CLASS()

VLIB_REGISTER_LOG_CLASS ( ip4_neighbor_log  ,
static   
)

Variable Documentation

◆ arp_throttle

throttle_t arp_throttle
static

ARP throttling.

Definition at line 46 of file ip4_neighbor.c.

◆ ip4_arp_error_strings

char* ip4_arp_error_strings[]
static
Initial value:
= {
[IP4_ARP_ERROR_THROTTLED] = "ARP requests throttled",
[IP4_ARP_ERROR_RESOLVED] = "ARP requests resolved",
[IP4_ARP_ERROR_NO_BUFFERS] = "ARP requests out of buffer",
[IP4_ARP_ERROR_REQUEST_SENT] = "ARP requests sent",
[IP4_ARP_ERROR_NON_ARP_ADJ] = "ARPs to non-ARP adjacencies",
[IP4_ARP_ERROR_NO_SOURCE_ADDRESS] = "no source address for ARP request",
}

Definition at line 262 of file ip4_neighbor.c.

◆ ip4_arp_node

Initial value:
=
{
.name = "ip4-arp",
.vector_size = sizeof (u32),
.error_strings = ip4_arp_error_strings,
.n_next_nodes = IP4_ARP_N_NEXT,
.next_nodes = {
[IP4_ARP_NEXT_DROP] = "ip4-drop",
},
}

(constructor) VLIB_REGISTER_NODE (ip4_arp_node)

Definition at line 272 of file ip4_neighbor.c.

◆ ip4_glean_node

vlib_node_registration_t ip4_glean_node
Initial value:
=
{
.name = "ip4-glean",
.vector_size = sizeof (u32),
.error_strings = ip4_arp_error_strings,
.n_next_nodes = IP4_ARP_N_NEXT,
.next_nodes = {
[IP4_ARP_NEXT_DROP] = "ip4-drop",
},
}

(constructor) VLIB_REGISTER_NODE (ip4_glean_node)

Definition at line 285 of file ip4_neighbor.c.

IP4_ARP_ERROR_NON_ARP_ADJ
@ IP4_ARP_ERROR_NON_ARP_ADJ
Definition: arp_packet.h:119
IP4_ARP_N_NEXT
@ IP4_ARP_N_NEXT
Definition: arp_packet.h:110
IP4_ARP_ERROR_THROTTLED
@ IP4_ARP_ERROR_THROTTLED
Definition: arp_packet.h:115
format_ip4_forward_next_trace
u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1190
IP4_ARP_ERROR_REQUEST_SENT
@ IP4_ARP_ERROR_REQUEST_SENT
Definition: arp_packet.h:118
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
IP4_ARP_NEXT_DROP
@ IP4_ARP_NEXT_DROP
Definition: arp_packet.h:109
u32
unsigned int u32
Definition: types.h:88
IP4_ARP_ERROR_NO_BUFFERS
@ IP4_ARP_ERROR_NO_BUFFERS
Definition: arp_packet.h:117
IP4_ARP_ERROR_RESOLVED
@ IP4_ARP_ERROR_RESOLVED
Definition: arp_packet.h:116
ip4_arp_error_strings
static char * ip4_arp_error_strings[]
Definition: ip4_neighbor.c:262
IP4_ARP_ERROR_NO_SOURCE_ADDRESS
@ IP4_ARP_ERROR_NO_SOURCE_ADDRESS
Definition: arp_packet.h:120