FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
ethernet.h File Reference
+ Include dependency graph for ethernet.h:

Go to the source code of this file.

Data Structures

struct  ethernet_input_frame_t
 
struct  ethernet_max_header_t
 
struct  ethernet_interface
 
struct  ethernet_type_info_t
 
struct  subint_config_t
 
struct  main_intf_t
 
struct  vlan_intf_t
 
struct  vlan_table_t
 
struct  qinq_intf_t
 
struct  qinq_table_t
 
struct  next_by_ethertype_t
 
struct  ethernet_address_change_ctx_t
 
struct  ethernet_main_t_
 

Macros

#define ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX   (1 << 0)
 
#define ETH_INPUT_FRAME_F_IP4_CKSUM_OK   (1 << 1)
 
#define ETHERNET_MIN_PACKET_BYTES   64
 
#define ETHERNET_MAX_PACKET_BYTES   9216
 
#define ETHERNET_INTERFACE_FLAGS_STATUS_MASK   (0xffff0000)
 
#define ETHERNET_INTERFACE_FLAGS_SET_OPN_MASK   (0x0000ffff)
 
#define ETHERNET_INTERFACE_FLAG_STATUS_L3   (1 << 16)
 
#define ETHERNET_INTERFACE_FLAG_DEFAULT_L3   0
 
#define ETHERNET_INTERFACE_FLAG_ACCEPT_ALL   1
 
#define ETHERNET_INTERFACE_FLAG_MTU   2
 
#define ethernet_error(n, c, s)   ETHERNET_ERROR_##n,
 
#define SUBINT_CONFIG_MATCH_0_TAG   (1<<0)
 
#define SUBINT_CONFIG_MATCH_1_TAG   (1<<1)
 
#define SUBINT_CONFIG_MATCH_2_TAG   (1<<2)
 
#define SUBINT_CONFIG_MATCH_3_TAG   (1<<3)
 
#define SUBINT_CONFIG_VALID   (1<<4)
 
#define SUBINT_CONFIG_L2   (1<<5)
 
#define SUBINT_CONFIG_P2P   (1<<6)
 
#define ethernet_buffer_get_vlan_count(b)
 Returns the number of VLAN headers in the current Ethernet frame in the buffer. More...
 
#define ethernet_buffer_set_vlan_count(b, v)
 Sets the number of VLAN headers in the current Ethernet frame in the buffer. More...
 
#define ethernet_buffer_adjust_vlan_count(b, v)
 Adjusts the vlan count by the delta in 'v'. More...
 
#define ethernet_buffer_adjust_vlan_count_by_bytes(b, v)
 Adjusts the vlan count by the header size byte delta in 'v'. More...
 
#define ethernet_buffer_header_size(b)
 Determine the size of the Ethernet headers of the current frame in the buffer. More...
 

Typedefs

typedef u32() ethernet_flag_change_function_t(vnet_main_t *vnm, struct vnet_hw_interface_t *hi, u32 flags)
 
typedef struct ethernet_interface ethernet_interface_t
 
typedef void() ethernet_address_change_function_t(struct ethernet_main_t_ *im, u32 sw_if_index, uword opaque)
 
typedef struct ethernet_main_t_ ethernet_main_t
 

Enumerations

enum  ethernet_error_t { ETHERNET_N_ERROR }
 

Functions

static_always_inline int ethernet_frame_is_tagged (u16 type)
 
static_always_inline int ethernet_frame_is_any_tagged_x2 (u16 type0, u16 type1)
 
static_always_inline int ethernet_frame_is_any_tagged_x4 (u16 type0, u16 type1, u16 type2, u16 type3)
 
static u32 eth_create_valid_subint_match_flags (u32 num_tags)
 
static ethernet_type_info_tethernet_get_type_info (ethernet_main_t *em, ethernet_type_t type)
 
ethernet_interface_tethernet_get_interface (ethernet_main_t *em, u32 hw_if_index)
 
mac_address_tethernet_interface_add_del_address (ethernet_main_t *em, u32 hw_if_index, const u8 *address, u8 is_add)
 
clib_error_tethernet_register_interface (vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, const u8 *address, u32 *hw_if_index_return, ethernet_flag_change_function_t flag_change)
 
void ethernet_delete_interface (vnet_main_t *vnm, u32 hw_if_index)
 
