Changeset View
Changeset View
Standalone View
Standalone View
sys/net/ethernet.h
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Structure of a 48-bit Ethernet address. | * Structure of a 48-bit Ethernet address. | ||||
*/ | */ | ||||
struct ether_addr { | struct ether_addr { | ||||
u_char octet[ETHER_ADDR_LEN]; | u_char octet[ETHER_ADDR_LEN]; | ||||
} __packed; | } __packed; | ||||
#define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */ | #define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */ | ||||
#define ETHER_IS_BROADCAST(addr) \ | |||||
(((addr)[0] & (addr)[1] & (addr)[2] & \ | |||||
(addr)[3] & (addr)[4] & (addr)[5]) == 0xff) | |||||
/* | /* | ||||
* 802.1q Virtual LAN header. | * 802.1q Virtual LAN header. | ||||
*/ | */ | ||||
struct ether_vlan_header { | struct ether_vlan_header { | ||||
uint8_t evl_dhost[ETHER_ADDR_LEN]; | uint8_t evl_dhost[ETHER_ADDR_LEN]; | ||||
uint8_t evl_shost[ETHER_ADDR_LEN]; | uint8_t evl_shost[ETHER_ADDR_LEN]; | ||||
uint16_t evl_encap_proto; | uint16_t evl_encap_proto; | ||||
▲ Show 20 Lines • Show All 344 Lines • Show Last 20 Lines |