FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
l2_arp_term.c File Reference
+ Include dependency graph for l2_arp_term.c:

Go to the source code of this file.

Data Structures

struct  ethernet_arp_input_trace_t
 

Macros

#define foreach_ethernet_arp_error
 

Enumerations

enum  arp_term_next_t { ARP_TERM_NEXT_L2_OUTPUT, ARP_TERM_NEXT_DROP, ARP_TERM_N_NEXT }
 
enum  ethernet_arp_reply_error_t { ETHERNET_ARP_N_ERROR, ETHERNET_ARP_N_ERROR }
 

Functions

static u8format_arp_term_input_trace (u8 *s, va_list *va)
 
void l2_arp_term_set_publisher_node (bool on)
 
static int l2_arp_term_publish (l2_arp_term_publish_event_t *ctx)
 
static void l2_arp_term_publish_v4_dp (u32 sw_if_index, const ethernet_arp_ip4_over_ethernet_address_t *a)
 
static void l2_arp_term_publish_v6_dp (u32 sw_if_index, const ip6_address_t *addr, const mac_address_t *mac)
 
static int vnet_ip6_nd_term (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *p0, ethernet_header_t *eth, ip6_header_t *ip, u32 sw_if_index, u16 bd_index)
 
static uword arp_term_l2bd (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tarp_term_init (vlib_main_t *vm)
 

Variables

static const u8 vrrp_prefix [] = { 0x00, 0x00, 0x5E, 0x00, 0x01 }
 
l2_arp_term_main_t l2_arp_term_main
 
u32 arp_term_next_node_index [32]
 
static char * ethernet_arp_error_strings []
 
static vlib_node_registration_t arp_term_l2bd_node
 (constructor) VLIB_REGISTER_NODE (arp_term_l2bd_node) More...
 

Macro Definition Documentation

◆ foreach_ethernet_arp_error

#define foreach_ethernet_arp_error
Value:
_ (replies_sent, "ARP replies sent") \
_ (l2_type_not_ethernet, "L2 type not ethernet") \
_ (l3_type_not_ip4, "L3 type not IP4") \
_ (l3_src_address_not_local, "IP4 source address not local to subnet") \
_ (l3_dst_address_not_local, "IP4 destination address not local to subnet") \
_ (l3_dst_address_unset, "IP4 destination address is unset") \
_ (l3_src_address_is_local, "IP4 source address matches local interface") \
_ (l3_src_address_learned, "ARP request IP4 source address learned") \
_ (replies_received, "ARP replies received") \
_ (opcode_not_request, "ARP opcode not request") \
_ (proxy_arp_replies_sent, "Proxy ARP replies sent") \
_ (l2_address_mismatch, "ARP hw addr does not match L2 frame src addr") \
_ (gratuitous_arp, "ARP probe or announcement dropped") \
_ (interface_no_table, "Interface is not mapped to an IP table") \
_ (interface_not_ip_enabled, "Interface is not IP enabled") \
_ (unnumbered_mismatch, "RX interface is unnumbered to different subnet") \

Definition at line 53 of file l2_arp_term.c.

Enumeration Type Documentation

◆ arp_term_next_t

Enumerator
ARP_TERM_NEXT_L2_OUTPUT 
ARP_TERM_NEXT_DROP 
ARP_TERM_N_NEXT 

Definition at line 39 of file l2_arp_term.c.

◆ ethernet_arp_reply_error_t

Enumerator
ETHERNET_ARP_N_ERROR 
ETHERNET_ARP_N_ERROR 

Definition at line 71 of file l2_arp_term.c.

Function Documentation

◆ arp_term_init()

clib_error_t* arp_term_init ( vlib_main_t vm)

Definition at line 466 of file l2_arp_term.c.

+ Here is the call graph for this function:

◆ arp_term_l2bd()

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

Definition at line 242 of file l2_arp_term.c.

+ Here is the call graph for this function:

◆ format_arp_term_input_trace()

static u8* format_arp_term_input_trace ( u8 s,
va_list *  va 
)
static

Definition at line 86 of file l2_arp_term.c.

+ Here is the call graph for this function:

◆ l2_arp_term_publish()

static int l2_arp_term_publish ( l2_arp_term_publish_event_t ctx)
static

Definition at line 111 of file l2_arp_term.c.

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

◆ l2_arp_term_publish_v4_dp()

static void l2_arp_term_publish_v4_dp ( u32  sw_if_index,
const ethernet_arp_ip4_over_ethernet_address_t *  a 
)
inlinestatic

Definition at line 125 of file l2_arp_term.c.

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

◆ l2_arp_term_publish_v6_dp()

static void l2_arp_term_publish_v6_dp ( u32  sw_if_index,
const ip6_address_t *  addr,
const mac_address_t mac 
)
inlinestatic

Definition at line 145 of file l2_arp_term.c.

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

◆ l2_arp_term_set_publisher_node()

void l2_arp_term_set_publisher_node ( bool  on)

Definition at line 103 of file l2_arp_term.c.

+ Here is the caller graph for this function:

◆ vnet_ip6_nd_term()

static int vnet_ip6_nd_term ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_buffer_t p0,
ethernet_header_t eth,
ip6_header_t ip,
u32  sw_if_index,
u16  bd_index 
)
inlinestatic

