ReactOS 0.4.15-dev-7958-gcd0bb1a
ParaNdis-Oid.c
Go to the documentation of this file.
1/*
2 * This file contains NDIS OID support procedures, common for NDIS5 and NDIS6
3 *
4 * Copyright (c) 2008-2017 Red Hat, Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met :
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and / or other materials provided with the distribution.
14 * 3. Neither the names of the copyright holders nor the names of their contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29#include "ParaNdis-Oid.h"
30
31#ifdef WPP_EVENT_TRACING
32#include "ParaNdis-Oid.tmh"
33#endif
34#include <sal.h>
35
36static const char VendorName[] = "Red Hat";
37
39{
40 UCHAR c = nibble & 0xf;
41 c += (c <= 9) ? 0 : 7;
42 c += '0';
43 return c;
44}
45
46/**********************************************************
47Common implementation of copy operation when OID is set
48pOid->Flags (if used) controls when the source data may be truncated or padded on copy
49Parameters:
50 tOidDesc *pOid - descriptor of OID
51 PVOID pDest - buffer to receive data sent by NDIS
52 ULONG ulSize - size of data to copy
53Return value:
54 SUCCESS or NDIS error code if target buffer size is wrong
55Rules:
56
57PDEST <>OK SIZE PAYLOAD SZ
58NULL any n/a any fail
59BUFF any 0 any success, none copied
60BUFF any SZ ==SZ success, copied SZ
61BUFF !lessok SZ <SZ fail (small), none copied
62BUFF !moreok SZ >SZ fail (overflow), none copied
63BUFF lessok SZ <SZ success, SZ cleared, payload sz copied
64BUFF moreok SZ >SZ success, copied SZ
65***************************************************/
67 tOidDesc *pOid,
68 PVOID pDest,
69 ULONG ulSize)
70{
72 if (!pDest)
73 {
75 *(pOid->pBytesRead) = 0;
76 *(pOid->pBytesNeeded) = 0;
77 }
78 else if (ulSize)
79 {
80 if (pOid->InformationBufferLength < ulSize)
81 {
82 if (pOid->ulToDoFlags & ohfSetLessOK)
83 {
84 *(pOid->pBytesRead) = pOid->InformationBufferLength;
85 NdisZeroMemory(pDest, ulSize);
87 }
88 else
89 {
91 *(pOid->pBytesRead) = 0;
92 *(pOid->pBytesNeeded) = ulSize;
93 }
94 }
95 else if (pOid->InformationBufferLength == ulSize || (pOid->ulToDoFlags & ohfSetMoreOK))
96 {
97 *(pOid->pBytesRead) = ulSize;
98 NdisMoveMemory(pDest, pOid->InformationBuffer, ulSize);
99 }
100 else
101 {
103 *(pOid->pBytesNeeded) = ulSize;
104 *(pOid->pBytesRead) = 0;
105 }
106 }
107 else
108 {
109 *(pOid->pBytesRead) = pOid->InformationBufferLength;
110 }
111 return status;
112}
113
114
115/**********************************************************
116Common handler of setting packet filter
117***********************************************************/
119{
120 ULONG newValue;
122 pOid,
123 &newValue,
124 sizeof(newValue));
125
126 if (newValue & ~PARANDIS_PACKET_FILTERS)
128
130 {
131 pContext->PacketFilter = newValue;
132 DPrintf(1, ("[%s] PACKET FILTER SET TO %x", __FUNCTION__, pContext->PacketFilter));
134 }
135 return status;
136}
137
139{
140 NdisZeroMemory(pCaps, sizeof(*pCaps));
144}
145
146
147/**********************************************************
148Common handler of setting multicast list
149***********************************************************/
151{
154 pContext,
155 pOid->InformationBuffer,
157 pOid->pBytesRead,
158 pOid->pBytesNeeded);
160 return status;
161}
162
163/**********************************************************
164Common helper of copy operation on GET OID
165Copies data from specified location to NDIS buffer
16664-bit variable will be casted to 32-bit, if specified on pOid->Flags
167
168Parameters:
169 tOidDesc *pOid - descriptor of OID
170 PVOID pInfo - source to copy from
171 ULONG ulSize - source info size
172Return value:
173 SUCCESS or kind of failure when the dest buffer size is wrong
174Comments:
175pInfo must be non-NULL, otherwise error returned
176ulSize may be 0, then SUCCESS returned without copy
177***********************************************************/
179 tOidDesc *pOid,
180 PVOID pInfo,
181 ULONG ulSize,
182 BOOLEAN bFreeInfo)
183{
185 *(pOid->pBytesNeeded) = ulSize;
186 if (!pInfo)
187 {
189 *(pOid->pBytesWritten) = 0;
190 *(pOid->pBytesNeeded) = 0;
191 }
192 else if (pOid->InformationBufferLength >= ulSize)
193 {
194 if (ulSize) NdisMoveMemory(pOid->InformationBuffer, pInfo, ulSize);
195 *(pOid->pBytesWritten) = ulSize;
196 *(pOid->pBytesNeeded) = 0;
197 }
198 else if ((pOid->ulToDoFlags & ohfQuery3264) && pOid->InformationBufferLength == sizeof(ULONG) && ulSize == sizeof(ULONG64))
199 {
200 ULONG64 u64 = *(ULONG64 *)pInfo;
201 ULONG ul = (ULONG)u64;
202 NdisMoveMemory(pOid->InformationBuffer, &ul, sizeof(ul));
203 *(pOid->pBytesWritten) = sizeof(ul);
204 }
205 else
206 {
208 *(pOid->pBytesWritten) = 0;
209 }
210 if (bFreeInfo && pInfo)
211 {
212 NdisFreeMemory(pInfo, 0, 0);
213 }
214 return status;
215}
216
217/**********************************************************
218Common handler of Oid queries
219Parameters:
220 context
221 tOidDesc *pOid - filled descriptor of OID operation
222Return value:
223 SUCCESS or kind of failure
224***********************************************************/
226{
228 PVOID pInfo = NULL;
229 ULONG ulSize = 0;
230 BOOLEAN bFreeInfo = FALSE;
231 union _tagtemp
232 {
233 NDIS_MEDIUM Medium;
234 ULONG64 ul64;
235 ULONG ul;
236 USHORT us;
238 } u;
239#if defined(_MSC_VER) && !defined(__clang__)
240 #define CONCATFIELD(object, field) object.##field
241#else
242 #define CONCATFIELD(object, field) object.field
243#endif
244#define SETINFO(field, value) pInfo = CONCATFIELD(&u, field); ulSize = sizeof(CONCATFIELD(u, field)); CONCATFIELD(u, field) = (value)
245 switch (pOid->Oid)
246 {
248 ParaNdis_GetSupportedOid(&pInfo, &ulSize);
249 break;
252 break;
256 SETINFO(Medium, NdisMedium802_3);
257 break;
259 SETINFO(ul, pContext->MaxPacketSize.nMaxFullSizeOS);
260 break;
262 SETINFO(ul, pContext->MaxPacketSize.nMaxDataSize);
263 break;
265 SETINFO(ul, pContext->MaxPacketSize.nMaxFullSizeOS * pContext->nofFreeTxDescriptors);
266 break;
268 SETINFO(ul, pContext->MaxPacketSize.nMaxFullSizeOS * pContext->NetMaxReceiveBuffers);
269 break;
275 SETINFO(ul, pContext->MaxPacketSize.nMaxFullSizeOS);
276 break;
278 // TODO: this is not completely correct, but only if
279 // the TX queue is not full
280 SETINFO(ul, pContext->maxFreeTxDescriptors - pContext->nofFreeTxDescriptors);
281 break;
283 SETINFO(ul, 0x00ffffff);
284 break;
286 pInfo = (PVOID)VendorName;
287 ulSize = sizeof(VendorName);
288 break;
289
291 SETINFO(ul, (NDIS_MINIPORT_MAJOR_VERSION << 16) | NDIS_MINIPORT_MINOR_VERSION);
292 break;
294 pInfo = &pContext->PacketFilter;
295 ulSize = sizeof(pContext->PacketFilter);
296 break;
298 SETINFO(us, ((NDIS_MINIPORT_MAJOR_VERSION << 8) | NDIS_MINIPORT_MINOR_VERSION));
299 break;
301 {
305 if (IsPrioritySupported(pContext))
307 if (IsVlanSupported(pContext))
309 SETINFO(ul, options);
310 }
311 break;
314 //NdisMediaStateConnected:
315 break;
317 // NDIS ignores it for deserialized drivers
318 SETINFO(ul,pContext->nofFreeTxDescriptors);
319 break;
321 pInfo = pContext->PermanentMacAddress;
322 ulSize = sizeof(pContext->PermanentMacAddress);
323 break;
325 pInfo = pContext->CurrentMacAddress;
326 ulSize = sizeof(pContext->CurrentMacAddress);
327 break;
329 // size if 0, just to indicate success
330 pInfo = &status;
331 break;
333 SETINFO(ul64, pContext->Statistics.ifHCOutUcastOctets);
334 break;
336 SETINFO(ul64, pContext->Statistics.ifHCOutUcastPkts);
337 break;
340 break;
342 SETINFO(ul64, pContext->Statistics.ifHCOutMulticastPkts);
343 break;
346 break;
348 SETINFO(ul64, pContext->Statistics.ifHCOutBroadcastPkts);
349 break;
351 SETINFO(ul64, pContext->Statistics.ifHCInUcastOctets);
352 break;
354 SETINFO(ul64, pContext->Statistics.ifHCInUcastPkts);
355 break;
358 break;
360 SETINFO(ul64, pContext->Statistics.ifHCInMulticastPkts);
361 break;
364 break;
366 SETINFO(ul64, pContext->Statistics.ifHCInBroadcastPkts);
367 break;
368 case OID_GEN_XMIT_OK:
369 SETINFO(ul64,
370 pContext->Statistics.ifHCOutUcastPkts +
373 break;
374 case OID_GEN_RCV_OK:
375 SETINFO(ul64,
376 pContext->Statistics.ifHCInUcastPkts +
379 DPrintf(4, ("[%s] Total frames %I64u", __FUNCTION__, u.ul64));
380 break;
382 SETINFO(ul64, pContext->Statistics.ifOutErrors );
383 break;
409 SETINFO(ul64, 0);
410 break;
412 pInfo = pContext->MulticastData.MulticastList;
414 break;
417 break;
419 pInfo = &u.PMCaps;
420 ulSize = sizeof(u.PMCaps);
422 break;
424 SETINFO(ul, 0);
425 break;
426 case OID_GEN_VLAN_ID:
427 SETINFO(ul, pContext->VlanId);
428 if (!IsVlanSupported(pContext))
430 break;
432 if (!pContext->DummyLookAhead) pContext->DummyLookAhead = pContext->MaxPacketSize.nMaxFullSizeOS;
433 pInfo = &pContext->DummyLookAhead;
434 ulSize = sizeof(pContext->DummyLookAhead);
435 break;
437 SETINFO(ul, pContext->ulEnableWakeup);
438 break;
439 default:
441 break;
442 }
443
445 {
446 status = ParaNdis_OidQueryCopy(pOid, pInfo, ulSize, bFreeInfo);
447 }
448
449 return status;
450}
451
452
453/**********************************************************
454 Just gets OID name
455***********************************************************/
457{
458#undef MAKECASE
459#define MAKECASE(id) case id: return #id;
460 switch (oid)
461 {
542 default:
543 {
544 static UCHAR buffer[9];
545 UINT i;
546 for (i = 0; i < 8; ++i)
547 {
548 UCHAR nibble = (UCHAR)((oid >> (28 - i * 4)) & 0xf);
549 buffer[i] = hexdigit(nibble);
550 }
551 return (char *)buffer;
552 }
553 }
554}
555
556/**********************************************************
557Checker of valid size of provided wake-up patter
558Return value: SUCCESS or kind of failure where the buffer is wrong
559***********************************************************/
561{
563
564 if (*pValidSize < sizeof(*p))
565 {
566 *pValidSize = sizeof(*p);
567 }
568 else
569 {
570 ULONG ul = p->PatternOffset + p->PatternSize;
571 if (*pValidSize >= ul) status = NDIS_STATUS_SUCCESS;
572 *pValidSize = ul;
573 DPrintf(2, ("[%s] pattern of %d at %d, mask %d (%s)",
574 __FUNCTION__, p->PatternSize, p->PatternOffset, p->MaskSize,
575 status == NDIS_STATUS_SUCCESS ? "OK" : "Fail"));
576 }
577 return status;
578}
579
580
581/**********************************************************
582Common handler of wake-up pattern addition
583***********************************************************/
585{
588 ULONG ulValidSize = pOid->InformationBufferLength;
589 status = ValidateWakeupPattern(pPmPattern, &ulValidSize);
591 {
592 *pOid->pBytesRead = ulValidSize;
593 }
594 else
595 {
596 *pOid->pBytesRead = 0;
597 *pOid->pBytesNeeded = ulValidSize;
598 }
599 // TODO: Apply
600 return status;
601}
602
603/**********************************************************
604Common handler of wake-up pattern removal
605***********************************************************/
607{
610 ULONG ulValidSize = pOid->InformationBufferLength;
611 status = ValidateWakeupPattern(pPmPattern, &ulValidSize);
613 {
614 *pOid->pBytesRead = ulValidSize;
615 }
616 else
617 {
618 *pOid->pBytesRead = 0;
619 *pOid->pBytesNeeded = ulValidSize;
620 }
621 return status;
622}
623
624/**********************************************************
625Common handler of wake-up enabling upon standby
626***********************************************************/
628{
629 NDIS_STATUS status = ParaNdis_OidSetCopy(pOid, &pContext->ulEnableWakeup, sizeof(pContext->ulEnableWakeup));
631 {
632 DPrintf(0, ("[%s] new value %lX", __FUNCTION__, pContext->ulEnableWakeup));
633 }
634 return status;
635}
636
637/**********************************************************
638Dummy implementation
639***********************************************************/
641{
642 return ParaNdis_OidSetCopy(pOid, &pContext->DummyLookAhead, sizeof(pContext->DummyLookAhead));
643}
644
646{
648 if (IsVlanSupported(pContext))
649 {
650 status = ParaNdis_OidSetCopy(pOid, &pContext->VlanId, sizeof(pContext->VlanId));
651 pContext->VlanId &= 0xfff;
652 DPrintf(0, ("[%s] new value %d on MAC %X", __FUNCTION__, pContext->VlanId, pContext->CurrentMacAddress[5]));
654 }
655 return status;
656}
657
658/**********************************************************
659Retrieves support rules for specific OID
660***********************************************************/
662{
663 static const tOidWhatToDo defaultRule = { 0, 0, 0, 0, 0, NULL, "Unknown OID" };
664 UINT i;
665 *pRule = defaultRule;
666 pRule->oid = oid;
667
668 for (i = 0; Table[i].oid != 0; ++i)
669 {
670 if (Table[i].oid == oid)
671 {
672 *pRule = Table[i];
673 break;
674 }
675 }
676 pRule->name = ParaNdis_OidName(oid);
677}
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
static UCHAR FORCEINLINE hexdigit(UCHAR nibble)
Definition: ParaNdis-Oid.c:38
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 ParaNdis_OnSetLookahead(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:640
#define SETINFO(field, value)
void ParaNdis_GetOidSupportRules(NDIS_OID oid, tOidWhatToDo *pRule, const tOidWhatToDo *Table)
Definition: ParaNdis-Oid.c:661
#define MAKECASE(id)
NDIS_STATUS ParaNdis_OnSetVlanId(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:645
static NDIS_STATUS ValidateWakeupPattern(PNDIS_PM_PACKET_PATTERN p, PULONG pValidSize)
Definition: ParaNdis-Oid.c:560
static const char VendorName[]
Definition: ParaNdis-Oid.c:36
void ParaNdis_GetSupportedOid(PVOID *pOidsArray, PULONG pLength)
@ ohfSetMoreOK
Definition: ParaNdis-Oid.h:73
@ ohfSetLessOK
Definition: ParaNdis-Oid.h:72
@ ohfQuery3264
Definition: ParaNdis-Oid.h:70
unsigned char BOOLEAN
ULONG64 u64
Definition: btrfs.h:15
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define __FUNCTION__
Definition: types.h:116
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
VOID EXPORT NdisFreeMemory(IN PVOID VirtualAddress, IN UINT Length, IN UINT MemoryFlags)
Definition: memory.c:110
#define ETH_LENGTH_OF_ADDRESS
Definition: efilter.h:16
ASMGENDATA Table[]
Definition: genincdata.c:61
GLuint buffer
Definition: glext.h:5915
const GLubyte * c
Definition: glext.h:8905
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define c
Definition: ke_i.h:80
unsigned __int64 ULONG64
Definition: imports.h:198
static const BYTE us[]
Definition: encode.c:689
#define __fallthrough
Definition: ms_sal.h:2886
static BOOLEAN FORCEINLINE IsPrioritySupported(PARANDIS_ADAPTER *pContext)
Definition: ndis56common.h:547
static BOOLEAN FORCEINLINE IsVlanSupported(PARANDIS_ADAPTER *pContext)
Definition: ndis56common.h:542
#define PARANDIS_MULTICAST_LIST_SIZE
Definition: ndis56common.h:119
VOID ParaNdis_UpdateDeviceFilters(PARANDIS_ADAPTER *pContext)
VOID ParaNdis_DeviceFiltersUpdateVlanId(PARANDIS_ADAPTER *pContext)
static const ULONG PARANDIS_PACKET_FILTERS
Definition: ndis56common.h:143
NDIS_STATUS ParaNdis_SetMulticastList(PARANDIS_ADAPTER *pContext, PVOID Buffer, ULONG BufferSize, PUINT pBytesRead, PUINT pBytesNeeded)
#define NdisZeroMemory(Destination, Length)
Definition: ndis.h:3926
unsigned int UINT
Definition: ndis.h:50
#define NDIS_STATUS_INVALID_DATA
Definition: ndis.h:486
#define NDIS_STATUS_NOT_SUPPORTED
Definition: ndis.h:479
#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND
Definition: ndis.h:684
#define NDIS_STATUS_INVALID_OID
Definition: ndis.h:488
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
#define NDIS_STATUS_BUFFER_TOO_SHORT
Definition: ndis.h:487
#define NDIS_STATUS_BUFFER_OVERFLOW
Definition: ndis.h:464
#define NDIS_MAC_OPTION_NO_LOOPBACK
Definition: ndis.h:685
#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA
Definition: ndis.h:682
#define NDIS_MAC_OPTION_8021P_PRIORITY
Definition: ndis.h:688
#define NdisMoveMemory(Destination, Source, Length)
Definition: ndis.h:3896
#define OID_GEN_MULTICAST_FRAMES_XMIT
Definition: ntddndis.h:277
#define OID_IP4_OFFLOAD_STATS
Definition: ntddndis.h:385
enum _NDIS_MEDIUM NDIS_MEDIUM
#define OID_GEN_TRANSMIT_BLOCK_SIZE
Definition: ntddndis.h:242
#define OID_GEN_DIRECTED_BYTES_RCV
Definition: ntddndis.h:280
#define OID_GEN_PROTOCOL_OPTIONS
Definition: ntddndis.h:250
#define OID_GEN_DIRECTED_FRAMES_XMIT
Definition: ntddndis.h:275
#define OID_GEN_XMIT_OK
Definition: ntddndis.h:267
#define OID_GEN_MAXIMUM_TOTAL_SIZE
Definition: ntddndis.h:249
#define OID_GEN_BROADCAST_BYTES_XMIT
Definition: ntddndis.h:278
#define OID_GEN_XMIT_ERROR
Definition: ntddndis.h:269
#define OID_GEN_VENDOR_DRIVER_VERSION
Definition: ntddndis.h:254
#define OID_802_3_PERMANENT_ADDRESS
Definition: ntddndis.h:302
#define OID_GEN_LINK_SPEED
Definition: ntddndis.h:239
#define OID_GEN_VENDOR_ID
Definition: ntddndis.h:244
#define OID_802_3_RCV_OVERRUN
Definition: ntddndis.h:312
#define OID_GEN_CURRENT_PACKET_FILTER
Definition: ntddndis.h:246
@ NdisMediaStateConnected
Definition: ntddndis.h:470
@ NdisMediaStateDisconnected
Definition: ntddndis.h:471
#define OID_GEN_RCV_NO_BUFFER
Definition: ntddndis.h:271
#define OID_PNP_SET_POWER
Definition: ntddndis.h:361
#define OID_802_3_XMIT_HEARTBEAT_FAILURE
Definition: ntddndis.h:314
#define OID_GEN_PHYSICAL_MEDIUM
Definition: ntddndis.h:264
#define OID_802_3_XMIT_ONE_COLLISION
Definition: ntddndis.h:308
#define OID_802_3_XMIT_MORE_COLLISIONS
Definition: ntddndis.h:309
#define OID_GEN_NETCARD_LOAD
Definition: ntddndis.h:290
#define OID_802_3_XMIT_MAX_COLLISIONS
Definition: ntddndis.h:311
#define OID_GEN_RECEIVE_BUFFER_SPACE
Definition: ntddndis.h:241
#define OID_802_3_XMIT_TIMES_CRS_LOST
Definition: ntddndis.h:315
#define OID_802_3_MAXIMUM_LIST_SIZE
Definition: ntddndis.h:305
#define OID_GEN_TRANSPORT_HEADER_OFFSET
Definition: ntddndis.h:257
#define OID_GEN_INIT_TIME_MS
Definition: ntddndis.h:292
#define OID_GEN_DRIVER_VERSION
Definition: ntddndis.h:248
#define OID_GEN_DEVICE_PROFILE
Definition: ntddndis.h:291
#define OID_802_3_XMIT_UNDERRUN
Definition: ntddndis.h:313
#define OID_802_3_XMIT_LATE_COLLISIONS
Definition: ntddndis.h:316
#define OID_802_3_MAC_OPTIONS
Definition: ntddndis.h:306
#define OID_802_3_CURRENT_ADDRESS
Definition: ntddndis.h:303
#define OID_GEN_RESET_COUNTS
Definition: ntddndis.h:293
#define OID_GEN_GET_TIME_CAPS
Definition: ntddndis.h:288
#define OID_TCP_OFFLOAD_PARAMETERS
Definition: ntddndis.h:390
#define OID_802_3_MULTICAST_LIST
Definition: ntddndis.h:304
#define OID_GEN_SUPPORTED_GUIDS
Definition: ntddndis.h:255
#define OID_GEN_DIRECTED_FRAMES_RCV
Definition: ntddndis.h:281
#define OID_PNP_ENABLE_WAKE_UP
Definition: ntddndis.h:366
#define OID_GEN_TRANSMIT_BUFFER_SPACE
Definition: ntddndis.h:240
#define OID_GEN_MEDIA_SUPPORTED
Definition: ntddndis.h:235
@ NdisMedium802_3
Definition: ntddndis.h:188
#define OID_GEN_BROADCAST_FRAMES_XMIT
Definition: ntddndis.h:279
#define OID_GEN_BROADCAST_FRAMES_RCV
Definition: ntddndis.h:285
#define OID_PNP_ADD_WAKE_UP_PATTERN
Definition: ntddndis.h:363
#define OID_GEN_MAXIMUM_FRAME_SIZE
Definition: ntddndis.h:238
#define OID_GEN_MEDIA_CAPABILITIES
Definition: ntddndis.h:263
#define OID_GEN_RCV_CRC_ERROR
Definition: ntddndis.h:286
#define NDIS_MAC_OPTION_8021Q_VLAN
Definition: ntddndis.h:440
#define OID_GEN_MEDIA_IN_USE
Definition: ntddndis.h:236
#define OID_GEN_MEDIA_CONNECT_STATUS
Definition: ntddndis.h:252
#define OID_GEN_DIRECTED_BYTES_XMIT
Definition: ntddndis.h:274
#define OID_GEN_RCV_OK
Definition: ntddndis.h:268
#define OID_GEN_MAXIMUM_LOOKAHEAD
Definition: ntddndis.h:237
#define OID_GEN_BROADCAST_BYTES_RCV
Definition: ntddndis.h:284
#define OID_802_3_RCV_ERROR_ALIGNMENT
Definition: ntddndis.h:307
#define OID_GEN_VLAN_ID
Definition: ntddndis.h:260
int NDIS_STATUS
Definition: ntddndis.h:475
#define OID_PNP_QUERY_POWER
Definition: ntddndis.h:362
#define OID_GEN_RCV_ERROR
Definition: ntddndis.h:270
@ NdisHardwareStatusReady
Definition: ntddndis.h:450
#define OID_PNP_REMOVE_WAKE_UP_PATTERN
Definition: ntddndis.h:364
#define OID_PNP_CAPABILITIES
Definition: ntddndis.h:360
#define OID_TCP_TASK_OFFLOAD
Definition: ntddndis.h:377
#define OID_GEN_CURRENT_LOOKAHEAD
Definition: ntddndis.h:247
#define OID_GEN_MAC_OPTIONS
Definition: ntddndis.h:251
#define OID_GEN_VENDOR_DESCRIPTION
Definition: ntddndis.h:245
#define OID_IP6_OFFLOAD_STATS
Definition: ntddndis.h:386
#define OID_GEN_SUPPORTED_LIST
Definition: ntddndis.h:233
ULONG NDIS_OID
Definition: ntddndis.h:230
@ NdisDeviceStateUnspecified
Definition: ntddndis.h:37
#define OID_GEN_MULTICAST_BYTES_XMIT
Definition: ntddndis.h:276
#define OID_GEN_MULTICAST_BYTES_RCV
Definition: ntddndis.h:282
#define OID_GEN_GET_NETCARD_TIME
Definition: ntddndis.h:289
#define OID_802_3_XMIT_DEFERRED
Definition: ntddndis.h:310
#define OID_GEN_RECEIVE_BLOCK_SIZE
Definition: ntddndis.h:243
#define OID_GEN_MAXIMUM_SEND_PACKETS
Definition: ntddndis.h:253
#define OID_OFFLOAD_ENCAPSULATION
Definition: ntddndis.h:394
#define OID_GEN_TRANSMIT_QUEUE_LENGTH
Definition: ntddndis.h:287
#define OID_GEN_HARDWARE_STATUS
Definition: ntddndis.h:234
#define OID_GEN_MACHINE_NAME
Definition: ntddndis.h:258
#define OID_GEN_MEDIA_SENSE_COUNTS
Definition: ntddndis.h:294
#define OID_GEN_MULTICAST_FRAMES_RCV
Definition: ntddndis.h:283
struct _NDIS_PM_PACKET_PATTERN * PNDIS_PM_PACKET_PATTERN
unsigned short USHORT
Definition: pedump.c:61
NDIS_DEVICE_POWER_STATE MinMagicPacketWakeUp
Definition: ntddndis.h:171
NDIS_DEVICE_POWER_STATE MinPatternWakeUp
Definition: ntddndis.h:172
NDIS_DEVICE_POWER_STATE MinLinkChangeWakeUp
Definition: ntddndis.h:173
NDIS_PM_WAKE_UP_CAPABILITIES WakeUpCapabilities
Definition: ntddndis.h:183
UCHAR MulticastList[ETH_LENGTH_OF_ADDRESS *PARANDIS_MULTICAST_LIST_SIZE]
Definition: ndis56common.h:332
ULONG64 ifHCOutMulticastPkts
Definition: ndis56common.h:278
ULONG64 ifHCInBroadcastPkts
Definition: ndis56common.h:271
ULONG64 ifHCOutMulticastOctets
Definition: ndis56common.h:279
ULONG64 ifHCOutBroadcastOctets
Definition: ndis56common.h:281
ULONG64 ifHCInMulticastOctets
Definition: ndis56common.h:270
ULONG64 ifHCInMulticastPkts
Definition: ndis56common.h:269
ULONG64 ifHCInUcastOctets
Definition: ndis56common.h:268
ULONG64 ifHCOutUcastOctets
Definition: ndis56common.h:277
ULONG64 ifHCOutBroadcastPkts
Definition: ndis56common.h:280
ULONG64 ifHCOutUcastPkts
Definition: ndis56common.h:276
ULONG64 ifHCInBroadcastOctets
Definition: ndis56common.h:272
PVOID InformationBuffer
Definition: ParaNdis-Oid.h:42
PUINT pBytesRead
Definition: ParaNdis-Oid.h:46
PUINT pBytesNeeded
Definition: ParaNdis-Oid.h:45
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
const char * name
Definition: ParaNdis-Oid.h:60
tMulticastData MulticastData
Definition: ndis56common.h:387
NDIS_STATISTICS_INFO Statistics
Definition: ndis56common.h:420
UCHAR CurrentMacAddress[ETH_LENGTH_OF_ADDRESS]
Definition: ndis56common.h:402
UCHAR PermanentMacAddress[ETH_LENGTH_OF_ADDRESS]
Definition: ndis56common.h:401
tMaxPacketSize MaxPacketSize
Definition: ndis56common.h:398
Definition: ps.c:97
uint32_t * PULONG
Definition: typedefs.h:59
void * PVOID
Definition: typedefs.h:50
uint32_t ULONG
Definition: typedefs.h:59
#define FORCEINLINE
Definition: wdftypes.h:67
unsigned char UCHAR
Definition: xmlstorage.h:181