1 /* 2 * Broadcom Ethernettype protocol definitions 3 * 4 * Copyright (C) 1999-2013, Broadcom Corporation 5 * 6 * Permission to use, copy, modify, and/or distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * 18 * $Id: bcmeth.h 382882 2013-02-04 23:24:31Z $ 19 */ 20 21 /* 22 * Broadcom Ethernet protocol defines 23 */ 24 25 #ifndef _BCMETH_H_ 26 #define _BCMETH_H_ 27 28 #ifndef _TYPEDEFS_H_ 29 #include <typedefs.h> 30 #endif 31 32 /* This marks the start of a packed structure section. */ 33 #include <packed_section_start.h> 34 35 /* ETHER_TYPE_BRCM is defined in ethernet.h */ 36 37 /* 38 * Following the 2byte BRCM ether_type is a 16bit BRCM subtype field 39 * in one of two formats: (only subtypes 32768-65535 are in use now) 40 * 41 * subtypes 0-32767: 42 * 8 bit subtype (0-127) 43 * 8 bit length in bytes (0-255) 44 * 45 * subtypes 32768-65535: 46 * 16 bit big-endian subtype 47 * 16 bit big-endian length in bytes (0-65535) 48 * 49 * length is the number of additional bytes beyond the 4 or 6 byte header 50 * 51 * Reserved values: 52 * 0 reserved 53 * 5-15 reserved for iLine protocol assignments 54 * 17-126 reserved, assignable 55 * 127 reserved 56 * 32768 reserved 57 * 32769-65534 reserved, assignable 58 * 65535 reserved 59 */ 60 61 /* 62 * While adding the subtypes and their specific processing code make sure 63 * bcmeth_bcm_hdr_t is the first data structure in the user specific data structure definition 64 */ 65 66 #define BCMILCP_SUBTYPE_RATE 1 67 #define BCMILCP_SUBTYPE_LINK 2 68 #define BCMILCP_SUBTYPE_CSA 3 69 #define BCMILCP_SUBTYPE_LARQ 4 70 #define BCMILCP_SUBTYPE_VENDOR 5 71 #define BCMILCP_SUBTYPE_FLH 17 72 73 #define BCMILCP_SUBTYPE_VENDOR_LONG 32769 74 #define BCMILCP_SUBTYPE_CERT 32770 75 #define BCMILCP_SUBTYPE_SES 32771 76 77 78 #define BCMILCP_BCM_SUBTYPE_RESERVED 0 79 #define BCMILCP_BCM_SUBTYPE_EVENT 1 80 #define BCMILCP_BCM_SUBTYPE_SES 2 81 /* 82 * The EAPOL type is not used anymore. Instead EAPOL messages are now embedded 83 * within BCMILCP_BCM_SUBTYPE_EVENT type messages 84 */ 85 /* #define BCMILCP_BCM_SUBTYPE_EAPOL 3 */ 86 #define BCMILCP_BCM_SUBTYPE_DPT 4 87 88 #define BCMILCP_BCM_SUBTYPEHDR_MINLENGTH 8 89 #define BCMILCP_BCM_SUBTYPEHDR_VERSION 0 90 91 /* These fields are stored in network order */ 92 typedef BWL_PRE_PACKED_STRUCT struct bcmeth_hdr 93 { 94 uint16 subtype; /* Vendor specific..32769 */ 95 uint16 length; 96 uint8 version; /* Version is 0 */ 97 uint8 oui[3]; /* Broadcom OUI */ 98 /* user specific Data */ 99 uint16 usr_subtype; 100 } BWL_POST_PACKED_STRUCT bcmeth_hdr_t; 101 102 103 /* This marks the end of a packed structure section. */ 104 #include <packed_section_end.h> 105 106 #endif /* _BCMETH_H_ */ 107