ReactOS  0.4.15-dev-1171-gab82533
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 
36 static 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 /**********************************************************
47 Common implementation of copy operation when OID is set
48 pOid->Flags (if used) controls when the source data may be truncated or padded on copy
49 Parameters:
50  tOidDesc *pOid - descriptor of OID
51  PVOID pDest - buffer to receive data sent by NDIS
52  ULONG ulSize - size of data to copy
53 Return value:
54  SUCCESS or NDIS error code if target buffer size is wrong
55 Rules:
56 
57 PDEST <>OK SIZE PAYLOAD SZ
58 NULL any n/a any fail
59 BUFF any 0 any success, none copied
60 BUFF any SZ ==SZ success, copied SZ
61 BUFF !lessok SZ <SZ fail (small), none copied
62 BUFF !moreok SZ >SZ fail (overflow), none copied
63 BUFF lessok SZ <SZ success, SZ cleared, payload sz copied
64 BUFF 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 /**********************************************************
116 Common 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 /**********************************************************
148 Common handler of setting multicast list
149 ***********************************************************/
151 {
154  pContext,
155  pOid->InformationBuffer,
157  pOid->pBytesRead,
158  pOid->pBytesNeeded);
160  return status;
161 }
162 
163 /**********************************************************
164 Common helper of copy operation on GET OID
165 Copies data from specified location to NDIS buffer
166 64-bit variable will be casted to 32-bit, if specified on pOid->Flags
167 
168 Parameters:
169  tOidDesc *pOid - descriptor of OID
170  PVOID pInfo - source to copy from
171  ULONG ulSize - source info size
172 Return value:
173  SUCCESS or kind of failure when the dest buffer size is wrong
174 Comments:
175 pInfo must be non-NULL, otherwise error returned
176 ulSize 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 /**********************************************************
218 Common handler of Oid queries
219 Parameters:
220  context
221  tOidDesc *pOid - filled descriptor of OID operation
222 Return 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;
237  NDIS_PNP_CAPABILITIES PMCaps;
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;
282  case OID_GEN_VENDOR_ID:
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;
300  case OID_GEN_MAC_OPTIONS:
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;
328  case OID_PNP_QUERY_POWER:
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;
339  SETINFO(ul64, pContext->Statistics.ifHCOutMulticastOctets);
340  break;
342  SETINFO(ul64, pContext->Statistics.ifHCOutMulticastPkts);
343  break;
345  SETINFO(ul64, pContext->Statistics.ifHCOutBroadcastOctets);
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;
357  SETINFO(ul64, pContext->Statistics.ifHCInMulticastOctets);
358  break;
360  SETINFO(ul64, pContext->Statistics.ifHCInMulticastPkts);
361  break;
363  SETINFO(ul64, pContext->Statistics.ifHCInBroadcastOctets);
364  break;
366  SETINFO(ul64, pContext->Statistics.ifHCInBroadcastPkts);
367  break;
368  case OID_GEN_XMIT_OK:
369  SETINFO(ul64,
370  pContext->Statistics.ifHCOutUcastPkts +
371  pContext->Statistics.ifHCOutMulticastPkts +
372  pContext->Statistics.ifHCOutBroadcastPkts);
373  break;
374  case OID_GEN_RCV_OK:
375  SETINFO(ul64,
376  pContext->Statistics.ifHCInUcastPkts +
377  pContext->Statistics.ifHCInMulticastPkts +
378  pContext->Statistics.ifHCInBroadcastPkts);
379  DPrintf(4, ("[%s] Total frames %I64u", __FUNCTION__, u.ul64));
380  break;
381  case OID_GEN_XMIT_ERROR:
382  SETINFO(ul64, pContext->Statistics.ifOutErrors );
383  break;
384  case OID_GEN_RCV_ERROR:
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 ***********************************************************/
456 const char *ParaNdis_OidName(NDIS_OID oid)
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 /**********************************************************
557 Checker of valid size of provided wake-up patter
558 Return 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 /**********************************************************
582 Common 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 /**********************************************************
604 Common 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 /**********************************************************
625 Common 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 /**********************************************************
638 Dummy 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 /**********************************************************
659 Retrieves 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 }
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
NDIS_STATUS ParaNdis_OidQueryCommon(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:225
void ParaNdis_GetSupportedOid(PVOID *pOidsArray, PULONG pLength)
#define OID_GEN_PHYSICAL_MEDIUM
Definition: ntddndis.h:264
#define NDIS_STATUS_INVALID_OID
Definition: ndis.h:488
NDIS_STATUS ParaNdis_OnSetLookahead(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:640
NDIS_DEVICE_POWER_STATE MinPatternWakeUp
Definition: ntddndis.h:172
ASMGENDATA Table[]
Definition: genincdata.c:61
NDIS_STATUS ParaNdis_OidSetCopy(tOidDesc *pOid, PVOID pDest, ULONG ulSize)
Definition: ParaNdis-Oid.c:66
VOID ParaNdis_UpdateDeviceFilters(PARANDIS_ADAPTER *pContext)
const char * ParaNdis_OidName(NDIS_OID oid)
Definition: ParaNdis-Oid.c:456
#define OID_GEN_DIRECTED_BYTES_RCV
Definition: ntddndis.h:280
#define OID_GEN_VENDOR_DRIVER_VERSION
Definition: ntddndis.h:254
enum _NDIS_MEDIUM NDIS_MEDIUM
#define OID_OFFLOAD_ENCAPSULATION
Definition: ntddndis.h:390
struct _NDIS_PM_PACKET_PATTERN * PNDIS_PM_PACKET_PATTERN
#define NDIS_MAC_OPTION_8021Q_VLAN
Definition: ntddndis.h:436
static const BYTE us[]
Definition: encode.c:689
UINT InformationBufferLength
Definition: ParaNdis-Oid.h:43
#define OID_GEN_VLAN_ID
Definition: ntddndis.h:260
NDIS_STATUS ParaNdis_OnRemoveWakeupPattern(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:606
#define OID_GEN_RECEIVE_BUFFER_SPACE
Definition: ntddndis.h:241
#define OID_GEN_MEDIA_CAPABILITIES
Definition: ntddndis.h:263
ULONG64 ifHCOutMulticastPkts
Definition: ndis56common.h:278
NDIS_STATUS ParaNdis_SetMulticastList(PARANDIS_ADAPTER *pContext, PVOID Buffer, ULONG BufferSize, PUINT pBytesRead, PUINT pBytesNeeded)
#define OID_GEN_MAC_OPTIONS
Definition: ntddndis.h:251
#define NDIS_MAC_OPTION_8021P_PRIORITY
Definition: ndis.h:688
ULONG64 ifHCInBroadcastPkts
Definition: ndis56common.h:271
#define OID_GEN_RCV_ERROR
Definition: ntddndis.h:270
ULONG NDIS_OID
Definition: ntddndis.h:230
#define OID_TCP_OFFLOAD_PARAMETERS
Definition: ntddndis.h:386
#define OID_GEN_DIRECTED_FRAMES_XMIT
Definition: ntddndis.h:275
ULONG ulToDoFlags
Definition: ParaNdis-Oid.h:41
ULONG64 ifHCOutUcastPkts
Definition: ndis56common.h:276
#define OID_GEN_CURRENT_PACKET_FILTER
Definition: ntddndis.h:246
#define OID_GEN_RCV_CRC_ERROR
Definition: ntddndis.h:286
GLuint buffer
Definition: glext.h:5915
#define OID_GEN_HARDWARE_STATUS
Definition: ntddndis.h:234
#define OID_PNP_CAPABILITIES
Definition: ntddndis.h:360
PVOID InformationBuffer
Definition: ParaNdis-Oid.h:42
#define OID_GEN_MEDIA_IN_USE
Definition: ntddndis.h:236
#define OID_GEN_GET_NETCARD_TIME
Definition: ntddndis.h:289
#define OID_GEN_MULTICAST_FRAMES_RCV
Definition: ntddndis.h:283
#define NDIS_MAC_OPTION_NO_LOOPBACK
Definition: ndis.h:685
#define OID_802_3_XMIT_DEFERRED
Definition: ntddndis.h:310
#define SETINFO(field, value)
#define OID_GEN_MACHINE_NAME
Definition: ntddndis.h:258
int NDIS_STATUS
Definition: ntddndis.h:471
#define NDIS_STATUS_NOT_SUPPORTED
Definition: ndis.h:479
NDIS_STATISTICS_INFO Statistics
Definition: ndis56common.h:420
#define OID_GEN_PROTOCOL_OPTIONS
Definition: ntddndis.h:250
#define OID_GEN_BROADCAST_FRAMES_XMIT
Definition: ntddndis.h:279
VOID ParaNdis_DeviceFiltersUpdateVlanId(PARANDIS_ADAPTER *pContext)
#define OID_802_3_MAXIMUM_LIST_SIZE
Definition: ntddndis.h:305
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
void ParaNdis_FillPowerCapabilities(PNDIS_PNP_CAPABILITIES pCaps)
Definition: ParaNdis-Oid.c:138
#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND
Definition: ndis.h:684
#define OID_GEN_RESET_COUNTS
Definition: ntddndis.h:293
#define FALSE
Definition: types.h:117
#define NDIS_STATUS_BUFFER_TOO_SHORT
Definition: ndis.h:487
static BOOLEAN FORCEINLINE IsPrioritySupported(PARANDIS_ADAPTER *pContext)
Definition: ndis56common.h:547
#define __fallthrough
Definition: sal.h:2890
ULONG64 ifHCInMulticastOctets
Definition: ndis56common.h:270
#define OID_GEN_TRANSPORT_HEADER_OFFSET
Definition: ntddndis.h:257
#define OID_GEN_MEDIA_CONNECT_STATUS
Definition: ntddndis.h:252
#define OID_GEN_TRANSMIT_BUFFER_SPACE
Definition: ntddndis.h:240
#define OID_GEN_MAXIMUM_LOOKAHEAD
Definition: ntddndis.h:237
#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA
Definition: ndis.h:682
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
#define OID_GEN_RCV_OK
Definition: ntddndis.h:268
ULONG64 ifHCOutBroadcastOctets
Definition: ndis56common.h:281
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define OID_GEN_TRANSMIT_QUEUE_LENGTH
Definition: ntddndis.h:287
#define FORCEINLINE
Definition: ntbasedef.h:216
static BOOLEAN FORCEINLINE IsVlanSupported(PARANDIS_ADAPTER *pContext)
Definition: ndis56common.h:542
static UCHAR FORCEINLINE hexdigit(UCHAR nibble)
Definition: ParaNdis-Oid.c:38
ULONG64 ifHCInMulticastPkts
Definition: ndis56common.h:269
UCHAR CurrentMacAddress[ETH_LENGTH_OF_ADDRESS]
Definition: ndis56common.h:402
#define NDIS_STATUS_INVALID_DATA
Definition: ndis.h:486
void * PVOID
Definition: retypes.h:9
const char * name
Definition: ParaNdis-Oid.h:60
#define OID_GEN_GET_TIME_CAPS
Definition: ntddndis.h:288
#define OID_802_3_XMIT_HEARTBEAT_FAILURE
Definition: ntddndis.h:314
#define OID_GEN_SUPPORTED_LIST
Definition: ntddndis.h:233
#define OID_GEN_DEVICE_PROFILE
Definition: ntddndis.h:291
#define OID_GEN_VENDOR_ID
Definition: ntddndis.h:244
#define OID_GEN_VENDOR_DESCRIPTION
Definition: ntddndis.h:245
#define OID_GEN_XMIT_OK
Definition: ntddndis.h:267
#define OID_GEN_MAXIMUM_FRAME_SIZE
Definition: ntddndis.h:238
#define OID_IP4_OFFLOAD_STATS
Definition: ntddndis.h:381
#define OID_PNP_ADD_WAKE_UP_PATTERN
Definition: ntddndis.h:363
#define OID_GEN_MAXIMUM_TOTAL_SIZE
Definition: ntddndis.h:249
static NDIS_STATUS ValidateWakeupPattern(PNDIS_PM_PACKET_PATTERN p, PULONG pValidSize)
Definition: ParaNdis-Oid.c:560
NDIS_STATUS ParaNdis_OnSetVlanId(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:645
static const ULONG PARANDIS_PACKET_FILTERS
Definition: ndis56common.h:143
NDIS_STATUS ParaNdis_OnOidSetMulticastList(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:150
#define OID_802_3_XMIT_UNDERRUN
Definition: ntddndis.h:313
const GLubyte * c
Definition: glext.h:8905
#define OID_GEN_NETCARD_LOAD
Definition: ntddndis.h:290
#define OID_802_3_RCV_OVERRUN
Definition: ntddndis.h:312
#define MAKECASE(id)
#define OID_802_3_RCV_ERROR_ALIGNMENT
Definition: ntddndis.h:307
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
#define OID_GEN_DIRECTED_FRAMES_RCV
Definition: ntddndis.h:281
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
void ParaNdis_GetOidSupportRules(NDIS_OID oid, tOidWhatToDo *pRule, const tOidWhatToDo *Table)
Definition: ParaNdis-Oid.c:661
unsigned __int64 ULONG64
Definition: imports.h:198
unsigned char UCHAR
Definition: xmlstorage.h:181
ULONG64 u64
Definition: btrfs.h:15
NDIS_STATUS ParaNdis_OnEnableWakeup(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
Definition: ParaNdis-Oid.c:627
PUINT pBytesRead
Definition: ParaNdis-Oid.h:46
ULONG64 ifHCInBroadcastOctets
Definition: ndis56common.h:272
UCHAR MulticastList[ETH_LENGTH_OF_ADDRESS *PARANDIS_MULTICAST_LIST_SIZE]
Definition: ndis56common.h:332
ULONG64 ifHCInUcastOctets
Definition: ndis56common.h:268
#define OID_802_3_XMIT_ONE_COLLISION
Definition: ntddndis.h:308
PUINT pBytesNeeded
Definition: ParaNdis-Oid.h:45
#define OID_GEN_BROADCAST_BYTES_RCV
Definition: ntddndis.h:284
#define OID_GEN_MEDIA_SENSE_COUNTS
Definition: ntddndis.h:294
#define OID_GEN_BROADCAST_FRAMES_RCV
Definition: ntddndis.h:285
#define OID_GEN_LINK_SPEED
Definition: ntddndis.h:239
#define OID_TCP_TASK_OFFLOAD
Definition: ntddndis.h:373
NDIS_DEVICE_POWER_STATE MinLinkChangeWakeUp
Definition: ntddndis.h:173
#define OID_802_3_XMIT_MORE_COLLISIONS
Definition: ntddndis.h:309
#define OID_GEN_BROADCAST_BYTES_XMIT
Definition: ntddndis.h:278
#define OID_802_3_MULTICAST_LIST
Definition: ntddndis.h:304
ULONG64 ifHCOutBroadcastPkts
Definition: ndis56common.h:280
#define OID_PNP_REMOVE_WAKE_UP_PATTERN
Definition: ntddndis.h:364
#define OID_GEN_MAXIMUM_SEND_PACKETS
Definition: ntddndis.h:253
#define OID_GEN_MULTICAST_FRAMES_XMIT
Definition: ntddndis.h:277
#define OID_GEN_MULTICAST_BYTES_XMIT
Definition: ntddndis.h:276
#define OID_GEN_MEDIA_SUPPORTED
Definition: ntddndis.h:235
unsigned short USHORT
Definition: pedump.c:61
NDIS_STATUS ParaNdis_OidQueryCopy(tOidDesc *pOid, PVOID pInfo, ULONG ulSize, BOOLEAN bFreeInfo)
Definition: ParaNdis-Oid.c:178
#define OID_GEN_XMIT_ERROR
Definition: ntddndis.h:269
#define OID_802_3_MAC_OPTIONS
Definition: ntddndis.h:306
#define OID_GEN_TRANSMIT_BLOCK_SIZE
Definition: ntddndis.h:242
NDIS_OID Oid
Definition: ParaNdis-Oid.h:40
unsigned int * PULONG
Definition: retypes.h:1
#define ETH_LENGTH_OF_ADDRESS
Definition: efilter.h:16
unsigned int UINT
Definition: ndis.h:50
#define OID_PNP_SET_POWER
Definition: ntddndis.h:361
NDIS_DEVICE_POWER_STATE MinMagicPacketWakeUp
Definition: ntddndis.h:171
PUINT pBytesWritten
Definition: ParaNdis-Oid.h:44
#define OID_GEN_MULTICAST_BYTES_RCV
Definition: ntddndis.h:282
#define OID_GEN_RECEIVE_BLOCK_SIZE
Definition: ntddndis.h:243
#define NdisZeroMemory(Destination, Length)
Definition: ndis.h:3926
static const char VendorName[]
Definition: ParaNdis-Oid.c:36
tMaxPacketSize MaxPacketSize
Definition: ndis56common.h:398
#define OID_802_3_XMIT_MAX_COLLISIONS
Definition: ntddndis.h:311
#define OID_PNP_QUERY_POWER
Definition: ntddndis.h:362
NDIS_PM_WAKE_UP_CAPABILITIES WakeUpCapabilities
Definition: ntddndis.h:183
#define c
Definition: ke_i.h:80
unsigned int ULONG
Definition: retypes.h:1
#define OID_802_3_PERMANENT_ADDRESS
Definition: ntddndis.h:302
#define OID_802_3_CURRENT_ADDRESS
Definition: ntddndis.h:303
GLfloat GLfloat p
Definition: glext.h:8902
#define OID_802_3_XMIT_LATE_COLLISIONS
Definition: ntddndis.h:316
tMulticastData MulticastData
Definition: ndis56common.h:387
UCHAR PermanentMacAddress[ETH_LENGTH_OF_ADDRESS]
Definition: ndis56common.h:401
#define OID_IP6_OFFLOAD_STATS
Definition: ntddndis.h:382
#define NdisMoveMemory(Destination, Source, Length)
Definition: ndis.h:3896
ULONG64 ifHCOutUcastOctets
Definition: ndis56common.h:277
#define __FUNCTION__
Definition: types.h:112
#define OID_PNP_ENABLE_WAKE_UP
Definition: ntddndis.h:366
static SERVICE_STATUS status
Definition: service.c:31
#define NDIS_STATUS_BUFFER_OVERFLOW
Definition: ndis.h:464
#define OID_GEN_SUPPORTED_GUIDS
Definition: ntddndis.h:255
VOID EXPORT NdisFreeMemory(IN PVOID VirtualAddress, IN UINT Length, IN UINT MemoryFlags)
Definition: memory.c:110
#define OID_GEN_CURRENT_LOOKAHEAD
Definition: ntddndis.h:247
#define OID_GEN_DRIVER_VERSION
Definition: ntddndis.h:248
#define OID_802_3_XMIT_TIMES_CRS_LOST
Definition: ntddndis.h:315
#define OID_GEN_DIRECTED_BYTES_XMIT
Definition: ntddndis.h:274
#define OID_GEN_INIT_TIME_MS
Definition: ntddndis.h:292
#define OID_GEN_RCV_NO_BUFFER
Definition: ntddndis.h:271
ULONG64 ifHCOutMulticastOctets
Definition: ndis56common.h:279
#define PARANDIS_MULTICAST_LIST_SIZE
Definition: ndis56common.h:119
Definition: ps.c:97