void ethernet_register_input_type (vlib_main_t *vm, ethernet_type_t type, u32 node_index)
 
void ethernet_register_l2_input (vlib_main_t *vm, u32 node_index)
 
void ethernet_register_l3_redirect (vlib_main_t *vm, u32 node_index)
 
u8format_mac_address (u8 *s, va_list *args)
 
u8format_ethernet_address (u8 *s, va_list *args)
 
u8format_ethernet_type (u8 *s, va_list *args)
 
u8format_ethernet_vlan_tci (u8 *s, va_list *va)
 
u8format_ethernet_header (u8 *s, va_list *args)
 
u8format_ethernet_header_with_length (u8 *s, va_list *args)
 
uword unformat_ethernet_address (unformat_input_t *input, va_list *args)
 
uword unformat_mac_address (unformat_input_t *input, va_list *args)
 
uword unformat_ethernet_type_host_byte_order (unformat_input_t *input, va_list *args)
 
uword unformat_ethernet_type_net_byte_order (unformat_input_t *input, va_list *args)
 
uword unformat_ethernet_header (unformat_input_t *input, va_list *args)
 
uword unformat_ethernet_interface (unformat_input_t *input, va_list *args)
 
uword unformat_pg_ethernet_header (unformat_input_t *input, va_list *args)
 
static void ethernet_setup_node (vlib_main_t *vm, u32 node_index)
 
static ethernet_header_tethernet_buffer_get_header (vlib_buffer_t *b)
 
ethernet_main_tethernet_get_main (vlib_main_t *vm)
 
