Home | History | Annotate | Line # | Download | only in net
ethertypes.h revision 1.7
      1 /*	$NetBSD: ethertypes.h,v 1.7 1999/03/20 03:37:52 thorpej Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1982, 1986, 1993
      5  *	The Regents of the University of California.  All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  * 3. All advertising materials mentioning features or use of this software
     16  *    must display the following acknowledgement:
     17  *	This product includes software developed by the University of
     18  *	California, Berkeley and its contributors.
     19  * 4. Neither the name of the University nor the names of its contributors
     20  *    may be used to endorse or promote products derived from this software
     21  *    without specific prior written permission.
     22  *
     23  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  * SUCH DAMAGE.
     34  *
     35  *	@(#)if_ether.h	8.1 (Berkeley) 6/10/93
     36  */
     37 
     38 /*
     39  * Ethernet protocol types.
     40  *
     41  * According to "assigned numbers", the Ethernet protocol numbers are also
     42  * used as ARP protocol type numbers.
     43  *
     44  * I factor them out here to avoid pulling all the Ethernet header file
     45  * into the hardware independent ARP code. -is
     46  */
     47 
     48 #ifndef _NET_ETHERTYPES_H_
     49 #define _NET_ETHERTYPES_H_
     50 
     51 #define ETHERTYPE_8023		0x0004	/* IEEE 802.3 packet */
     52 #define	ETHERTYPE_PUP		0x0200	/* PUP protocol */
     53 #define	ETHERTYPE_SPRITE	0x0500	/* ??? */
     54 #define	ETHERTYPE_NS		0x0600	/* XNS */
     55 #define	ETHERTYPE_IP		0x0800	/* IP protocol */
     56 #define	ETHERTYPE_ARP		0x0806	/* Address resolution protocol */
     57 #define	ETHERTYPE_MOPDL		0x6001	/* DEC MOP dump/load */
     58 #define	ETHERTYPE_MOPRC		0x6002	/* DEC MOP remote console */
     59 #define	ETHERTYPE_DECnet	0x6003	/* DEC DECNET Phase IV route */
     60 #define	ETHERTYPE_DN		ETHERTYPE_DECnet	/* libpcap, tcpdump */
     61 #define	ETHERTYPE_LAT		0x6004	/* DEC LAT */
     62 #define ETHERTYPE_SCA		0x6007	/* DEC LAVC, SCA */
     63 #define ETHERTYPE_HP		0x8005	/* HP Probe */
     64 #define ETHERTYPE_SG_DIAG	0x8013	/* SGI diagnostic type */
     65 #define ETHERTYPE_SG_NETGAMES	0x8014	/* SGI network games */
     66 #define ETHERTYPE_SG_RESV	0x8015	/* SGI reserved type */
     67 #define ETHERTYPE_SG_BOUNCE	0x8016	/* SGI bounce server */
     68 #define	ETHERTYPE_REVARP	0x8035	/* Reverse addr resolution protocol */
     69 #define	ETHERTYPE_LANBRIDGE	0x8038	/* DEC LANBridge */
     70 #define	ETHERTYPE_DECDNS	0x803C	/* DEC DNS */
     71 #define	ETHERTYPE_DECDTS	0x803E	/* DEC DTS */
     72 #define	ETHERTYPE_VEXP		0x805B	/* Stanford V Kernel exp. */
     73 #define	ETHERTYPE_VPROD		0x805C	/* Stanford V Kernel prod. */
     74 #define	ETHERTYPE_ATALK		0x809B	/* AppleTalk */
     75 #define ETHERTYPE_AT		ETHERTYPE_ATALK		/* old NetBSD */
     76 #define ETHERTYPE_APPLETALK	ETHERTYPE_ATALK		/* HP-UX */
     77 #define	ETHERTYPE_AARP		0x80F3	/* AppleTalk AARP */
     78 #define	ETHERTYPE_IPX		0x8137	/* Novell IPX */
     79 #define ETHERTYPE_XTP		0x817D	/* Protocol Engines XTP */
     80 #define ETHERTYPE_STP		0x8181	/* Scheduled Transfer STP, HIPPI-ST */
     81 #define	ETHERTYPE_IPV6		0x86DD	/* IP protocol version 6 */
     82 #define	ETHERTYPE_PPP		0x880B	/* PPP (obsolete by PPPOE) */
     83 #define	ETHERTYPE_PPPOEDISC	0x8863	/* PPP Over Ethernet Discovery Stage */
     84 #define	ETHERTYPE_PPPOE		0x8864	/* PPP Over Ethernet Session Stage */
     85 #define	ETHERTYPE_LOOPBACK	0x9000	/* Loopback */
     86 #define ETHERTYPE_LBACK		ETHERTYPE_LOOPBACK	/* DEC MOP loopback */
     87 #define	ETHERTYPE_MAX		0xFFFF	/* Maximum valid ethernet type */
     88 
     89 /*
     90  * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
     91  * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
     92  * by an ETHER type (as given above) and then the (variable-length) header.
     93  */
     94 #define	ETHERTYPE_TRAIL		0x1000		/* Trailer packet */
     95 #define	ETHERTYPE_NTRAILER	16
     96 
     97 #endif /* _NET_ETHERTYPES_H_ */
     98