12949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project/* 22949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * Copyright (c) 1993, 1994, 1996 32949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * The Regents of the University of California. All rights reserved. 42949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * 52949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * Redistribution and use in source and binary forms, with or without 62949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * modification, are permitted provided that: (1) source code distributions 72949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * retain the above copyright notice and this paragraph in its entirety, (2) 82949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * distributions including binary code include the above copyright notice and 92949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * this paragraph in its entirety in the documentation or other materials 102949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * provided with the distribution, and (3) all advertising materials mentioning 112949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * features or use of this software display the following acknowledgement: 122949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * ``This product includes software developed by the University of California, 132949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 142949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * the University nor the names of its contributors may be used to endorse 152949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * or promote products derived from this software without specific prior 162949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * written permission. 172949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 182949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 192949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 202949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project */ 212949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project 222949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project/* 232949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * Ethernet types. 242949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * 252949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * We wrap the declarations with #ifdef, so that if a file includes 262949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * <netinet/if_ether.h>, which may declare some of these, we don't 272949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * get a bunch of complaints from the C compiler about redefinitions 282949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * of these values. 292949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * 302949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * We declare all of them here so that no file has to include 312949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project * <netinet/if_ether.h> if all it needs are ETHERTYPE_ values. 322949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project */ 332949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project 342949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_LEN 352949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_LEN 2 362949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 372949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project 382949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_GRE_ISO 392949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_GRE_ISO 0x00FE /* not really an ethertype only used in GRE */ 402949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 412949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_PUP 422949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_PUP 0x0200 /* PUP protocol */ 432949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 442949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_IP 452949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_IP 0x0800 /* IP protocol */ 462949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 472949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_ARP 482949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */ 492949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 502949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_REVARP 512949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */ 522949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 532949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_NS 542949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_NS 0x0600 552949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 562949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_SPRITE 572949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_SPRITE 0x0500 582949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 592949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_TRAIL 602949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_TRAIL 0x1000 612949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 622949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_MOPDL 632949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_MOPDL 0x6001 642949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 652949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_MOPRC 662949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_MOPRC 0x6002 672949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 682949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_DN 692949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_DN 0x6003 702949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 712949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_LAT 722949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_LAT 0x6004 732949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 742949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_SCA 752949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_SCA 0x6007 762949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 7753f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_TEB 7853f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_TEB 0x6558 7953f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 802949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_LANBRIDGE 812949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_LANBRIDGE 0x8038 822949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 832949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_DECDNS 842949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_DECDNS 0x803c 852949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 862949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_DECDTS 872949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_DECDTS 0x803e 882949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 892949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_VEXP 902949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_VEXP 0x805b 912949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 922949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_VPROD 932949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_VPROD 0x805c 942949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 952949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_ATALK 962949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_ATALK 0x809b 972949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 982949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_AARP 992949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_AARP 0x80f3 1002949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 10153f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_TIPC 10253f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_TIPC 0x88ca 10353f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 1042949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_8021Q 1052949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_8021Q 0x8100 1062949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 10753f17a9db278d33517d9888dd77848f554522a38JP Abgrall 10853f17a9db278d33517d9888dd77848f554522a38JP Abgrall/* see: 10953f17a9db278d33517d9888dd77848f554522a38JP Abgrall http://en.wikipedia.org/wiki/IEEE_802.1Q 11053f17a9db278d33517d9888dd77848f554522a38JP Abgrall and http://en.wikipedia.org/wiki/QinQ 11153f17a9db278d33517d9888dd77848f554522a38JP Abgrall*/ 11253f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_8021Q9100 11353f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_8021Q9100 0x9100 11453f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 11553f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_8021Q9200 11653f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_8021Q9200 0x9200 11753f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 11853f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_8021QinQ 11953f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_8021QinQ 0x88a8 12053f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 1212949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_IPX 1222949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_IPX 0x8137 1232949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 1242949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_IPV6 1252949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_IPV6 0x86dd 1262949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 1272949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_PPP 1282949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_PPP 0x880b 1292949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 13053f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_MPCP 13153f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_MPCP 0x8808 13253f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 1332949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_SLOW 1342949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_SLOW 0x8809 1352949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 1362949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_MPLS 1372949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_MPLS 0x8847 1382949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 1392949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_MPLS_MULTI 1402949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_MPLS_MULTI 0x8848 1412949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 1422949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_PPPOED 1432949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_PPPOED 0x8863 1442949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 1452949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_PPPOES 1462949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_PPPOES 0x8864 1472949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 14853f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_PPPOED2 14953f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_PPPOED2 0x3c12 15053f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 15153f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_PPPOES2 15253f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_PPPOES2 0x3c13 15353f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 15453f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_MS_NLB_HB 15553f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_MS_NLB_HB 0x886f /* MS Network Load Balancing Heartbeat */ 15653f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 1572949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_JUMBO 1582949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_JUMBO 0x8870 1592949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 16053f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_LLDP 16153f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_LLDP 0x88cc 16253f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 1632949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_EAPOL 1642949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_EAPOL 0x888e 1652949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 16653f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_RRCP 16753f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_RRCP 0x8899 16853f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 169892a68bdf2f50b40781212e4d7ee7369c8165953Elliott Hughes#ifndef ETHERTYPE_AOE 170892a68bdf2f50b40781212e4d7ee7369c8165953Elliott Hughes#define ETHERTYPE_AOE 0x88a2 171892a68bdf2f50b40781212e4d7ee7369c8165953Elliott Hughes#endif 1722949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_LOOPBACK 1732949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_LOOPBACK 0x9000 1742949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 1752949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_VMAN 176892a68bdf2f50b40781212e4d7ee7369c8165953Elliott Hughes#define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */ 1772949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 17853f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_CFM_OLD 17953f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_CFM_OLD 0xabcd /* 802.1ag depreciated */ 18053f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 18153f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_CFM 18253f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_CFM 0x8902 /* 802.1ag */ 18353f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 184892a68bdf2f50b40781212e4d7ee7369c8165953Elliott Hughes#ifndef ETHERTYPE_IEEE1905_1 185892a68bdf2f50b40781212e4d7ee7369c8165953Elliott Hughes#define ETHERTYPE_IEEE1905_1 0x893a /* IEEE 1905.1 */ 186892a68bdf2f50b40781212e4d7ee7369c8165953Elliott Hughes#endif 1872949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#ifndef ETHERTYPE_ISO 1882949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */ 1892949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project#endif 19053f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_CALM_FAST 19153f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_CALM_FAST 0x1111 /* ISO CALM FAST */ 19253f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 19353f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_GEONET_OLD 19453f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_GEONET_OLD 0x0707 /* ETSI GeoNetworking (before Jan 2013) */ 19553f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 19653f17a9db278d33517d9888dd77848f554522a38JP Abgrall#ifndef ETHERTYPE_GEONET 19753f17a9db278d33517d9888dd77848f554522a38JP Abgrall#define ETHERTYPE_GEONET 0x8947 /* ETSI GeoNetworking (Official IEEE registration from Jan 2013) */ 19853f17a9db278d33517d9888dd77848f554522a38JP Abgrall#endif 1992949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Project 2002949f58a438f6fd85f66a8b7ed4708042cde4b37The Android Open Source Projectextern const struct tok ethertype_values[]; 201