ReactOS 0.4.15-dev-8390-g075894b
ParaNdis-Oid.h
Go to the documentation of this file.
1/*
2 * This file contains common for NDIS5/NDIS6 definition,
3 * related to OID support
4 *
5 * Copyright (c) 2008-2017 Red Hat, Inc.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met :
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and / or other materials provided with the distribution.
15 * 3. Neither the names of the copyright holders nor the names of their contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30#ifndef PARANDIS_COMMON_OID_H
31#define PARANDIS_COMMON_OID_H
32
33#include "ndis56common.h"
34
35/**********************************************************
36Wrapper for all the data, related to any OID request
37***********************************************************/
38typedef struct _tagOidDesc
39{
40 NDIS_OID Oid; // oid code
41 ULONG ulToDoFlags; // combination of eOidHelperFlags
42 PVOID InformationBuffer; // buffer received from NDIS
44 PUINT pBytesWritten; // OUT for query/method
45 PUINT pBytesNeeded; // OUT for query/set/method when length of buffer is wrong
46 PUINT pBytesRead; // OUT for set/method
47 PVOID Reserved; // Reserved for pending requests
49
51
52typedef struct _tagOidWhatToDo
53{
54 NDIS_OID oid; // oid number
55 int nEntryLevel; // do print on entry level
56 int nExitFailLevel; // do print on exit if failed
57 int nExitOKLevel; // do print on exit if OK
59 OIDHANDLERPROC OidSetProc; // procedure to call on SET
60 const char *name; // printable name
62
63
64typedef enum _tageOidHelperFlags {
65 ohfQuery = 1, // can be queried
66 ohfSet = 2, // can be set
68 ohfQueryStatOnly = 4, // redirect query stat to query
70 ohfQuery3264 = 8 | ohfQuery, // convert 64 to 32 on query
71 ohfQueryStat3264 = 8 | ohfQueryStat, // convert 64 to 32 on query stat
72 ohfSetLessOK = 16, // on set: if buffer is smaller, cleanup and copy
73 ohfSetMoreOK = 32 // on set: if buffer is larger, copy anyway
75
76
77
78
79/**********************************************************
80Common procedures related to OID support
81***********************************************************/
83NDIS_STATUS ParaNdis_OidQueryCopy(tOidDesc *pOid, PVOID pInfo, ULONG ulSize, BOOLEAN bFreeInfo);
95
96
97const char *ParaNdis_OidName(NDIS_OID oid);
98/**********************************************************
99Procedures to be implemented in NDIS5/NDIS6 specific modules
100***********************************************************/
101void ParaNdis_GetSupportedOid(PVOID *pOidsArray, PULONG pLength);
103
104#endif
NDIS_STATUS ParaNdis_OidQueryCopy(tOidDesc *pOid, PVOID pInfo, ULONG ulSize, BOOLEAN bFreeInfo)
Definition: ParaNdis-Oid.c:178
NDIS_STATUS ParaNdis_OidQueryCommon(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:225
const char * ParaNdis_OidName(NDIS_OID oid)
Definition: ParaNdis-Oid.c:456
NDIS_STATUS ParaNdis_OnAddWakeupPattern(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:584
NDIS_STATUS ParaNdis_OnSetPacketFilter(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:118
NDIS_STATUS ParaNdis_OidSetCopy(tOidDesc *pOid, PVOID pDest, ULONG ulSize)
Definition: ParaNdis-Oid.c:66
NDIS_STATUS ParaNdis_OnOidSetMulticastList(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:150
void ParaNdis_GetSupportedOid(PVOID *pOidsArray, PULONG pLength)
struct _tagOidWhatToDo tOidWhatToDo
NDIS_STATUS ParaNdis_OnEnableWakeup(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:627
void ParaNdis_FillPowerCapabilities(PNDIS_PNP_CAPABILITIES pCaps)
Definition: ParaNdis-Oid.c:138
NDIS_STATUS ParaNdis_OnRemoveWakeupPattern(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:606
NDIS_STATUS(* OIDHANDLERPROC)(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.h:50
_tageOidHelperFlags
Definition: ParaNdis-Oid.h:64
@ ohfQueryStat3264
Definition: ParaNdis-Oid.h:71
@ ohfQuery
Definition: ParaNdis-Oid.h:65
@ ohfSetMoreOK
Definition: ParaNdis-Oid.h:73
@ ohfQueryStatOnly
Definition: ParaNdis-Oid.h:68
@ ohfQuerySet
Definition: ParaNdis-Oid.h:67
@ ohfQueryStat
Definition: ParaNdis-Oid.h:69
@ ohfSet
Definition: ParaNdis-Oid.h:66
@ ohfSetLessOK
Definition: ParaNdis-Oid.h:72
@ ohfQuery3264
Definition: ParaNdis-Oid.h:70
NDIS_STATUS ParaNdis_OnSetLookahead(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:640
NDIS_STATUS ParaNdis_OnSetPower(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
static NDIS_STATUS ParaNdis_OidQuery(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
void ParaNdis_GetOidSupportRules(NDIS_OID oid, tOidWhatToDo *pRule, const tOidWhatToDo *Table)
Definition: ParaNdis-Oid.c:661
enum _tageOidHelperFlags eOidHelperFlags
struct _tagOidDesc tOidDesc
NDIS_STATUS ParaNdis_OnSetVlanId(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:645
unsigned char BOOLEAN
ASMGENDATA Table[]
Definition: genincdata.c:61
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
int NDIS_STATUS
Definition: ntddndis.h:475
ULONG NDIS_OID
Definition: ntddndis.h:230
PVOID InformationBuffer
Definition: ParaNdis-Oid.h:42
PUINT pBytesRead
Definition: ParaNdis-Oid.h:46
PUINT pBytesNeeded
Definition: ParaNdis-Oid.h:45
PVOID Reserved
Definition: ParaNdis-Oid.h:47
UINT InformationBufferLength
Definition: ParaNdis-Oid.h:43
ULONG ulToDoFlags
Definition: ParaNdis-Oid.h:41
PUINT pBytesWritten
Definition: ParaNdis-Oid.h:44
NDIS_OID Oid
Definition: ParaNdis-Oid.h:40
OIDHANDLERPROC OidSetProc
Definition: ParaNdis-Oid.h:59
const char * name
Definition: ParaNdis-Oid.h:60
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59