ethernet.h

Go to the documentation of this file.
00001 /*
00002  * Fundamental constants relating to ethernet.
00003  *
00004  * $FreeBSD: src/sys/net/ethernet.h,v 1.12.2.8 2002/12/01 14:03:09 sobomax Exp $
00005  * $DragonFly: src/sys/net/ethernet.h,v 1.19 2008/06/24 11:40:56 sephe Exp $
00006  *
00007  */
00008 
00009 #ifndef _NET_ETHERNET_H_
00010 #define _NET_ETHERNET_H_
00011 
00012 /*
00013  * The number of bytes in an ethernet (MAC) address.
00014  */
00015 #define ETHER_ADDR_LEN          6
00016 
00017 /*
00018  * The number of bytes in the type field.
00019  */
00020 #define ETHER_TYPE_LEN          2
00021 
00022 /*
00023  * The number of bytes in the trailing CRC field.
00024  */
00025 #define ETHER_CRC_LEN           4
00026 
00027 /*
00028  * Mbuf adjust factor to force 32-bit alignment of IP header.
00029  * Drivers should do m_adj(m, ETHER_ALIGN) when setting up a
00030  * receive so the upper layers get the IP header properly aligned
00031  * past the 14-byte Ethernet header.
00032  */
00033 #define ETHER_ALIGN             2
00034 
00035 /*
00036  * The length of the combined header.
00037  */
00038 #define ETHER_HDR_LEN           (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN)
00039 
00040 /*
00041  * The minimum packet length.
00042  */
00043 #define ETHER_MIN_LEN           64
00044 
00045 /*
00046  * The maximum packet length.
00047  */
00048 #define ETHER_MAX_LEN           1518
00049 
00050 /*
00051  * A macro to validate a length with
00052  */
00053 #define ETHER_IS_VALID_LEN(foo) \
00054         ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
00055 
00056 /*
00057  * Ethernet CRC32 polynomials (big- and little-endian verions).
00058  */
00059 #define ETHER_CRC_POLY_LE       0xedb88320
00060 #define ETHER_CRC_POLY_BE       0x04c11db6
00061 
00062 /*
00063  * Structure of a 10Mb/s Ethernet header.
00064  */
00065 struct  ether_header {
00066         u_char  ether_dhost[ETHER_ADDR_LEN];
00067         u_char  ether_shost[ETHER_ADDR_LEN];
00068         u_short ether_type;
00069 };
00070 
00071 /*
00072  * Structure of a 48-bit Ethernet address.
00073  */
00074 struct  ether_addr {
00075         u_char octet[ETHER_ADDR_LEN];
00076 };
00077 
00078 extern const uint8_t    etherbroadcastaddr[ETHER_ADDR_LEN];
00079 
00080 #define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */
00081 
00082 /*
00083  *  NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields.
00084  *  However, there are some conflicts.
00085  */
00086 
00087 #define ETHERTYPE_8023          0x0004  /* IEEE 802.3 packet */
00088                    /* 0x0101 .. 0x1FF      Experimental */
00089 #define ETHERTYPE_PUP           0x0200  /* Xerox PUP protocol - see 0A00 */
00090 #define ETHERTYPE_PUPAT         0x0200  /* PUP Address Translation - see 0A01 */
00091 #define ETHERTYPE_SPRITE        0x0500  /* ??? */
00092                              /* 0x0400     Nixdorf */
00093 #define ETHERTYPE_NS            0x0600  /* XNS */
00094 #define ETHERTYPE_NSAT          0x0601  /* XNS Address Translation (3Mb only) */
00095 #define ETHERTYPE_DLOG1         0x0660  /* DLOG (?) */
00096 #define ETHERTYPE_DLOG2         0x0661  /* DLOG (?) */
00097 #define ETHERTYPE_IP            0x0800  /* IP protocol */
00098 #define ETHERTYPE_X75           0x0801  /* X.75 Internet */
00099 #define ETHERTYPE_NBS           0x0802  /* NBS Internet */
00100 #define ETHERTYPE_ECMA          0x0803  /* ECMA Internet */
00101 #define ETHERTYPE_CHAOS         0x0804  /* CHAOSnet */
00102 #define ETHERTYPE_X25           0x0805  /* X.25 Level 3 */
00103 #define ETHERTYPE_ARP           0x0806  /* Address resolution protocol */
00104 #define ETHERTYPE_NSCOMPAT      0x0807  /* XNS Compatibility */
00105 #define ETHERTYPE_FRARP         0x0808  /* Frame Relay ARP (RFC1701) */
00106                              /* 0x081C     Symbolics Private */
00107                     /* 0x0888 - 0x088A     Xyplex */
00108 #define ETHERTYPE_UBDEBUG       0x0900  /* Ungermann-Bass network debugger */
00109 #define ETHERTYPE_IEEEPUP       0x0A00  /* Xerox IEEE802.3 PUP */
00110 #define ETHERTYPE_IEEEPUPAT     0x0A01  /* Xerox IEEE802.3 PUP Address Translation */
00111 #define ETHERTYPE_VINES         0x0BAD  /* Banyan VINES */
00112 #define ETHERTYPE_VINESLOOP     0x0BAE  /* Banyan VINES Loopback */
00113 #define ETHERTYPE_VINESECHO     0x0BAF  /* Banyan VINES Echo */
00114 
00115 /*                     0x1000 - 0x100F     Berkeley Trailer */
00116 /*
00117  * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
00118  * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
00119  * by an ETHER type (as given above) and then the (variable-length) header.
00120  */
00121 #define ETHERTYPE_TRAIL         0x1000  /* Trailer packet */
00122 #define ETHERTYPE_NTRAILER      16
00123 
00124 #define ETHERTYPE_DCA           0x1234  /* DCA - Multicast */
00125 #define ETHERTYPE_VALID         0x1600  /* VALID system protocol */
00126 #define ETHERTYPE_DOGFIGHT      0x1989  /* Artificial Horizons ("Aviator" dogfight simulator [on Sun]) */
00127 #define ETHERTYPE_RCL           0x1995  /* Datapoint Corporation (RCL lan protocol) */
00128 
00129                                         /* The following 3C0x types
00130                                            are unregistered: */
00131 #define ETHERTYPE_NBPVCD        0x3C00  /* 3Com NBP virtual circuit datagram (like XNS SPP) not registered */
00132 #define ETHERTYPE_NBPSCD        0x3C01  /* 3Com NBP System control datagram not registered */
00133 #define ETHERTYPE_NBPCREQ       0x3C02  /* 3Com NBP Connect request (virtual cct) not registered */
00134 #define ETHERTYPE_NBPCRSP       0x3C03  /* 3Com NBP Connect repsonse not registered */
00135 #define ETHERTYPE_NBPCC         0x3C04  /* 3Com NBP Connect complete not registered */
00136 #define ETHERTYPE_NBPCLREQ      0x3C05  /* 3Com NBP Close request (virtual cct) not registered */
00137 #define ETHERTYPE_NBPCLRSP      0x3C06  /* 3Com NBP Close response not registered */
00138 #define ETHERTYPE_NBPDG         0x3C07  /* 3Com NBP Datagram (like XNS IDP) not registered */
00139 #define ETHERTYPE_NBPDGB        0x3C08  /* 3Com NBP Datagram broadcast not registered */
00140 #define ETHERTYPE_NBPCLAIM      0x3C09  /* 3Com NBP Claim NetBIOS name not registered */
00141 #define ETHERTYPE_NBPDLTE       0x3C0A  /* 3Com NBP Delete Netbios name not registered */
00142 #define ETHERTYPE_NBPRAS        0x3C0B  /* 3Com NBP Remote adaptor status request not registered */
00143 #define ETHERTYPE_NBPRAR        0x3C0C  /* 3Com NBP Remote adaptor response not registered */
00144 #define ETHERTYPE_NBPRST        0x3C0D  /* 3Com NBP Reset not registered */
00145 
00146 #define ETHERTYPE_PCS           0x4242  /* PCS Basic Block Protocol */
00147 #define ETHERTYPE_IMLBLDIAG     0x424C  /* Information Modes Little Big LAN diagnostic */
00148 #define ETHERTYPE_DIDDLE        0x4321  /* THD - Diddle */
00149 #define ETHERTYPE_IMLBL         0x4C42  /* Information Modes Little Big LAN */
00150 #define ETHERTYPE_SIMNET        0x5208  /* BBN Simnet Private */
00151 #define ETHERTYPE_DECEXPER      0x6000  /* DEC Unassigned, experimental */
00152 #define ETHERTYPE_MOPDL         0x6001  /* DEC MOP dump/load */
00153 #define ETHERTYPE_MOPRC         0x6002  /* DEC MOP remote console */
00154 #define ETHERTYPE_DECnet        0x6003  /* DEC DECNET Phase IV route */
00155 #define ETHERTYPE_DN            ETHERTYPE_DECnet        /* libpcap, tcpdump */
00156 #define ETHERTYPE_LAT           0x6004  /* DEC LAT */
00157 #define ETHERTYPE_DECDIAG       0x6005  /* DEC diagnostic protocol (at interface initialization?) */
00158 #define ETHERTYPE_DECCUST       0x6006  /* DEC customer protocol */
00159 #define ETHERTYPE_SCA           0x6007  /* DEC LAVC, SCA */
00160 #define ETHERTYPE_AMBER         0x6008  /* DEC AMBER */
00161 #define ETHERTYPE_DECMUMPS      0x6009  /* DEC MUMPS */
00162                     /* 0x6010 - 0x6014     3Com Corporation */
00163 #define ETHERTYPE_TRANSETHER    0x6558  /* Trans Ether Bridging (RFC1701)*/
00164 #define ETHERTYPE_RAWFR         0x6559  /* Raw Frame Relay (RFC1701) */
00165 #define ETHERTYPE_UBDL          0x7000  /* Ungermann-Bass download */
00166 #define ETHERTYPE_UBNIU         0x7001  /* Ungermann-Bass NIUs */
00167 #define ETHERTYPE_UBDIAGLOOP    0x7002  /* Ungermann-Bass diagnostic/loopback */
00168 #define ETHERTYPE_UBNMC         0x7003  /* Ungermann-Bass ??? (NMC to/from UB Bridge) */
00169 #define ETHERTYPE_UBBST         0x7005  /* Ungermann-Bass Bridge Spanning Tree */
00170 #define ETHERTYPE_OS9           0x7007  /* OS/9 Microware */
00171 #define ETHERTYPE_OS9NET        0x7009  /* OS/9 Net? */
00172                     /* 0x7020 - 0x7029     LRT (England) (now Sintrom) */
00173 #define ETHERTYPE_RACAL         0x7030  /* Racal-Interlan */
00174 #define ETHERTYPE_PRIMENTS      0x7031  /* Prime NTS (Network Terminal Service) */
00175 #define ETHERTYPE_CABLETRON     0x7034  /* Cabletron */
00176 #define ETHERTYPE_CRONUSVLN     0x8003  /* Cronus VLN */
00177 #define ETHERTYPE_CRONUS        0x8004  /* Cronus Direct */
00178 #define ETHERTYPE_HP            0x8005  /* HP Probe */
00179 #define ETHERTYPE_NESTAR        0x8006  /* Nestar */
00180 #define ETHERTYPE_ATTSTANFORD   0x8008  /* AT&T/Stanford (local use) */
00181 #define ETHERTYPE_EXCELAN       0x8010  /* Excelan */
00182 #define ETHERTYPE_SG_DIAG       0x8013  /* SGI diagnostic type */
00183 #define ETHERTYPE_SG_NETGAMES   0x8014  /* SGI network games */
00184 #define ETHERTYPE_SG_RESV       0x8015  /* SGI reserved type */
00185 #define ETHERTYPE_SG_BOUNCE     0x8016  /* SGI bounce server */
00186 #define ETHERTYPE_APOLLODOMAIN  0x8019  /* Apollo DOMAIN */
00187 #define ETHERTYPE_TYMSHARE      0x802E  /* Tymeshare */
00188 #define ETHERTYPE_TIGAN         0x802F  /* Tigan, Inc. */
00189 #define ETHERTYPE_REVARP        0x8035  /* Reverse addr resolution protocol */
00190 #define ETHERTYPE_AEONIC        0x8036  /* Aeonic Systems */
00191 #define ETHERTYPE_IPXNEW        0x8037  /* IPX (Novell Netware?) */
00192 #define ETHERTYPE_LANBRIDGE     0x8038  /* DEC LANBridge */
00193 #define ETHERTYPE_DSMD  0x8039  /* DEC DSM/DDP */
00194 #define ETHERTYPE_ARGONAUT      0x803A  /* DEC Argonaut Console */
00195 #define ETHERTYPE_VAXELN        0x803B  /* DEC VAXELN */
00196 #define ETHERTYPE_DECDNS        0x803C  /* DEC DNS Naming Service */
00197 #define ETHERTYPE_ENCRYPT       0x803D  /* DEC Ethernet Encryption */
00198 #define ETHERTYPE_DECDTS        0x803E  /* DEC Distributed Time Service */
00199 #define ETHERTYPE_DECLTM        0x803F  /* DEC LAN Traffic Monitor */
00200 #define ETHERTYPE_DECNETBIOS    0x8040  /* DEC PATHWORKS DECnet NETBIOS Emulation */
00201 #define ETHERTYPE_DECLAST       0x8041  /* DEC Local Area System Transport */
00202                              /* 0x8042     DEC Unassigned */
00203 #define ETHERTYPE_PLANNING      0x8044  /* Planning Research Corp. */
00204                     /* 0x8046 - 0x8047     AT&T */
00205 #define ETHERTYPE_DECAM         0x8048  /* DEC Availability Manager for Distributed Systems DECamds (but someone at DEC says not) */
00206 #define ETHERTYPE_EXPERDATA     0x8049  /* ExperData */
00207 #define ETHERTYPE_VEXP          0x805B  /* Stanford V Kernel exp. */
00208 #define ETHERTYPE_VPROD         0x805C  /* Stanford V Kernel prod. */
00209 #define ETHERTYPE_ES            0x805D  /* Evans & Sutherland */
00210 #define ETHERTYPE_LITTLE        0x8060  /* Little Machines */
00211 #define ETHERTYPE_COUNTERPOINT  0x8062  /* Counterpoint Computers */
00212                     /* 0x8065 - 0x8066     Univ. of Mass @ Amherst */
00213 #define ETHERTYPE_VEECO         0x8067  /* Veeco Integrated Auto. */
00214 #define ETHERTYPE_GENDYN        0x8068  /* General Dynamics */
00215 #define ETHERTYPE_ATT           0x8069  /* AT&T */
00216 #define ETHERTYPE_AUTOPHON      0x806A  /* Autophon */
00217 #define ETHERTYPE_COMDESIGN     0x806C  /* ComDesign */
00218 #define ETHERTYPE_COMPUGRAPHIC  0x806D  /* Compugraphic Corporation */
00219                     /* 0x806E - 0x8077     Landmark Graphics Corp. */
00220 #define ETHERTYPE_MATRA         0x807A  /* Matra */
00221 #define ETHERTYPE_DDE           0x807B  /* Dansk Data Elektronik */
00222 #define ETHERTYPE_MERIT         0x807C  /* Merit Internodal (or Univ of Michigan?) */
00223                     /* 0x807D - 0x807F     Vitalink Communications */
00224 #define ETHERTYPE_VLTLMAN       0x8080  /* Vitalink TransLAN III Management */
00225                     /* 0x8081 - 0x8083     Counterpoint Computers */
00226                     /* 0x8088 - 0x808A     Xyplex */
00227 #define ETHERTYPE_ATALK         0x809B  /* AppleTalk */
00228 #define ETHERTYPE_AT            ETHERTYPE_ATALK         /* old NetBSD */
00229 #define ETHERTYPE_APPLETALK     ETHERTYPE_ATALK         /* HP-UX */
00230                     /* 0x809C - 0x809E     Datability */
00231 #define ETHERTYPE_SPIDER        0x809F  /* Spider Systems Ltd. */
00232                              /* 0x80A3     Nixdorf */
00233                     /* 0x80A4 - 0x80B3     Siemens Gammasonics Inc. */
00234                     /* 0x80C0 - 0x80C3     DCA (Digital Comm. Assoc.) Data Exchange Cluster */
00235                     /* 0x80C4 - 0x80C5     Banyan Systems */
00236 #define ETHERTYPE_PACER         0x80C6  /* Pacer Software */
00237 #define ETHERTYPE_APPLITEK      0x80C7  /* Applitek Corporation */
00238                     /* 0x80C8 - 0x80CC     Intergraph Corporation */
00239                     /* 0x80CD - 0x80CE     Harris Corporation */
00240                     /* 0x80CF - 0x80D2     Taylor Instrument */
00241                     /* 0x80D3 - 0x80D4     Rosemount Corporation */
00242 #define ETHERTYPE_SNA           0x80D5  /* IBM SNA Services over Ethernet */
00243 #define ETHERTYPE_VARIAN        0x80DD  /* Varian Associates */
00244                     /* 0x80DE - 0x80DF     TRFS (Integrated Solutions Transparent Remote File System) */
00245                     /* 0x80E0 - 0x80E3     Allen-Bradley */
00246                     /* 0x80E4 - 0x80F0     Datability */
00247 #define ETHERTYPE_RETIX         0x80F2  /* Retix */
00248 #define ETHERTYPE_AARP          0x80F3  /* AppleTalk AARP */
00249                     /* 0x80F4 - 0x80F5     Kinetics */
00250 #define ETHERTYPE_APOLLO        0x80F7  /* Apollo Computer */
00251 #define ETHERTYPE_VLAN          0x8100  /* IEEE 802.1Q VLAN tagging (XXX conflicts) */
00252                     /* 0x80FF - 0x8101     Wellfleet Communications (XXX conflicts) */
00253 #define ETHERTYPE_BOFL          0x8102  /* Wellfleet; BOFL (Breath OF Life) pkts [every 5-10 secs.] */
00254 #define ETHERTYPE_WELLFLEET     0x8103  /* Wellfleet Communications */
00255                     /* 0x8107 - 0x8109     Symbolics Private */
00256 #define ETHERTYPE_TALARIS       0x812B  /* Talaris */
00257 #define ETHERTYPE_WATERLOO      0x8130  /* Waterloo Microsystems Inc. (XXX which?) */
00258 #define ETHERTYPE_HAYES         0x8130  /* Hayes Microcomputers (XXX which?) */
00259 #define ETHERTYPE_VGLAB         0x8131  /* VG Laboratory Systems */
00260                     /* 0x8132 - 0x8137     Bridge Communications */
00261 #define ETHERTYPE_IPX           0x8137  /* Novell (old) NetWare IPX (ECONFIG E option) */
00262 #define ETHERTYPE_NOVELL        0x8138  /* Novell, Inc. */
00263                     /* 0x8139 - 0x813D     KTI */
00264 #define ETHERTYPE_MUMPS         0x813F  /* M/MUMPS data sharing */
00265 #define ETHERTYPE_AMOEBA        0x8145  /* Vrije Universiteit (NL) Amoeba 4 RPC (obsolete) */
00266 #define ETHERTYPE_FLIP          0x8146  /* Vrije Universiteit (NL) FLIP (Fast Local Internet Protocol) */
00267 #define ETHERTYPE_VURESERVED    0x8147  /* Vrije Universiteit (NL) [reserved] */
00268 #define ETHERTYPE_LOGICRAFT     0x8148  /* Logicraft */
00269 #define ETHERTYPE_NCD           0x8149  /* Network Computing Devices */
00270 #define ETHERTYPE_ALPHA         0x814A  /* Alpha Micro */
00271 #define ETHERTYPE_SNMP          0x814C  /* SNMP over Ethernet (see RFC1089) */
00272                     /* 0x814D - 0x814E     BIIN */
00273 #define ETHERTYPE_TEC   0x814F  /* Technically Elite Concepts */
00274 #define ETHERTYPE_RATIONAL      0x8150  /* Rational Corp */
00275                     /* 0x8151 - 0x8153     Qualcomm */
00276                     /* 0x815C - 0x815E     Computer Protocol Pty Ltd */
00277                     /* 0x8164 - 0x8166     Charles River Data Systems */
00278 #define ETHERTYPE_XTP           0x817D  /* Protocol Engines XTP */
00279 #define ETHERTYPE_SGITW         0x817E  /* SGI/Time Warner prop. */
00280 #define ETHERTYPE_HIPPI_FP      0x8180  /* HIPPI-FP encapsulation */
00281 #define ETHERTYPE_STP           0x8181  /* Scheduled Transfer STP, HIPPI-ST */
00282                     /* 0x8182 - 0x8183     Reserved for HIPPI-6400 */
00283                     /* 0x8184 - 0x818C     SGI prop. */
00284 #define ETHERTYPE_MOTOROLA      0x818D  /* Motorola */
00285 #define ETHERTYPE_NETBEUI       0x8191  /* PowerLAN NetBIOS/NetBEUI (PC) */
00286                     /* 0x819A - 0x81A3     RAD Network Devices */
00287                     /* 0x81B7 - 0x81B9     Xyplex */
00288                     /* 0x81CC - 0x81D5     Apricot Computers */
00289                     /* 0x81D6 - 0x81DD     Artisoft Lantastic */
00290                     /* 0x81E6 - 0x81EF     Polygon */
00291                     /* 0x81F0 - 0x81F2     Comsat Labs */
00292                     /* 0x81F3 - 0x81F5     SAIC */
00293                     /* 0x81F6 - 0x81F8     VG Analytical */
00294                     /* 0x8203 - 0x8205     QNX Software Systems Ltd. */
00295                     /* 0x8221 - 0x8222     Ascom Banking Systems */
00296                     /* 0x823E - 0x8240     Advanced Encryption Systems */
00297                     /* 0x8263 - 0x826A     Charles River Data Systems */
00298                     /* 0x827F - 0x8282     Athena Programming */
00299                     /* 0x829A - 0x829B     Inst Ind Info Tech */
00300                     /* 0x829C - 0x82AB     Taurus Controls */
00301                     /* 0x82AC - 0x8693     Walker Richer & Quinn */
00302 #define ETHERTYPE_ACCTON        0x8390  /* Accton Technologies (unregistered) */
00303 #define ETHERTYPE_TALARISMC     0x852B  /* Talaris multicast */
00304 #define ETHERTYPE_KALPANA       0x8582  /* Kalpana */
00305                     /* 0x8694 - 0x869D     Idea Courier */
00306                     /* 0x869E - 0x86A1     Computer Network Tech */
00307                     /* 0x86A3 - 0x86AC     Gateway Communications */
00308 #define ETHERTYPE_SECTRA        0x86DB  /* SECTRA */
00309 #define ETHERTYPE_IPV6          0x86DD  /* IP protocol version 6 */
00310 #define ETHERTYPE_DELTACON      0x86DE  /* Delta Controls */
00311 #define ETHERTYPE_ATOMIC        0x86DF  /* ATOMIC */
00312                     /* 0x86E0 - 0x86EF     Landis & Gyr Powers */
00313                     /* 0x8700 - 0x8710     Motorola */
00314 #define ETHERTYPE_RDP           0x8739  /* Control Technology Inc. RDP Without IP */
00315 #define ETHERTYPE_MICP          0x873A  /* Control Technology Inc. Mcast Industrial Ctrl Proto. */
00316                     /* 0x873B - 0x873C     Control Technology Inc. Proprietary */
00317 #define ETHERTYPE_TCPCOMP       0x876B  /* TCP/IP Compression (RFC1701) */
00318 #define ETHERTYPE_IPAS          0x876C  /* IP Autonomous Systems (RFC1701) */
00319 #define ETHERTYPE_SECUREDATA    0x876D  /* Secure Data (RFC1701) */
00320 #define ETHERTYPE_FLOWCONTROL   0x8808  /* 802.3x flow control packet */
00321 #define ETHERTYPE_PPP           0x880B  /* PPP (obsolete by PPPOE) */
00322 #define ETHERTYPE_HITACHI       0x8820  /* Hitachi Cable (Optoelectronic Systems Laboratory) */
00323 #define ETHERTYPE_MPLS          0x8847  /* MPLS Unicast */
00324 #define ETHERTYPE_MPLS_MCAST    0x8848  /* MPLS Multicast */
00325 #define ETHERTYPE_AXIS          0x8856  /* Axis Communications AB proprietary bootstrap/config */
00326 #define ETHERTYPE_PPPOEDISC     0x8863  /* PPP Over Ethernet Discovery Stage */
00327 #define ETHERTYPE_PPPOE         0x8864  /* PPP Over Ethernet Session Stage */
00328 #define ETHERTYPE_LANPROBE      0x8888  /* HP LanProbe test? */
00329 #define ETHERTYPE_PAE           0x888e  /* EAPOL PAE/802.1x */
00330 #define ETHERTYPE_LOOPBACK      0x9000  /* Loopback: used to test interfaces */
00331 #define ETHERTYPE_LBACK         ETHERTYPE_LOOPBACK      /* DEC MOP loopback */
00332 #define ETHERTYPE_XNSSM         0x9001  /* 3Com (Formerly Bridge Communications), XNS Systems Management */
00333 #define ETHERTYPE_TCPSM         0x9002  /* 3Com (Formerly Bridge Communications), TCP/IP Systems Management */
00334 #define ETHERTYPE_BCLOOP        0x9003  /* 3Com (Formerly Bridge Communications), loopback detection */
00335 #define ETHERTYPE_DEBNI         0xAAAA  /* DECNET? Used by VAX 6220 DEBNI */
00336 #define ETHERTYPE_SONIX         0xFAF5  /* Sonix Arpeggio */
00337 #define ETHERTYPE_VITAL         0xFF00  /* BBN VITAL-LanBridge cache wakeups */
00338                     /* 0xFF00 - 0xFFOF     ISC Bunker Ramo */
00339 
00340 #define ETHERTYPE_MAX           0xFFFF  /* Maximum valid ethernet type, reserved */
00341 
00342 /*
00343  * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
00344  * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
00345  * by an ETHER type (as given above) and then the (variable-length) header.
00346  */
00347 #define ETHERTYPE_TRAIL         0x1000          /* Trailer packet */
00348 #define ETHERTYPE_NTRAILER      16
00349 
00350 #define ETHERMTU        (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
00351 #define ETHERMIN        (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
00352 
00353 #endif /* !_NET_ETHERNET_H_ */
00354