• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Broadcom Ethernettype  protocol definitions
3  *
4  * Copyright (C) 1999-2019, 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
16  * of the license of that module.  An independent module is a module which is
17  * not derived from this software.  The special exception does not apply to any
18  * modifications of the software.
19  *
20  *      Notwithstanding the above, under no circumstances may you combine this
21  * software in any way with any other Broadcom software provided under a license
22  * other than the GPL, without Broadcom's express prior written consent.
23  *
24  *
25  * <<Broadcom-WL-IPTag/Open:>>
26  *
27  * $Id: bcmeth.h 701825 2017-05-26 16:45:27Z $
28  */
29 
30 /*
31  * Broadcom Ethernet protocol defines
32  */
33 
34 #ifndef _BCMETH_H_
35 #define _BCMETH_H_
36 
37 #ifndef _TYPEDEFS_H_
38 #include <typedefs.h>
39 #endif // endif
40 
41 /* This marks the start of a packed structure section. */
42 #include <packed_section_start.h>
43 
44 /* ETHER_TYPE_BRCM is defined in ethernet.h */
45 
46 /*
47  * Following the 2byte BRCM ether_type is a 16bit BRCM subtype field
48  * in one of two formats: (only subtypes 32768-65535 are in use now)
49  *
50  * subtypes 0-32767:
51  *     8 bit subtype (0-127)
52  *     8 bit length in bytes (0-255)
53  *
54  * subtypes 32768-65535:
55  *     16 bit big-endian subtype
56  *     16 bit big-endian length in bytes (0-65535)
57  *
58  * length is the number of additional bytes beyond the 4 or 6 byte header
59  *
60  * Reserved values:
61  * 0 reserved
62  * 5-15 reserved for iLine protocol assignments
63  * 17-126 reserved, assignable
64  * 127 reserved
65  * 32768 reserved
66  * 32769-65534 reserved, assignable
67  * 65535 reserved
68  */
69 
70 /*
71  * While adding the subtypes and their specific processing code make sure
72  * bcmeth_bcm_hdr_t is the first data structure in the user specific data
73  * structure definition
74  */
75 
76 #define BCMILCP_SUBTYPE_RATE 1
77 #define BCMILCP_SUBTYPE_LINK 2
78 #define BCMILCP_SUBTYPE_CSA 3
79 #define BCMILCP_SUBTYPE_LARQ 4
80 #define BCMILCP_SUBTYPE_VENDOR 5
81 #define BCMILCP_SUBTYPE_FLH 17
82 
83 #define BCMILCP_SUBTYPE_VENDOR_LONG 32769
84 #define BCMILCP_SUBTYPE_CERT 32770
85 #define BCMILCP_SUBTYPE_SES 32771
86 
87 #define BCMILCP_BCM_SUBTYPE_RESERVED 0
88 #define BCMILCP_BCM_SUBTYPE_EVENT 1
89 #define BCMILCP_BCM_SUBTYPE_SES 2
90 #define BCMILCP_BCM_SUBTYPE_DPT 4
91 #define BCMILCP_BCM_SUBTYPE_DNGLEVENT 5
92 
93 #define BCMILCP_BCM_SUBTYPEHDR_MINLENGTH 8
94 #define BCMILCP_BCM_SUBTYPEHDR_VERSION 0
95 #define BCMILCP_BCM_SUBTYPE_EVENT_DATA_PAD 2
96 
97 /* These fields are stored in network order */
98 typedef BWL_PRE_PACKED_STRUCT struct bcmeth_hdr {
99     uint16 subtype; /* Vendor specific..32769 */
100     uint16 length;
101     uint8 version; /* Version is 0 */
102     uint8 oui[3];  /* Broadcom OUI */
103     /* user specific Data */
104     uint16 usr_subtype;
105 } BWL_POST_PACKED_STRUCT bcmeth_hdr_t;
106 
107 /* This marks the end of a packed structure section. */
108 #include <packed_section_end.h>
109 
110 #endif /*  _BCMETH_H_ */
111