FD.io VPP
v19.01.2-3-gf61a1a8
Vector Packet Processing
|
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_main_t |
struct | wc_arp_report_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_FLAG_ACCEPT_ALL (1 << 0) |
#define | ETHERNET_INTERFACE_FLAG_CONFIG_PROMISC(flags) (((flags) & ~ETHERNET_INTERFACE_FLAG_ACCEPT_ALL) == 0) |
#define | ETHERNET_INTERFACE_FLAG_MTU (1 << 1) |
#define | ETHERNET_INTERFACE_FLAG_CONFIG_MTU(flags) ((flags) & ETHERNET_INTERFACE_FLAG_MTU) |
#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 |
Enumerations | |
enum | ethernet_error_t { ETHERNET_N_ERROR } |
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... | |
#define ETH_INPUT_FRAME_F_IP4_CKSUM_OK (1 << 1) |
Definition at line 54 of file ethernet.h.
#define ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX (1 << 0) |
Definition at line 51 of file ethernet.h.
#define ethernet_buffer_adjust_vlan_count | ( | b, | |
v | |||
) |
Adjusts the vlan count by the delta in 'v'.
Definition at line 432 of file ethernet.h.
#define ethernet_buffer_adjust_vlan_count_by_bytes | ( | b, | |
v | |||
) |
Adjusts the vlan count by the header size byte delta in 'v'.
Definition at line 438 of file ethernet.h.
#define ethernet_buffer_get_vlan_count | ( | b | ) |
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 418 of file ethernet.h.
#define ethernet_buffer_header_size | ( | b | ) |
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 453 of file ethernet.h.
#define ethernet_buffer_set_vlan_count | ( | b, | |
v | |||
) |
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 426 of file ethernet.h.
#define ethernet_error | ( | n, | |
c, | |||
s | |||
) | ETHERNET_ERROR_##n, |
Definition at line 211 of file ethernet.h.
#define ETHERNET_INTERFACE_FLAG_ACCEPT_ALL (1 << 0) |
Definition at line 174 of file ethernet.h.
#define ETHERNET_INTERFACE_FLAG_CONFIG_MTU | ( | flags | ) | ((flags) & ETHERNET_INTERFACE_FLAG_MTU) |
Definition at line 180 of file ethernet.h.
#define ETHERNET_INTERFACE_FLAG_CONFIG_PROMISC | ( | flags | ) | (((flags) & ~ETHERNET_INTERFACE_FLAG_ACCEPT_ALL) == 0) |
Definition at line 175 of file ethernet.h.
#define ETHERNET_INTERFACE_FLAG_MTU (1 << 1) |
Definition at line 179 of file ethernet.h.
#define ETHERNET_MAX_PACKET_BYTES 9216 |
Definition at line 166 of file ethernet.h.
#define ETHERNET_MIN_PACKET_BYTES 64 |
Definition at line 165 of file ethernet.h.
#define SUBINT_CONFIG_L2 (1<<5) |
Definition at line 232 of file ethernet.h.
#define SUBINT_CONFIG_MATCH_0_TAG (1<<0) |
Definition at line 227 of file ethernet.h.
#define SUBINT_CONFIG_MATCH_1_TAG (1<<1) |
Definition at line 228 of file ethernet.h.
#define SUBINT_CONFIG_MATCH_2_TAG (1<<2) |
Definition at line 229 of file ethernet.h.
#define SUBINT_CONFIG_MATCH_3_TAG (1<<3) |
Definition at line 230 of file ethernet.h.
#define SUBINT_CONFIG_P2P (1<<6) |
Definition at line 233 of file ethernet.h.
#define SUBINT_CONFIG_VALID (1<<4) |
Definition at line 231 of file ethernet.h.
typedef u32( ethernet_flag_change_function_t) (vnet_main_t *vnm, struct vnet_hw_interface_t *hi, u32 flags) |
Definition at line 163 of file ethernet.h.
typedef struct ethernet_interface ethernet_interface_t |
enum ethernet_error_t |
Enumerator | |
---|---|
ETHERNET_N_ERROR |
Definition at line 209 of file ethernet.h.
void arp_update_adjacency | ( | vnet_main_t * | vnm, |
u32 | sw_if_index, | ||
u32 | ai | ||
) |
|
inlinestatic |
|
inlinestatic |
Definition at line 480 of file ethernet.h.
void ethernet_arp_change_mac | ( | u32 | sw_if_index | ) |
|
inlinestatic |
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 80 of file interface.c.
void ethernet_delete_interface | ( | vnet_main_t * | vnm, |
u32 | hw_if_index | ||
) |
Definition at line 323 of file interface.c.
static_always_inline int ethernet_frame_is_any_tagged_x2 | ( | u16 | type0, |
u16 | type1 | ||
) |
Definition at line 125 of file ethernet.h.
static_always_inline int ethernet_frame_is_any_tagged_x4 | ( | u16 | type0, |
u16 | type1, | ||
u16 | type2, | ||
u16 | type3 | ||
) |
static_always_inline int ethernet_frame_is_tagged | ( | u16 | type | ) |
ethernet_interface_t* ethernet_get_interface | ( | ethernet_main_t * | em, |
u32 | hw_if_index | ||
) |
Definition at line 888 of file interface.c.
ethernet_main_t* ethernet_get_main | ( | vlib_main_t * | vm | ) |
|
inlinestatic |
Definition at line 338 of file ethernet.h.
const u8* ethernet_ip4_mcast_dst_addr | ( | void | ) |
const u8* ethernet_ip6_mcast_dst_addr | ( | void | ) |
Definition at line 73 of file ethernet.h.
|
inlinestatic |
Definition at line 85 of file ethernet.h.
|
inlinestatic |
void ethernet_ndp_change_mac | ( | u32 | sw_if_index | ) |
void ethernet_register_input_type | ( | vlib_main_t * | vm, |
ethernet_type_t | type, | ||
u32 | node_index | ||
) |
clib_error_t* ethernet_register_interface | ( | vnet_main_t * | vnm, |
u32 | dev_class_index, | ||
u32 | dev_instance, | ||
u8 * | address, | ||
u32 * | hw_if_index_return, | ||
ethernet_flag_change_function_t | flag_change | ||
) |
Definition at line 277 of file interface.c.
void ethernet_register_l2_input | ( | vlib_main_t * | vm, |
u32 | node_index | ||
) |
void ethernet_register_l3_redirect | ( | vlib_main_t * | vm, |
u32 | node_index | ||
) |
u32 ethernet_set_flags | ( | vnet_main_t * | vnm, |
u32 | hw_if_index, | ||
u32 | flags | ||
) |
Definition at line 371 of file interface.c.
void ethernet_set_rx_redirect | ( | vnet_main_t * | vnm, |
vnet_hw_interface_t * | hi, | ||
u32 | enable | ||
) |
|
inlinestatic |
Definition at line 398 of file ethernet.h.
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_update_adjacency | ( | vnet_main_t * | vnm, |
u32 | sw_if_index, | ||
u32 | ai | ||
) |
Definition at line 195 of file interface.c.
clib_error_t* next_by_ethertype_init | ( | next_by_ethertype_t * | l3_next | ) |
clib_error_t* next_by_ethertype_register | ( | next_by_ethertype_t * | l3_next, |
u32 | ethertype, | ||
u32 | next_index | ||
) |
uword unformat_ethernet_address | ( | 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 | ||
) |
Definition at line 256 of file interface.c.
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_mac_address | ( | unformat_input_t * | input, |
va_list * | args | ||
) |
uword unformat_pg_ethernet_header | ( | unformat_input_t * | input, |
va_list * | args | ||
) |
int vnet_add_del_ip4_arp_change_event | ( | vnet_main_t * | vnm, |
void * | data_callback, | ||
u32 | pid, | ||
void * | address_arg, | ||
uword | node_index, | ||
uword | type_opaque, | ||
uword | data, | ||
int | is_add | ||
) |
int vnet_create_loopback_interface | ( | u32 * | sw_if_indexp, |
u8 * | mac_address, | ||
u8 | is_specified, | ||
u32 | user_instance | ||
) |
Definition at line 737 of file interface.c.
int vnet_delete_loopback_interface | ( | u32 | sw_if_index | ) |
Definition at line 898 of file interface.c.
int vnet_delete_sub_interface | ( | u32 | sw_if_index | ) |
Definition at line 918 of file interface.c.
|
inlinestatic |
Definition at line 578 of file ethernet.h.
void vnet_register_ip4_arp_resolution_event | ( | vnet_main_t * | vnm, |
void * | address_arg, | ||
uword | node_index, | ||
uword | type_opaque, | ||
uword | data | ||
) |
vnet_hw_interface_class_t ethernet_hw_interface_class |
vlib_node_registration_t ethernet_input_node |
(constructor) VLIB_REGISTER_NODE (ethernet_input_node)
ethernet_main_t ethernet_main |