u32 ethernet_set_flags (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
void ethernet_sw_interface_set_l2_mode (vnet_main_t *vnm, u32 sw_if_index, u32 l2)
 
void ethernet_sw_interface_set_l2_mode_noport (vnet_main_t *vnm, u32 sw_if_index, u32 l2)
 
void ethernet_set_rx_redirect (vnet_main_t *vnm, vnet_hw_interface_t *hi, u32 enable)
 
clib_error_tnext_by_ethertype_init (next_by_ethertype_t *l3_next)
 
clib_error_tnext_by_ethertype_register (next_by_ethertype_t *l3_next, u32 ethertype, u32 next_index)
 
int vnet_create_loopback_interface (u32 *sw_if_indexp, u8 *mac_address, u8 is_specified, u32 user_instance)
 
int vnet_delete_loopback_interface (u32 sw_if_index)
 
int vnet_create_sub_interface (u32 sw_if_index, u32 id, u32 flags, u16 inner_vlan_id, u16 outer_vlan_id, u32 *sub_sw_if_index)
 
int vnet_delete_sub_interface (u32 sw_if_index)
 
static void eth_vlan_table_lookups (ethernet_main_t *em, vnet_main_t *vnm, u32 port_sw_if_index0, u16 first_ethertype, u16 outer_id, u16 inner_id, vnet_hw_interface_t **hi, main_intf_t **main_intf, vlan_intf_t **vlan_intf, qinq_intf_t **qinq_intf)
 
static u32 eth_identify_subint (vnet_hw_interface_t *hi, u32 match_flags, main_intf_t *main_intf, vlan_intf_t *vlan_intf, qinq_intf_t *qinq_intf, u32 *new_sw_if_index, u8 *error0, u32 *is_l2)
 
static ethernet_main_tvnet_get_ethernet_main (void)
 
void ethernet_update_adjacency (vnet_main_t *vnm, u32 sw_if_index, u32 ai)
 
u8ethernet_build_rewrite (vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
 build a rewrite string to use for sending packets of type 'link_type' to 'dst_address' More...
 
void ethernet_input_init (vlib_main_t *vm, ethernet_main_t *em)
 

Variables

vnet_hw_interface_class_t ethernet_hw_interface_class
 
ethernet_main_t ethernet_main
 
vlib_node_registration_t ethernet_input_node
 (constructor) VLIB_REGISTER_NODE (ethernet_input_node) More...
 

Macro Definition Documentation

◆ ETH_INPUT_FRAME_F_IP4_CKSUM_OK

#define ETH_INPUT_FRAME_F_IP4_CKSUM_OK   (1 << 1)

Definition at line 55 of file ethernet.h.

◆ ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX

#define ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX   (1 << 0)

Definition at line 52 of file ethernet.h.

◆ ethernet_buffer_adjust_vlan_count

#define ethernet_buffer_adjust_vlan_count (   b,
 
)
Value:
( \
ethernet_buffer_set_vlan_count(b, \
)
i64 word
Definition: types.h:111
#define ethernet_buffer_get_vlan_count(b)
Returns the number of VLAN headers in the current Ethernet frame in the buffer.
Definition: ethernet.h:417

Adjusts the vlan count by the delta in 'v'.

Definition at line 431 of file ethernet.h.

◆ ethernet_buffer_adjust_vlan_count_by_bytes

#define ethernet_buffer_adjust_vlan_count_by_bytes (   b,
 
)
Value:
( \
(b)->flags = ((b)->flags & ~VNET_BUFFER_FLAGS_VLAN_BITS) | (( \
((v) << (VNET_BUFFER_F_LOG2_VLAN_1_DEEP - 2)) \
)
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:103
#define VNET_BUFFER_FLAGS_VLAN_BITS
Definition: buffer.h:89

Adjusts the vlan count by the header size byte delta in 'v'.

Definition at line 437 of file ethernet.h.

◆ ethernet_buffer_get_vlan_count

#define ethernet_buffer_get_vlan_count (   b)
Value:
( \
((b)->flags & VNET_BUFFER_FLAGS_VLAN_BITS) >> VNET_BUFFER_F_LOG2_VLAN_1_DEEP \
)
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:103
#define VNET_BUFFER_FLAGS_VLAN_BITS
Definition: buffer.h:89

Returns the number of VLAN headers in the current Ethernet frame in the buffer.

Returns 0, 1, 2 for the known header count. The value 3 indicates the number of headers is not known.

Definition at line 417 of file ethernet.h.

◆ ethernet_buffer_header_size

#define ethernet_buffer_header_size (   b)
Value:
( \
ethernet_buffer_get_vlan_count((b)) * sizeof(ethernet_vlan_header_t) + \
)

Determine the size of the Ethernet headers of the current frame in the buffer.

This uses the VLAN depth flags that are set by ethernet-input. Because these flags are stored in the vlib_buffer_t "flags" field this count is valid regardless of the node so long as it's checked downstream of ethernet-input; That is, the value is not stored in the opaque space.

Definition at line 452 of file ethernet.h.

◆ ethernet_buffer_set_vlan_count

#define ethernet_buffer_set_vlan_count (   b,
 
)
Value:
( \
(b)->flags = ((b)->flags & ~VNET_BUFFER_FLAGS_VLAN_BITS) | \
(((v) << VNET_BUFFER_F_LOG2_VLAN_1_DEEP) & VNET_BUFFER_FLAGS_VLAN_BITS) \
)
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:103
#define VNET_BUFFER_FLAGS_VLAN_BITS
Definition: buffer.h:89

Sets the number of VLAN headers in the current Ethernet frame in the buffer.

Values 0, 1, 2 indicate the header count. The value 3 indicates the number of headers is not known.

Definition at line 425 of file ethernet.h.

◆ ethernet_error

#define ethernet_error (   n,
  c,
 
)    ETHERNET_ERROR_##n,

Definition at line 188 of file ethernet.h.

◆ ETHERNET_INTERFACE_FLAG_ACCEPT_ALL

#define ETHERNET_INTERFACE_FLAG_ACCEPT_ALL   1

Definition at line 152 of file ethernet.h.

◆ ETHERNET_INTERFACE_FLAG_DEFAULT_L3

#define ETHERNET_INTERFACE_FLAG_DEFAULT_L3   0

Definition at line 149 of file ethernet.h.

◆ ETHERNET_INTERFACE_FLAG_MTU

#define ETHERNET_INTERFACE_FLAG_MTU   2

Definition at line 155 of file ethernet.h.

◆ ETHERNET_INTERFACE_FLAG_STATUS_L3

#define ETHERNET_INTERFACE_FLAG_STATUS_L3   (1 << 16)

Definition at line 146 of file ethernet.h.

◆ ETHERNET_INTERFACE_FLAGS_SET_OPN_MASK

#define ETHERNET_INTERFACE_FLAGS_SET_OPN_MASK   (0x0000ffff)

Definition at line 142 of file ethernet.h.

◆ ETHERNET_INTERFACE_FLAGS_STATUS_MASK

#define ETHERNET_INTERFACE_FLAGS_STATUS_MASK   (0xffff0000)

Definition at line 141 of file ethernet.h.

◆ ETHERNET_MAX_PACKET_BYTES

#define ETHERNET_MAX_PACKET_BYTES   9216

Definition at line 133 of file ethernet.h.

◆ ETHERNET_MIN_PACKET_BYTES

#define ETHERNET_MIN_PACKET_BYTES   64

Definition at line 132 of file ethernet.h.

◆ SUBINT_CONFIG_L2

#define SUBINT_CONFIG_L2   (1<<5)

Definition at line 209 of file ethernet.h.

◆ SUBINT_CONFIG_MATCH_0_TAG

#define SUBINT_CONFIG_MATCH_0_TAG   (1<<0)

Definition at line 204 of file ethernet.h.

◆ SUBINT_CONFIG_MATCH_1_TAG

#define SUBINT_CONFIG_MATCH_1_TAG   (1<<1)

Definition at line 205 of file ethernet.h.

◆ SUBINT_CONFIG_MATCH_2_TAG

#define SUBINT_CONFIG_MATCH_2_TAG   (1<<2)

Definition at line 206 of file ethernet.h.

◆ SUBINT_CONFIG_MATCH_3_TAG

#define SUBINT_CONFIG_MATCH_3_TAG   (1<<3)

Definition at line 207 of file ethernet.h.

◆ SUBINT_CONFIG_P2P

#define SUBINT_CONFIG_P2P   (1<<6)

Definition at line 210 of file ethernet.h.

◆ SUBINT_CONFIG_VALID

#define SUBINT_CONFIG_VALID   (1<<4)

Definition at line 208 of file ethernet.h.

Typedef Documentation

◆ ethernet_address_change_function_t

typedef void() ethernet_address_change_function_t(struct ethernet_main_t_ *im, u32 sw_if_index, uword opaque)

Definition at line 270 of file ethernet.h.

◆ ethernet_flag_change_function_t

typedef u32() ethernet_flag_change_function_t(vnet_main_t *vnm, struct vnet_hw_interface_t *hi, u32 flags)

Definition at line 130 of file ethernet.h.

◆ ethernet_interface_t

◆ ethernet_main_t

Enumeration Type Documentation

◆ ethernet_error_t

Enumerator
ETHERNET_N_ERROR 

Definition at line 186 of file ethernet.h.

Function Documentation

◆ eth_create_valid_subint_match_flags()

static u32 eth_create_valid_subint_match_flags ( u32  num_tags)
inlinestatic

Definition at line 215 of file ethernet.h.

+ Here is the caller graph for this function:

◆ eth_identify_subint()

static u32 eth_identify_subint ( vnet_hw_interface_t hi,
u32  match_flags,
main_intf_t main_intf,
vlan_intf_t vlan_intf,
qinq_intf_t qinq_intf,
u32 new_sw_if_index,
u8 error0,
u32 is_l2 
)
inlinestatic

Definition at line 521 of file ethernet.h.

+ Here is the caller graph for this function:

◆ eth_vlan_table_lookups()

static void eth_vlan_table_lookups ( ethernet_main_t em,
vnet_main_t vnm,
u32  port_sw_if_index0,
u16  first_ethertype,
u16  outer_id,
u16  inner_id,
vnet_hw_interface_t **  hi,
main_intf_t **  main_intf,
vlan_intf_t **  vlan_intf,
qinq_intf_t **  qinq_intf 
)
inlinestatic

Definition at line 482 of file ethernet.h.

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

◆ ethernet_buffer_get_header()

static ethernet_header_t* ethernet_buffer_get_header ( vlib_buffer_t b)
inlinestatic

Definition at line 408 of file ethernet.h.

+ Here is the caller graph for this function:

◆ ethernet_build_rewrite()

u8* ethernet_build_rewrite ( vnet_main_t vnm,
u32  sw_if_index,
vnet_link_t  link_type,
const void *  dst_address 
)

build a rewrite string to use for sending packets of type 'link_type' to 'dst_address'

Definition at line 83 of file interface.c.

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

◆ ethernet_delete_interface()

void ethernet_delete_interface ( vnet_main_t vnm,
u32  hw_if_index 
)

Definition at line 378 of file interface.c.

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

◆ ethernet_frame_is_any_tagged_x2()

static_always_inline int ethernet_frame_is_any_tagged_x2 ( u16  type0,
u16  type1 
)

Definition at line 92 of file ethernet.h.

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

◆ ethernet_frame_is_any_tagged_x4()

static_always_inline int ethernet_frame_is_any_tagged_x4 ( u16  type0,
u16  type1,
u16  type2,
u16  type3 
)

Definition at line 104 of file ethernet.h.

+ Here is the call graph for this function:

◆ ethernet_frame_is_tagged()

static_always_inline int ethernet_frame_is_tagged ( u16  type)

Definition at line 78 of file ethernet.h.

+ Here is the caller graph for this function:

◆ ethernet_get_interface()

ethernet_interface_t* ethernet_get_interface ( ethernet_main_t em,
u32  hw_if_index 
)

Definition at line 967 of file interface.c.

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

◆ ethernet_get_main()

ethernet_main_t* ethernet_get_main ( vlib_main_t vm)

Definition at line 125 of file init.c.

+ Here is the caller graph for this function:

◆ ethernet_get_type_info()

static ethernet_type_info_t* ethernet_get_type_info ( ethernet_main_t em,
ethernet_type_t  type 
)
inlinestatic

Definition at line 333 of file ethernet.h.

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

◆ ethernet_input_init()

void ethernet_input_init ( vlib_main_t vm,
ethernet_main_t em 
)

Definition at line 2253 of file node.c.

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

◆ ethernet_interface_add_del_address()

mac_address_t* ethernet_interface_add_del_address ( ethernet_main_t em,
u32  hw_if_index,
const u8 address,
u8  is_add 
)

Definition at line 977 of file interface.c.

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

◆ ethernet_register_input_type()

void ethernet_register_input_type ( vlib_main_t vm,
ethernet_type_t  type,
u32  node_index 
)

Definition at line 2276 of file node.c.

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

◆ ethernet_register_interface()

clib_error_t* ethernet_register_interface ( vnet_main_t vnm,
u32  dev_class_index,
u32  dev_instance,
const u8 address,
u32 hw_if_index_return,
ethernet_flag_change_function_t  flag_change 
)

Definition at line 331 of file interface.c.

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

◆ ethernet_register_l2_input()

void ethernet_register_l2_input ( vlib_main_t vm,
u32  node_index 
)

Definition at line 2312 of file node.c.

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

◆ ethernet_register_l3_redirect()

void ethernet_register_l3_redirect ( vlib_main_t vm,
u32  node_index 
)

Definition at line 2333 of file node.c.

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

◆ ethernet_set_flags()

u32 ethernet_set_flags ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)

