117680Spst/* 217680Spst * Copyright (c) 1993, 1994, 1996 317680Spst * The Regents of the University of California. All rights reserved. 417680Spst * 517680Spst * Redistribution and use in source and binary forms, with or without 617680Spst * modification, are permitted provided that: (1) source code distributions 717680Spst * retain the above copyright notice and this paragraph in its entirety, (2) 817680Spst * distributions including binary code include the above copyright notice and 917680Spst * this paragraph in its entirety in the documentation or other materials 1017680Spst * provided with the distribution, and (3) all advertising materials mentioning 1117680Spst * features or use of this software display the following acknowledgement: 1217680Spst * ``This product includes software developed by the University of California, 1317680Spst * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 1417680Spst * the University nor the names of its contributors may be used to endorse 1517680Spst * or promote products derived from this software without specific prior 1617680Spst * written permission. 1717680Spst * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 1817680Spst * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 1917680Spst * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 2017680Spst * 21214478Srpaulo * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.30 2008-02-06 10:47:53 guy Exp $ (LBL) 2253146Sbrian * $FreeBSD$ 2317680Spst */ 2417680Spst 2575118Sfenner/* 2675118Sfenner * Ethernet types. 2775118Sfenner * 2875118Sfenner * We wrap the declarations with #ifdef, so that if a file includes 2975118Sfenner * <netinet/if_ether.h>, which may declare some of these, we don't 3075118Sfenner * get a bunch of complaints from the C compiler about redefinitions 3175118Sfenner * of these values. 3275118Sfenner * 3375118Sfenner * We declare all of them here so that no file has to include 3475118Sfenner * <netinet/if_ether.h> if all it needs are ETHERTYPE_ values. 3575118Sfenner */ 3617680Spst 37146778Ssam#ifndef ETHERTYPE_LEN 38146778Ssam#define ETHERTYPE_LEN 2 39146778Ssam#endif 40146778Ssam 41146778Ssam#ifndef ETHERTYPE_GRE_ISO 42146778Ssam#define ETHERTYPE_GRE_ISO 0x00FE /* not really an ethertype only used in GRE */ 43146778Ssam#endif 4475118Sfenner#ifndef ETHERTYPE_PUP 4575118Sfenner#define ETHERTYPE_PUP 0x0200 /* PUP protocol */ 4675118Sfenner#endif 4775118Sfenner#ifndef ETHERTYPE_IP 4875118Sfenner#define ETHERTYPE_IP 0x0800 /* IP protocol */ 4975118Sfenner#endif 5075118Sfenner#ifndef ETHERTYPE_ARP 5175118Sfenner#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */ 5275118Sfenner#endif 5375118Sfenner#ifndef ETHERTYPE_REVARP 5475118Sfenner#define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */ 5575118Sfenner#endif 5617680Spst#ifndef ETHERTYPE_NS 5717680Spst#define ETHERTYPE_NS 0x0600 5817680Spst#endif 5917680Spst#ifndef ETHERTYPE_SPRITE 6017680Spst#define ETHERTYPE_SPRITE 0x0500 6117680Spst#endif 6217680Spst#ifndef ETHERTYPE_TRAIL 6317680Spst#define ETHERTYPE_TRAIL 0x1000 6417680Spst#endif 6517680Spst#ifndef ETHERTYPE_MOPDL 6617680Spst#define ETHERTYPE_MOPDL 0x6001 6717680Spst#endif 6817680Spst#ifndef ETHERTYPE_MOPRC 6917680Spst#define ETHERTYPE_MOPRC 0x6002 7017680Spst#endif 7117680Spst#ifndef ETHERTYPE_DN 7217680Spst#define ETHERTYPE_DN 0x6003 7317680Spst#endif 7417680Spst#ifndef ETHERTYPE_LAT 7517680Spst#define ETHERTYPE_LAT 0x6004 7617680Spst#endif 7717680Spst#ifndef ETHERTYPE_SCA 7817680Spst#define ETHERTYPE_SCA 0x6007 7917680Spst#endif 80214478Srpaulo#ifndef ETHERTYPE_TEB 81214478Srpaulo#define ETHERTYPE_TEB 0x6558 82214478Srpaulo#endif 8317680Spst#ifndef ETHERTYPE_LANBRIDGE 8417680Spst#define ETHERTYPE_LANBRIDGE 0x8038 8517680Spst#endif 8617680Spst#ifndef ETHERTYPE_DECDNS 8717680Spst#define ETHERTYPE_DECDNS 0x803c 8817680Spst#endif 8917680Spst#ifndef ETHERTYPE_DECDTS 9017680Spst#define ETHERTYPE_DECDTS 0x803e 9117680Spst#endif 9217680Spst#ifndef ETHERTYPE_VEXP 9317680Spst#define ETHERTYPE_VEXP 0x805b 9417680Spst#endif 9517680Spst#ifndef ETHERTYPE_VPROD 9617680Spst#define ETHERTYPE_VPROD 0x805c 9717680Spst#endif 9817680Spst#ifndef ETHERTYPE_ATALK 9917680Spst#define ETHERTYPE_ATALK 0x809b 10017680Spst#endif 10117680Spst#ifndef ETHERTYPE_AARP 10217680Spst#define ETHERTYPE_AARP 0x80f3 10317680Spst#endif 104241235Sdelphij#ifndef ETHERTYPE_TIPC 105241235Sdelphij#define ETHERTYPE_TIPC 0x88ca 106241235Sdelphij#endif 10756896Sfenner#ifndef ETHERTYPE_8021Q 10856896Sfenner#define ETHERTYPE_8021Q 0x8100 10956896Sfenner#endif 110235530Sdelphij 111235530Sdelphij/* see: 112235530Sdelphij http://en.wikipedia.org/wiki/IEEE_802.1Q 113235530Sdelphij and http://en.wikipedia.org/wiki/QinQ 114235530Sdelphij*/ 115235530Sdelphij#ifndef ETHERTYPE_8021Q9100 116235530Sdelphij#define ETHERTYPE_8021Q9100 0x9100 117235530Sdelphij#endif 118235530Sdelphij#ifndef ETHERTYPE_8021Q9200 119235530Sdelphij#define ETHERTYPE_8021Q9200 0x9200 120235530Sdelphij#endif 121235530Sdelphij#ifndef ETHERTYPE_8021QinQ 122235530Sdelphij#define ETHERTYPE_8021QinQ 0x88a8 123235530Sdelphij#endif 12417692Spst#ifndef ETHERTYPE_IPX 12598527Sfenner#define ETHERTYPE_IPX 0x8137 12617692Spst#endif 12756896Sfenner#ifndef ETHERTYPE_IPV6 12856896Sfenner#define ETHERTYPE_IPV6 0x86dd 12953146Sbrian#endif 13098527Sfenner#ifndef ETHERTYPE_PPP 13198527Sfenner#define ETHERTYPE_PPP 0x880b 13298527Sfenner#endif 133190207Srpaulo#ifndef ETHERTYPE_MPCP 134190207Srpaulo#define ETHERTYPE_MPCP 0x8808 135190207Srpaulo#endif 136162021Ssam#ifndef ETHERTYPE_SLOW 137162021Ssam#define ETHERTYPE_SLOW 0x8809 138162021Ssam#endif 13998527Sfenner#ifndef ETHERTYPE_MPLS 14098527Sfenner#define ETHERTYPE_MPLS 0x8847 14198527Sfenner#endif 14298527Sfenner#ifndef ETHERTYPE_MPLS_MULTI 14398527Sfenner#define ETHERTYPE_MPLS_MULTI 0x8848 14498527Sfenner#endif 14556896Sfenner#ifndef ETHERTYPE_PPPOED 14656896Sfenner#define ETHERTYPE_PPPOED 0x8863 14753146Sbrian#endif 14856896Sfenner#ifndef ETHERTYPE_PPPOES 14956896Sfenner#define ETHERTYPE_PPPOES 0x8864 15056896Sfenner#endif 15184019Sjulian#ifndef ETHERTYPE_PPPOED2 15284019Sjulian#define ETHERTYPE_PPPOED2 0x3c12 15384019Sjulian#endif 15484019Sjulian#ifndef ETHERTYPE_PPPOES2 15584019Sjulian#define ETHERTYPE_PPPOES2 0x3c13 15684019Sjulian#endif 157251158Sdelphij#ifndef ETHERTYPE_MS_NLB_HB 158251158Sdelphij#define ETHERTYPE_MS_NLB_HB 0x886f /* MS Network Load Balancing Heartbeat */ 159251158Sdelphij#endif 160146778Ssam#ifndef ETHERTYPE_JUMBO 161146778Ssam#define ETHERTYPE_JUMBO 0x8870 162146778Ssam#endif 163190207Srpaulo#ifndef ETHERTYPE_LLDP 164190207Srpaulo#define ETHERTYPE_LLDP 0x88cc 165190207Srpaulo#endif 166146778Ssam#ifndef ETHERTYPE_EAPOL 167146778Ssam#define ETHERTYPE_EAPOL 0x888e 168146778Ssam#endif 169190207Srpaulo#ifndef ETHERTYPE_RRCP 170190207Srpaulo#define ETHERTYPE_RRCP 0x8899 171190207Srpaulo#endif 17217680Spst#ifndef ETHERTYPE_LOOPBACK 17317680Spst#define ETHERTYPE_LOOPBACK 0x9000 17417680Spst#endif 175127675Sbms#ifndef ETHERTYPE_VMAN 176127675Sbms#define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */ 177127675Sbms#endif 178190207Srpaulo#ifndef ETHERTYPE_CFM_OLD 179190207Srpaulo#define ETHERTYPE_CFM_OLD 0xabcd /* 802.1ag depreciated */ 180190207Srpaulo#endif 181190207Srpaulo#ifndef ETHERTYPE_CFM 182190207Srpaulo#define ETHERTYPE_CFM 0x8902 /* 802.1ag */ 183190207Srpaulo#endif 184127675Sbms#ifndef ETHERTYPE_ISO 185127675Sbms#define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */ 186127675Sbms#endif 187127675Sbms 188127675Sbmsextern const struct tok ethertype_values[]; 189