1 /* 2 * Copyright (c) 1993, 1994, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and 9 * this paragraph in its entirety in the documentation or other materials 10 * provided with the distribution, and (3) all advertising materials mentioning 11 * features or use of this software display the following acknowledgement: 12 * ``This product includes software developed by the University of California, 13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 * the University nor the names of its contributors may be used to endorse 15 * or promote products derived from this software without specific prior 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 */ 21 22 /* 23 * Ethernet types. 24 * 25 * We wrap the declarations with #ifdef, so that if a file includes 26 * <netinet/if_ether.h>, which may declare some of these, we don't 27 * get a bunch of complaints from the C compiler about redefinitions 28 * of these values. 29 * 30 * We declare all of them here so that no file has to include 31 * <netinet/if_ether.h> if all it needs are ETHERTYPE_ values. 32 */ 33 34 #ifndef ETHERTYPE_LEN 35 #define ETHERTYPE_LEN 2 36 #endif 37 38 #ifndef ETHERTYPE_GRE_ISO 39 #define ETHERTYPE_GRE_ISO 0x00FE /* not really an ethertype only used in GRE */ 40 #endif 41 #ifndef ETHERTYPE_PUP 42 #define ETHERTYPE_PUP 0x0200 /* PUP protocol */ 43 #endif 44 #ifndef ETHERTYPE_IP 45 #define ETHERTYPE_IP 0x0800 /* IP protocol */ 46 #endif 47 #ifndef ETHERTYPE_ARP 48 #define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */ 49 #endif 50 #ifndef ETHERTYPE_REVARP 51 #define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */ 52 #endif 53 #ifndef ETHERTYPE_NS 54 #define ETHERTYPE_NS 0x0600 55 #endif 56 #ifndef ETHERTYPE_SPRITE 57 #define ETHERTYPE_SPRITE 0x0500 58 #endif 59 #ifndef ETHERTYPE_TRAIL 60 #define ETHERTYPE_TRAIL 0x1000 61 #endif 62 #ifndef ETHERTYPE_MOPDL 63 #define ETHERTYPE_MOPDL 0x6001 64 #endif 65 #ifndef ETHERTYPE_MOPRC 66 #define ETHERTYPE_MOPRC 0x6002 67 #endif 68 #ifndef ETHERTYPE_DN 69 #define ETHERTYPE_DN 0x6003 70 #endif 71 #ifndef ETHERTYPE_LAT 72 #define ETHERTYPE_LAT 0x6004 73 #endif 74 #ifndef ETHERTYPE_SCA 75 #define ETHERTYPE_SCA 0x6007 76 #endif 77 #ifndef ETHERTYPE_TEB 78 #define ETHERTYPE_TEB 0x6558 79 #endif 80 #ifndef ETHERTYPE_LANBRIDGE 81 #define ETHERTYPE_LANBRIDGE 0x8038 82 #endif 83 #ifndef ETHERTYPE_DECDNS 84 #define ETHERTYPE_DECDNS 0x803c 85 #endif 86 #ifndef ETHERTYPE_DECDTS 87 #define ETHERTYPE_DECDTS 0x803e 88 #endif 89 #ifndef ETHERTYPE_VEXP 90 #define ETHERTYPE_VEXP 0x805b 91 #endif 92 #ifndef ETHERTYPE_VPROD 93 #define ETHERTYPE_VPROD 0x805c 94 #endif 95 #ifndef ETHERTYPE_ATALK 96 #define ETHERTYPE_ATALK 0x809b 97 #endif 98 #ifndef ETHERTYPE_AARP 99 #define ETHERTYPE_AARP 0x80f3 100 #endif 101 #ifndef ETHERTYPE_TIPC 102 #define ETHERTYPE_TIPC 0x88ca 103 #endif 104 #ifndef ETHERTYPE_8021Q 105 #define ETHERTYPE_8021Q 0x8100 106 #endif 107 108 /* see: 109 http://en.wikipedia.org/wiki/IEEE_802.1Q 110 and http://en.wikipedia.org/wiki/QinQ 111 */ 112 #ifndef ETHERTYPE_8021Q9100 113 #define ETHERTYPE_8021Q9100 0x9100 114 #endif 115 #ifndef ETHERTYPE_8021Q9200 116 #define ETHERTYPE_8021Q9200 0x9200 117 #endif 118 #ifndef ETHERTYPE_8021QinQ 119 #define ETHERTYPE_8021QinQ 0x88a8 120 #endif 121 #ifndef ETHERTYPE_IPX 122 #define ETHERTYPE_IPX 0x8137 123 #endif 124 #ifndef ETHERTYPE_IPV6 125 #define ETHERTYPE_IPV6 0x86dd 126 #endif 127 #ifndef ETHERTYPE_PPP 128 #define ETHERTYPE_PPP 0x880b 129 #endif 130 #ifndef ETHERTYPE_MPCP 131 #define ETHERTYPE_MPCP 0x8808 132 #endif 133 #ifndef ETHERTYPE_SLOW 134 #define ETHERTYPE_SLOW 0x8809 135 #endif 136 #ifndef ETHERTYPE_MPLS 137 #define ETHERTYPE_MPLS 0x8847 138 #endif 139 #ifndef ETHERTYPE_MPLS_MULTI 140 #define ETHERTYPE_MPLS_MULTI 0x8848 141 #endif 142 #ifndef ETHERTYPE_PPPOED 143 #define ETHERTYPE_PPPOED 0x8863 144 #endif 145 #ifndef ETHERTYPE_PPPOES 146 #define ETHERTYPE_PPPOES 0x8864 147 #endif 148 #ifndef ETHERTYPE_PPPOED2 149 #define ETHERTYPE_PPPOED2 0x3c12 150 #endif 151 #ifndef ETHERTYPE_PPPOES2 152 #define ETHERTYPE_PPPOES2 0x3c13 153 #endif 154 #ifndef ETHERTYPE_MS_NLB_HB 155 #define ETHERTYPE_MS_NLB_HB 0x886f /* MS Network Load Balancing Heartbeat */ 156 #endif 157 #ifndef ETHERTYPE_JUMBO 158 #define ETHERTYPE_JUMBO 0x8870 159 #endif 160 #ifndef ETHERTYPE_LLDP 161 #define ETHERTYPE_LLDP 0x88cc 162 #endif 163 #ifndef ETHERTYPE_EAPOL 164 #define ETHERTYPE_EAPOL 0x888e 165 #endif 166 #ifndef ETHERTYPE_RRCP 167 #define ETHERTYPE_RRCP 0x8899 168 #endif 169 #ifndef ETHERTYPE_AOE 170 #define ETHERTYPE_AOE 0x88a2 171 #endif 172 #ifndef ETHERTYPE_LOOPBACK 173 #define ETHERTYPE_LOOPBACK 0x9000 174 #endif 175 #ifndef ETHERTYPE_VMAN 176 #define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */ 177 #endif 178 #ifndef ETHERTYPE_CFM_OLD 179 #define ETHERTYPE_CFM_OLD 0xabcd /* 802.1ag depreciated */ 180 #endif 181 #ifndef ETHERTYPE_CFM 182 #define ETHERTYPE_CFM 0x8902 /* 802.1ag */ 183 #endif 184 #ifndef ETHERTYPE_IEEE1905_1 185 #define ETHERTYPE_IEEE1905_1 0x893a /* IEEE 1905.1 */ 186 #endif 187 #ifndef ETHERTYPE_ISO 188 #define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */ 189 #endif 190 #ifndef ETHERTYPE_CALM_FAST 191 #define ETHERTYPE_CALM_FAST 0x1111 /* ISO CALM FAST */ 192 #endif 193 #ifndef ETHERTYPE_GEONET_OLD 194 #define ETHERTYPE_GEONET_OLD 0x0707 /* ETSI GeoNetworking (before Jan 2013) */ 195 #endif 196 #ifndef ETHERTYPE_GEONET 197 #define ETHERTYPE_GEONET 0x8947 /* ETSI GeoNetworking (Official IEEE registration from Jan 2013) */ 198 #endif 199 #ifndef ETHERTYPE_MEDSA 200 #define ETHERTYPE_MEDSA 0xdada /* Marvel Distributed Switch Architecture */ 201 #endif 202 203 extern const struct tok ethertype_values[]; 204