GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / include / oidencap.h
blobe6215f84ded0918d3562e3eef16e878addb9f7f6
1 /*
2 * OID encapsulation defines for user-mode to driver interface.
4 * Definitions subject to change without notice.
6 * Copyright (C) 2012, Broadcom Corporation
7 * All Rights Reserved.
8 *
9 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
10 * the contents of this file may not be disclosed to third parties, copied
11 * or duplicated in any form, in whole or in part, without the prior
12 * written permission of Broadcom Corporation.
14 * $Id: oidencap.h 342964 2012-07-05 02:39:01Z $
17 #ifndef _oidencap_h_
18 #define _oidencap_h_
21 * NOTE: same as OID_EPI_BASE defined in epiioctl.h
23 #define OID_BCM_BASE 0xFFFEDA00
26 * These values are now set in stone to preserve forward
27 * binary compatibility.
29 #define OID_BCM_SETINFORMATION (OID_BCM_BASE + 0x3e)
30 #define OID_BCM_GETINFORMATION (OID_BCM_BASE + 0x3f)
31 #define OID_DHD_IOCTLS (OID_BCM_BASE + 0x41)
34 #define OIDENCAP_COOKIE 0xABADCEDE
36 #if defined(_MSC_VER)
37 #pragma pack(push, 1)
38 #endif
41 * In the following two structs keep cookie as last element
42 * before data. This allows struct validation when fields
43 * are added or deleted. The data immediately follows the
44 * structure and is required to be 4-byte aligned.
46 * OID_BCM_SETINFORMATION uses setinformation_t
47 * OID_BCM_GETINFORMATION uses getinformation_t
49 typedef struct _setinformation {
50 ULONG cookie; /* OIDENCAP_COOKIE */
51 ULONG oid; /* actual OID value for set */
52 } setinformation_t;
54 #define SETINFORMATION_SIZE (sizeof(setinformation_t))
55 #define SETINFORMATION_DATA(shdr) ((UCHAR *)&(shdr)[1])
57 typedef struct _getinformation {
58 ULONG oid; /* actual OID value for query */
59 ULONG len; /* length of response buffer, including this header */
60 ULONG cookie; /* OIDENCAP_COOKIE; altered by driver if more data available */
61 } getinformation_t;
63 #define GETINFORMATION_SIZE (sizeof(getinformation_t))
64 #define GETINFORMATION_DATA(ghdr) ((UCHAR *)&(ghdr)[1])
66 typedef struct _reqinformation_hdr {
67 ULONG version; /* REQINFORMATION_XXX_VERSION */
68 ULONG cookie; /* OIDENCAP_COOKIE; altered by driver if more data available */
69 ULONG len; /* REQINFORMATION_XXX_SIZE */
70 } reqinformation_hdr_t;
72 #define REQINFORMATION_HDR_SIZE (sizeof(reqinformation_hdr_t))
74 /* This structure should be used as a replacement to
75 * getinfomation_t and setinformation_t.
76 * When new fields are added to this structure, add them to the end
77 * and increment the version field.
79 typedef struct _reqinformation_0 {
80 reqinformation_hdr_t hdr;
81 ULONG oid; /* actual OID value for the request */
82 ULONG idx; /* bsscfg index */
83 ULONG status; /* NDIS_STATUS for actual OID */
84 /* Add new fields here... */
85 /* 4-byte aligned data follows */
86 } reqinformation_0_t;
88 #define REQINFORMATION_0_VERSION 0
89 #define REQINFORMATION_0_SIZE (sizeof(reqinformation_0_t))
90 #define REQINFORMATION_0_DATA(ghdr) ((UCHAR *)(ghdr) + REQINFORMATION_0_SIZE)
92 typedef reqinformation_0_t reqinformation_t;
94 #define REQINFORMATION_VERSION REQINFORMATION_0_VERSION
95 #define REQINFORMATION_SIZE REQINFORMATION_0_SIZE
96 #define REQINFORMATION_DATA(ghdr) REQINFORMATION_0_DATA(ghdr)
98 #if defined(_MSC_VER)
99 #pragma pack(pop)
100 #endif
102 #endif /* _oidencap_h_ */