finally move buildroot-ng to trunk
[openwrt/openwrt.git] / package / broadcom-wl / src / wlc / include / proto / bcmeth.h
1 /*
2 * Broadcom Ethernettype protocol definitions
3 *
4 * Copyright 2006, Broadcom Corporation
5 * All Rights Reserved.
6 *
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
11 *
12 * $Id: bcmeth.h,v 1.1.1.4 2006/02/27 03:43:16 honor Exp $
13 */
14
15 /*
16 * Broadcom Ethernet protocol defines
17 */
18
19 #ifndef _BCMETH_H_
20 #define _BCMETH_H_
21
22 /* enable structure packing */
23 #if defined(__GNUC__)
24 #define PACKED __attribute__((packed))
25 #else
26 #pragma pack(1)
27 #define PACKED
28 #endif
29
30 /* ETHER_TYPE_BRCM is defined in ethernet.h */
31
32 /*
33 * Following the 2byte BRCM ether_type is a 16bit BRCM subtype field
34 * in one of two formats: (only subtypes 32768-65535 are in use now)
35 *
36 * subtypes 0-32767:
37 * 8 bit subtype (0-127)
38 * 8 bit length in bytes (0-255)
39 *
40 * subtypes 32768-65535:
41 * 16 bit big-endian subtype
42 * 16 bit big-endian length in bytes (0-65535)
43 *
44 * length is the number of additional bytes beyond the 4 or 6 byte header
45 *
46 * Reserved values:
47 * 0 reserved
48 * 5-15 reserved for iLine protocol assignments
49 * 17-126 reserved, assignable
50 * 127 reserved
51 * 32768 reserved
52 * 32769-65534 reserved, assignable
53 * 65535 reserved
54 */
55
56 /*
57 * While adding the subtypes and their specific processing code make sure
58 * bcmeth_bcm_hdr_t is the first data structure in the user specific data structure definition
59 */
60
61 #define BCMILCP_SUBTYPE_RATE 1
62 #define BCMILCP_SUBTYPE_LINK 2
63 #define BCMILCP_SUBTYPE_CSA 3
64 #define BCMILCP_SUBTYPE_LARQ 4
65 #define BCMILCP_SUBTYPE_VENDOR 5
66 #define BCMILCP_SUBTYPE_FLH 17
67
68 #define BCMILCP_SUBTYPE_VENDOR_LONG 32769
69 #define BCMILCP_SUBTYPE_CERT 32770
70 #define BCMILCP_SUBTYPE_SES 32771
71
72
73 #define BCMILCP_BCM_SUBTYPE_RESERVED 0
74 #define BCMILCP_BCM_SUBTYPE_EVENT 1
75 #define BCMILCP_BCM_SUBTYPE_SES 2
76 /*
77 * The EAPOL type is not used anymore. Instead EAPOL messages are now embedded
78 * within BCMILCP_BCM_SUBTYPE_EVENT type messages
79 */
80 /* #define BCMILCP_BCM_SUBTYPE_EAPOL 3 */
81
82 #define BCMILCP_BCM_SUBTYPEHDR_MINLENGTH 8
83 #define BCMILCP_BCM_SUBTYPEHDR_VERSION 0
84
85 /* These fields are stored in network order */
86 typedef struct bcmeth_hdr
87 {
88 uint16 subtype; /* Vendor specific..32769 */
89 uint16 length;
90 uint8 version; /* Version is 0 */
91 uint8 oui[3]; /* Broadcom OUI */
92 /* user specific Data */
93 uint16 usr_subtype;
94 } PACKED bcmeth_hdr_t;
95
96 #undef PACKED
97 #if !defined(__GNUC__)
98 #pragma pack()
99 #endif
100
101 #endif /* _BCMETH_H_ */