1 /* 2 * Broadcom Ethernettype protocol definitions 3 * 4 * Copyright (C) 2020, Broadcom. 5 * 6 * Unless you and Broadcom execute a separate written software license 7 * agreement governing use of this software, this software is licensed to you 8 * under the terms of the GNU General Public License version 2 (the "GPL"), 9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 10 * following added to such license: 11 * 12 * As a special exception, the copyright holders of this software give you 13 * permission to link this software with independent modules, and to copy and 14 * distribute the resulting executable under terms of your choice, provided that 15 * you also meet, for each linked independent module, the terms and conditions of 16 * the license of that module. An independent module is a module which is not 17 * derived from this software. The special exception does not apply to any 18 * modifications of the software. 19 * 20 * 21 * <<Broadcom-WL-IPTag/Dual:>> 22 */ 23 24 /* 25 * Broadcom Ethernet protocol defines 26 */ 27 28 #ifndef _BCMETH_H_ 29 #define _BCMETH_H_ 30 31 #ifndef _TYPEDEFS_H_ 32 #include <typedefs.h> 33 #endif 34 35 /* This marks the start of a packed structure section. */ 36 #include <packed_section_start.h> 37 38 /* ETHER_TYPE_BRCM is defined in ethernet.h */ 39 40 /* 41 * Following the 2byte BRCM ether_type is a 16bit BRCM subtype field 42 * in one of two formats: (only subtypes 32768-65535 are in use now) 43 * 44 * subtypes 0-32767: 45 * 8 bit subtype (0-127) 46 * 8 bit length in bytes (0-255) 47 * 48 * subtypes 32768-65535: 49 * 16 bit big-endian subtype 50 * 16 bit big-endian length in bytes (0-65535) 51 * 52 * length is the number of additional bytes beyond the 4 or 6 byte header 53 * 54 * Reserved values: 55 * 0 reserved 56 * 5-15 reserved for iLine protocol assignments 57 * 17-126 reserved, assignable 58 * 127 reserved 59 * 32768 reserved 60 * 32769-65534 reserved, assignable 61 * 65535 reserved 62 */ 63 64 /* 65 * While adding the subtypes and their specific processing code make sure 66 * bcmeth_bcm_hdr_t is the first data structure in the user specific data structure definition 67 */ 68 69 #define BCMILCP_SUBTYPE_RATE 1 70 #define BCMILCP_SUBTYPE_LINK 2 71 #define BCMILCP_SUBTYPE_CSA 3 72 #define BCMILCP_SUBTYPE_LARQ 4 73 #define BCMILCP_SUBTYPE_VENDOR 5 74 #define BCMILCP_SUBTYPE_FLH 17 75 76 #define BCMILCP_SUBTYPE_VENDOR_LONG 32769 77 #define BCMILCP_SUBTYPE_CERT 32770 78 #define BCMILCP_SUBTYPE_SES 32771 79 80 #define BCMILCP_BCM_SUBTYPE_RESERVED 0 81 #define BCMILCP_BCM_SUBTYPE_EVENT 1 82 #define BCMILCP_BCM_SUBTYPE_SES 2 83 /* 84 * The EAPOL type is not used anymore. Instead EAPOL messages are now embedded 85 * within BCMILCP_BCM_SUBTYPE_EVENT type messages 86 */ 87 /* #define BCMILCP_BCM_SUBTYPE_EAPOL 3 */ 88 #define BCMILCP_BCM_SUBTYPE_DPT 4 89 #define BCMILCP_BCM_SUBTYPE_DNGLEVENT 5 90 91 #define BCMILCP_BCM_SUBTYPEHDR_MINLENGTH 8 92 #define BCMILCP_BCM_SUBTYPEHDR_VERSION 0 93 #define BCMILCP_BCM_SUBTYPE_EVENT_DATA_PAD 2 94 95 /* These fields are stored in network order */ 96 typedef BWL_PRE_PACKED_STRUCT struct bcmeth_hdr 97 { 98 uint16 subtype; /* Vendor specific..32769 */ 99 uint16 length; 100 uint8 version; /* Version is 0 */ 101 uint8 oui[3]; /* Broadcom OUI */ 102 /* user specific Data */ 103 uint16 usr_subtype; 104 } BWL_POST_PACKED_STRUCT bcmeth_hdr_t; 105 106 /* This marks the end of a packed structure section. */ 107 #include <packed_section_end.h> 108 109 #endif /* _BCMETH_H_ */ 110