Resync with broadcom drivers 5.100.138.20 and utilities.
[tomato.git] / release / src-rt / include / oidencap.h
blob4e8cc5148000a987bcdf1951e0652744e4710e0b
1 /*
2 * OID encapsulation defines for user-mode to driver interface.
4 * Definitions subject to change without notice.
6 * Copyright (C) 2010, 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,v 13.8.586.1 2010-06-09 18:11:29 Exp $
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
40 /*
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 #if defined(_MSC_VER)
67 #pragma pack(pop)
68 #endif
70 #endif /* _oidencap_h_ */