Definition at line 426 of file interface.c.

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

◆ ethernet_set_rx_redirect()

void ethernet_set_rx_redirect ( vnet_main_t vnm,
vnet_hw_interface_t hi,
u32  enable 
)

Definition at line 2162 of file node.c.

+ Here is the call graph for this function:

◆ ethernet_setup_node()

static void ethernet_setup_node ( vlib_main_t vm,
u32  node_index 
)
inlinestatic

Definition at line 397 of file ethernet.h.

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

◆ ethernet_sw_interface_set_l2_mode()

void ethernet_sw_interface_set_l2_mode ( vnet_main_t vnm,
u32  sw_if_index,
u32  l2 
)

Definition at line 1973 of file node.c.

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

◆ ethernet_sw_interface_set_l2_mode_noport()

void ethernet_sw_interface_set_l2_mode_noport ( vnet_main_t vnm,
u32  sw_if_index,
u32  l2 
)

Definition at line 2022 of file node.c.

+ Here is the call graph for this function:

◆ ethernet_update_adjacency()

void ethernet_update_adjacency ( vnet_main_t vnm,
u32  sw_if_index,
u32  ai 
)

Definition at line 198 of file interface.c.

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

◆ format_ethernet_address()

u8* format_ethernet_address ( u8 s,
va_list *  args 
)

