Home | History | Annotate | Download | only in gpxe
      1 #ifndef	_GPXE_IF_ETHER_H
      2 #define	_GPXE_IF_ETHER_H
      3 
      4 FILE_LICENCE ( GPL2_OR_LATER );
      5 
      6 #include <stdint.h>
      7 
      8 #define ETH_ALEN		6	/* Size of Ethernet address */
      9 #define ETH_HLEN		14	/* Size of ethernet header */
     10 #define	ETH_ZLEN		60	/* Minimum packet */
     11 #define	ETH_FRAME_LEN		1514	/* Maximum packet */
     12 #define ETH_DATA_ALIGN		2	/* Amount needed to align the data after an ethernet header */
     13 #ifndef	ETH_MAX_MTU
     14 #define	ETH_MAX_MTU		(ETH_FRAME_LEN-ETH_HLEN)
     15 #endif
     16 
     17 #define ETH_P_RAW	0x0000	/* Raw packet */
     18 #define ETH_P_IP	0x0800	/* Internet Protocl Packet */
     19 #define ETH_P_ARP	0x0806	/* Address Resolution Protocol */
     20 #define ETH_P_RARP	0x8035	/* Reverse Address resolution Protocol */
     21 #define ETH_P_IPV6	0x86DD	/* IPv6 over blueblook */
     22 #define ETH_P_SLOW	0x8809	/* Ethernet slow protocols */
     23 #define ETH_P_EAPOL	0x888E	/* 802.1X EAP over LANs */
     24 #define ETH_P_AOE	0x88A2	/* ATA over Ethernet */
     25 
     26 /** An Ethernet link-layer header */
     27 struct ethhdr {
     28 	/** Destination MAC address */
     29         uint8_t h_dest[ETH_ALEN];
     30 	/** Source MAC address */
     31         uint8_t h_source[ETH_ALEN];
     32 	/** Protocol ID */
     33         uint16_t h_protocol;
     34 } __attribute__ ((packed));
     35 
     36 #endif	/* _GPXE_IF_ETHER_H */
     37