Definition at line 166 of file l2_arp_term.c.

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

Variable Documentation

◆ arp_term_l2bd_node

vlib_node_registration_t arp_term_l2bd_node
static
Initial value:
= {
.function = arp_term_l2bd,
.name = "arp-term-l2bd",
.vector_size = sizeof (u32),
.n_errors = ETHERNET_ARP_N_ERROR,
.error_strings = ethernet_arp_error_strings,
.n_next_nodes = ARP_TERM_N_NEXT,
.next_nodes = {
[ARP_TERM_NEXT_L2_OUTPUT] = "l2-output",
[ARP_TERM_NEXT_DROP] = "error-drop",
},
.format_buffer = format_ethernet_arp_header,
.format_trace = format_arp_term_input_trace,
}

(constructor) VLIB_REGISTER_NODE (arp_term_l2bd_node)

Definition at line 449 of file l2_arp_term.c.

◆ arp_term_next_node_index

u32 arp_term_next_node_index[32]

Definition at line 46 of file l2_arp_term.c.

◆ ethernet_arp_error_strings

char* ethernet_arp_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 79 of file l2_arp_term.c.

◆ l2_arp_term_main

l2_arp_term_main_t l2_arp_term_main

Definition at line 33 of file l2_arp_term.c.

◆ vrrp_prefix

const u8 vrrp_prefix[] = { 0x00, 0x00, 0x5E, 0x00, 0x01 }
static

Definition at line 31 of file l2_arp_term.c.

format_arp_term_input_trace
static u8 * format_arp_term_input_trace(u8 *s, va_list *va)
Definition: l2_arp_term.c:86
ARP_TERM_N_NEXT
@ ARP_TERM_N_NEXT
Definition: l2_arp_term.c:43
ARP_TERM_NEXT_L2_OUTPUT
@ ARP_TERM_NEXT_L2_OUTPUT
Definition: l2_arp_term.c:41
foreach_ethernet_arp_error
#define foreach_ethernet_arp_error
Definition: l2_arp_term.c:53
u32
unsigned int u32
Definition: types.h:88
ARP_TERM_NEXT_DROP
@ ARP_TERM_NEXT_DROP
Definition: l2_arp_term.c:42
ETHERNET_ARP_N_ERROR
@ ETHERNET_ARP_N_ERROR
Definition: l2_arp_term.c:76
ethernet_arp_error_strings
static char * ethernet_arp_error_strings[]
Definition: l2_arp_term.c:79
arp_term_l2bd
static uword arp_term_l2bd(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: l2_arp_term.c:242
format_ethernet_arp_header
u8 * format_ethernet_arp_header(u8 *s, va_list *va)
Definition: arp_packet.c:59