37 #ifndef LWIP_HDR_PROT_ETHERNET_H
38 #define LWIP_HDR_PROT_ETHERNET_H
47 #ifndef ETH_HWADDR_LEN
48 #ifdef ETHARP_HWADDR_LEN
49 #define ETH_HWADDR_LEN ETHARP_HWADDR_LEN
51 #define ETH_HWADDR_LEN 6
55 #ifdef PACK_STRUCT_USE_INCLUDES
64 #ifdef PACK_STRUCT_USE_INCLUDES
69 #define ETH_ADDR(b0, b1, b2, b3, b4, b5) {{b0, b1, b2, b3, b4, b5}}
71 #ifdef PACK_STRUCT_USE_INCLUDES
85 #ifdef PACK_STRUCT_USE_INCLUDES
89 #define SIZEOF_ETH_HDR (14 + ETH_PAD_SIZE)
91 #ifdef PACK_STRUCT_USE_INCLUDES
103 #ifdef PACK_STRUCT_USE_INCLUDES
107 #define SIZEOF_VLAN_HDR 4
108 #define VLAN_ID(vlan_hdr) (lwip_htons((vlan_hdr)->prio_vid) & 0xFFF)
111 #define LL_IP4_MULTICAST_ADDR_0 0x01
112 #define LL_IP4_MULTICAST_ADDR_1 0x00
113 #define LL_IP4_MULTICAST_ADDR_2 0x5e
116 #define LL_IP6_MULTICAST_ADDR_0 0x33
117 #define LL_IP6_MULTICAST_ADDR_1 0x33
119 #define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETH_HWADDR_LEN) == 0)
#define PACK_STRUCT_END
Definition: arch.h:316
uint8_t u8_t
Definition: arch.h:125
#define PACK_STRUCT_BEGIN
Definition: arch.h:307
uint16_t u16_t
Definition: arch.h:127
#define PACK_STRUCT_FLD_8(x)
Definition: arch.h:347
#define ETH_PAD_SIZE
Definition: opt.h:692
PACK_STRUCT_BEGIN struct eth_addr PACK_STRUCT_STRUCT
#define ETH_HWADDR_LEN
Definition: ethernet.h:51
Definition: ethernet.h:60
PACK_STRUCT_FLD_8(u8_t addr[ETH_HWADDR_LEN])
Definition: ethernet.h:76
PACK_STRUCT_FLD_S(struct eth_addr src)
PACK_STRUCT_FLD_S(struct eth_addr dest)
PACK_STRUCT_FIELD(u16_t type)
Definition: ethernet.h:98
PACK_STRUCT_FIELD(u16_t tpid)
PACK_STRUCT_FIELD(u16_t prio_vid)