|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
40 #ifndef included_ethernet_packet_h
41 #define included_ethernet_packet_h
47 #define ethernet_type(n,s) ETHERNET_TYPE_##s = n,
62 #define ETHERNET_ADDRESS_UNICAST 0
63 #define ETHERNET_ADDRESS_MULTICAST 1
69 return (
a[0] >> 0) & 1;
82 return (
a[0] >> 1) & 1;
133 #define ETHERNET_N_VLAN (1 << 12)
143 u8 *bytes = (
u8 *) (&
h->priority_cfi_and_id);
146 bytes[0] |= (prio & 0xf) << 4;
152 u8 *bytes = (
u8 *) (&
h->priority_cfi_and_id);
154 return (bytes[0] >> 4);
184 #define ETHERNET_N_PBB (1 << 24)
202 u32 priority_dei_uca_res_sid;
203 }) ethernet_pbb_header_packed_t;
static void ethernet_address_set_locally_administered(u8 *a)
@ VNET_INTERFACE_COUNTER_RX_MULTICAST
static uword ethernet_address_is_locally_administered(const u8 *a)
static int eh_dst_addr_to_rx_ctype(const ethernet_header_t *eh)
@ VNET_INTERFACE_COUNTER_TX_BROADCAST
@ VNET_INTERFACE_COUNTER_RX_BROADCAST
static void ethernet_vlan_header_set_priority_net_order(ethernet_vlan_header_t *h, u8 prio)
static u8 ethernet_vlan_header_get_priority_net_order(ethernet_vlan_header_t *h)
#define clib_mem_unaligned(pointer, type)
typedef CLIB_PACKED(struct { u8 b_dst_address[6];u8 b_src_address[6];u16 b_type;u16 priority_dei_id;u16 i_type;u32 priority_dei_uca_res_sid;}) ethernet_pbb_header_packed_t
static int ethernet_address_is_broadcast(const u8 *a)
static uword ethernet_address_cast(const u8 *a)
static int eh_dst_addr_to_tx_ctype(const ethernet_header_t *eh)
@ VNET_INTERFACE_COUNTER_TX_MULTICAST
#define ETHERNET_ADDRESS_UNICAST
vl_api_address_union_t src_address
@ VNET_INTERFACE_COUNTER_TX_UNICAST
@ VNET_INTERFACE_COUNTER_RX_UNICAST