Definition at line 44 of file format.c.

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

◆ format_ethernet_header()

u8* format_ethernet_header ( u8 s,
va_list *  args 
)

Definition at line 178 of file format.c.

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

◆ format_ethernet_header_with_length()

u8* format_ethernet_header_with_length ( u8 s,
va_list *  args 
)

Definition at line 97 of file format.c.

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

◆ format_ethernet_type()

u8* format_ethernet_type ( u8 s,
va_list *  args 
)

Definition at line 64 of file format.c.

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

◆ format_ethernet_vlan_tci()

u8* format_ethernet_vlan_tci ( u8 s,
va_list *  va 
)

Definition at line 79 of file format.c.

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

◆ format_mac_address()

u8* format_mac_address ( u8 s,
va_list *  args 
)

Definition at line 58 of file format.c.

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

◆ next_by_ethertype_init()

clib_error_t* next_by_ethertype_init ( next_by_ethertype_t l3_next)

Definition at line 2177 of file node.c.

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

◆ next_by_ethertype_register()

clib_error_t* next_by_ethertype_register ( next_by_ethertype_t l3_next,
u32  ethertype,
u32  next_index 
)

Definition at line 2207 of file node.c.

+ Here is the caller graph for this function:

◆ unformat_ethernet_address()

uword unformat_ethernet_address ( unformat_input_t input,
va_list *  args 
)

Definition at line 233 of file format.c.

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

◆ unformat_ethernet_header()

uword unformat_ethernet_header ( unformat_input_t input,
va_list *  args 
)

Definition at line 290 of file format.c.

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

◆ unformat_ethernet_interface()

uword unformat_ethernet_interface ( unformat_input_t input,
va_list *  args 
)

Definition at line 310 of file interface.c.

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

◆ unformat_ethernet_type_host_byte_order()

uword unformat_ethernet_type_host_byte_order ( unformat_input_t input,
va_list *  args 
)

Definition at line 249 of file format.c.

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

◆ unformat_ethernet_type_net_byte_order()

uword unformat_ethernet_type_net_byte_order ( unformat_input_t input,
va_list *  args 
)

Definition at line 278 of file format.c.

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

◆ unformat_mac_address()

uword unformat_mac_address ( unformat_input_t input,
va_list *  args 
)

Definition at line 241 of file format.c.

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

◆ unformat_pg_ethernet_header()

uword unformat_pg_ethernet_header ( unformat_input_t input,
va_list *  args 
)

Definition at line 82 of file pg.c.

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

◆ vnet_create_loopback_interface()

int vnet_create_loopback_interface ( u32 sw_if_indexp,
u8 mac_address,
u8  is_specified,
u32  user_instance 
)

Definition at line 816 of file interface.c.

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

◆ vnet_create_sub_interface()

int vnet_create_sub_interface ( u32  sw_if_index,
u32  id,
u32  flags,
u16  inner_vlan_id,
u16  outer_vlan_id,
u32 sub_sw_if_index 
)

Definition at line 1044 of file interface.c.

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

◆ vnet_delete_loopback_interface()

int vnet_delete_loopback_interface ( u32  sw_if_index)

Definition at line 1024 of file interface.c.

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

◆ vnet_delete_sub_interface()

int vnet_delete_sub_interface ( u32  sw_if_index)

Definition at line 1086 of file interface.c.

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

◆ vnet_get_ethernet_main()

static ethernet_main_t* vnet_get_ethernet_main ( void  )
inlinestatic

Definition at line 571 of file ethernet.h.

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

Variable Documentation

◆ ethernet_hw_interface_class

vnet_hw_interface_class_t ethernet_hw_interface_class

◆ ethernet_input_node

vlib_node_registration_t ethernet_input_node
Initial value:
= {
.name = "ethernet-input",
.vector_size = sizeof (u32),
.scalar_size = sizeof (ethernet_input_frame_t),
.n_errors = ETHERNET_N_ERROR,
.error_strings = ethernet_error_strings,
.n_next_nodes = ETHERNET_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_ethernet_input_trace,
.unformat_buffer = unformat_ethernet_header,
}
static char * ethernet_error_strings[]
Definition: node.c:2110
unsigned int u32
Definition: types.h:88
static u8 * format_ethernet_input_trace(u8 *s, va_list *va)
Definition: node.c:72
u8 * format_ethernet_header_with_length(u8 *s, va_list *args)
Definition: format.c:97
#define foreach_ethernet_input_next
Definition: node.c:49
uword unformat_ethernet_header(unformat_input_t *input, va_list *args)
Definition: format.c:290

(constructor) VLIB_REGISTER_NODE (ethernet_input_node)

Definition at line 2117 of file node.c.

◆ ethernet_main

ethernet_main_t ethernet_main

Definition at line 45 of file init.c.