31#ifdef WPP_EVENT_TRACING
32#include "ParaNdis-Oid.tmh"
41 c += (
c <= 9) ? 0 : 7;
210 if (bFreeInfo && pInfo)
239#if defined(_MSC_VER) && !defined(__clang__)
240 #define CONCATFIELD(object, field) object.##field
242 #define CONCATFIELD(object, field) object.field
244#define SETINFO(field, value) pInfo = CONCATFIELD(&u, field); ulSize = sizeof(CONCATFIELD(u, field)); CONCATFIELD(u, field) = (value)
291 SETINFO(ul, (NDIS_MINIPORT_MAJOR_VERSION << 16) | NDIS_MINIPORT_MINOR_VERSION);
298 SETINFO(
us, ((NDIS_MINIPORT_MAJOR_VERSION << 8) | NDIS_MINIPORT_MINOR_VERSION));
420 ulSize =
sizeof(
u.PMCaps);
459#define MAKECASE(id) case id: return #id;
546 for (
i = 0;
i < 8; ++
i)
548 UCHAR nibble = (
UCHAR)((oid >> (28 -
i * 4)) & 0xf);
564 if (*pValidSize <
sizeof(*
p))
566 *pValidSize =
sizeof(*p);
570 ULONG ul =
p->PatternOffset +
p->PatternSize;
573 DPrintf(2, (
"[%s] pattern of %d at %d, mask %d (%s)",
651 pContext->
VlanId &= 0xfff;
663 static const tOidWhatToDo defaultRule = { 0, 0, 0, 0, 0,
NULL,
"Unknown OID" };
665 *pRule = defaultRule;
NDIS_STATUS ParaNdis_OidQueryCopy(tOidDesc *pOid, PVOID pInfo, ULONG ulSize, BOOLEAN bFreeInfo)
NDIS_STATUS ParaNdis_OidQueryCommon(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
const char * ParaNdis_OidName(NDIS_OID oid)
NDIS_STATUS ParaNdis_OnAddWakeupPattern(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
NDIS_STATUS ParaNdis_OnSetPacketFilter(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
NDIS_STATUS ParaNdis_OidSetCopy(tOidDesc *pOid, PVOID pDest, ULONG ulSize)
NDIS_STATUS ParaNdis_OnOidSetMulticastList(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
static UCHAR FORCEINLINE hexdigit(UCHAR nibble)
NDIS_STATUS ParaNdis_OnEnableWakeup(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
void ParaNdis_FillPowerCapabilities(PNDIS_PNP_CAPABILITIES pCaps)
NDIS_STATUS ParaNdis_OnRemoveWakeupPattern(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
NDIS_STATUS ParaNdis_OnSetLookahead(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
#define SETINFO(field, value)
void ParaNdis_GetOidSupportRules(NDIS_OID oid, tOidWhatToDo *pRule, const tOidWhatToDo *Table)
NDIS_STATUS ParaNdis_OnSetVlanId(PARANDIS_ADAPTER *pContext, tOidDesc *pOid)
static NDIS_STATUS ValidateWakeupPattern(PNDIS_PM_PACKET_PATTERN p, PULONG pValidSize)
static const char VendorName[]
void ParaNdis_GetSupportedOid(PVOID *pOidsArray, PULONG pLength)
#define DPrintf(Level, Fmt)
VOID EXPORT NdisFreeMemory(IN PVOID VirtualAddress, IN UINT Length, IN UINT MemoryFlags)
#define ETH_LENGTH_OF_ADDRESS
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
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
static BOOLEAN FORCEINLINE IsPrioritySupported(PARANDIS_ADAPTER *pContext)
static BOOLEAN FORCEINLINE IsVlanSupported(PARANDIS_ADAPTER *pContext)
#define PARANDIS_MULTICAST_LIST_SIZE
VOID ParaNdis_UpdateDeviceFilters(PARANDIS_ADAPTER *pContext)
VOID ParaNdis_DeviceFiltersUpdateVlanId(PARANDIS_ADAPTER *pContext)
static const ULONG PARANDIS_PACKET_FILTERS
NDIS_STATUS ParaNdis_SetMulticastList(PARANDIS_ADAPTER *pContext, PVOID Buffer, ULONG BufferSize, PUINT pBytesRead, PUINT pBytesNeeded)
#define NdisZeroMemory(Destination, Length)
#define NDIS_STATUS_INVALID_DATA
#define NDIS_STATUS_NOT_SUPPORTED
#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND
#define NDIS_STATUS_INVALID_OID
#define NDIS_STATUS_SUCCESS
#define NDIS_STATUS_BUFFER_TOO_SHORT
#define NDIS_STATUS_BUFFER_OVERFLOW
#define NDIS_MAC_OPTION_NO_LOOPBACK
#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA
#define NDIS_MAC_OPTION_8021P_PRIORITY
#define NdisMoveMemory(Destination, Source, Length)
#define OID_GEN_MULTICAST_FRAMES_XMIT
#define OID_IP4_OFFLOAD_STATS
enum _NDIS_MEDIUM NDIS_MEDIUM
#define OID_GEN_TRANSMIT_BLOCK_SIZE
#define OID_GEN_DIRECTED_BYTES_RCV
#define OID_GEN_PROTOCOL_OPTIONS
#define OID_GEN_DIRECTED_FRAMES_XMIT
#define OID_GEN_MAXIMUM_TOTAL_SIZE
#define OID_GEN_BROADCAST_BYTES_XMIT
#define OID_GEN_XMIT_ERROR
#define OID_GEN_VENDOR_DRIVER_VERSION
#define OID_802_3_PERMANENT_ADDRESS
#define OID_GEN_LINK_SPEED
#define OID_GEN_VENDOR_ID
#define OID_802_3_RCV_OVERRUN
#define OID_GEN_CURRENT_PACKET_FILTER
@ NdisMediaStateConnected
@ NdisMediaStateDisconnected
#define OID_GEN_RCV_NO_BUFFER
#define OID_PNP_SET_POWER
#define OID_802_3_XMIT_HEARTBEAT_FAILURE
#define OID_GEN_PHYSICAL_MEDIUM
#define OID_802_3_XMIT_ONE_COLLISION
#define OID_802_3_XMIT_MORE_COLLISIONS
#define OID_GEN_NETCARD_LOAD
#define OID_802_3_XMIT_MAX_COLLISIONS
#define OID_GEN_RECEIVE_BUFFER_SPACE
#define OID_802_3_XMIT_TIMES_CRS_LOST
#define OID_802_3_MAXIMUM_LIST_SIZE
#define OID_GEN_TRANSPORT_HEADER_OFFSET
#define OID_GEN_INIT_TIME_MS
#define OID_GEN_DRIVER_VERSION
#define OID_GEN_DEVICE_PROFILE
#define OID_802_3_XMIT_UNDERRUN
#define OID_802_3_XMIT_LATE_COLLISIONS
#define OID_802_3_MAC_OPTIONS
#define OID_802_3_CURRENT_ADDRESS
#define OID_GEN_RESET_COUNTS
#define OID_GEN_GET_TIME_CAPS
#define OID_TCP_OFFLOAD_PARAMETERS
#define OID_802_3_MULTICAST_LIST
#define OID_GEN_SUPPORTED_GUIDS
#define OID_GEN_DIRECTED_FRAMES_RCV
#define OID_PNP_ENABLE_WAKE_UP
#define OID_GEN_TRANSMIT_BUFFER_SPACE
#define OID_GEN_MEDIA_SUPPORTED
#define OID_GEN_BROADCAST_FRAMES_XMIT
#define OID_GEN_BROADCAST_FRAMES_RCV
#define OID_PNP_ADD_WAKE_UP_PATTERN
#define OID_GEN_MAXIMUM_FRAME_SIZE
#define OID_GEN_MEDIA_CAPABILITIES
#define OID_GEN_RCV_CRC_ERROR
#define NDIS_MAC_OPTION_8021Q_VLAN
#define OID_GEN_MEDIA_IN_USE
#define OID_GEN_MEDIA_CONNECT_STATUS
#define OID_GEN_DIRECTED_BYTES_XMIT
#define OID_GEN_MAXIMUM_LOOKAHEAD
#define OID_GEN_BROADCAST_BYTES_RCV
#define OID_802_3_RCV_ERROR_ALIGNMENT
#define OID_PNP_QUERY_POWER
#define OID_GEN_RCV_ERROR
@ NdisHardwareStatusReady
#define OID_PNP_REMOVE_WAKE_UP_PATTERN
#define OID_PNP_CAPABILITIES
#define OID_TCP_TASK_OFFLOAD
#define OID_GEN_CURRENT_LOOKAHEAD
#define OID_GEN_MAC_OPTIONS
#define OID_GEN_VENDOR_DESCRIPTION
#define OID_IP6_OFFLOAD_STATS
#define OID_GEN_SUPPORTED_LIST
@ NdisDeviceStateUnspecified
#define OID_GEN_MULTICAST_BYTES_XMIT
#define OID_GEN_MULTICAST_BYTES_RCV
#define OID_GEN_GET_NETCARD_TIME
#define OID_802_3_XMIT_DEFERRED
#define OID_GEN_RECEIVE_BLOCK_SIZE
#define OID_GEN_MAXIMUM_SEND_PACKETS
#define OID_OFFLOAD_ENCAPSULATION
#define OID_GEN_TRANSMIT_QUEUE_LENGTH
#define OID_GEN_HARDWARE_STATUS
#define OID_GEN_MACHINE_NAME
#define OID_GEN_MEDIA_SENSE_COUNTS
#define OID_GEN_MULTICAST_FRAMES_RCV
struct _NDIS_PM_PACKET_PATTERN * PNDIS_PM_PACKET_PATTERN
NDIS_DEVICE_POWER_STATE MinMagicPacketWakeUp
NDIS_DEVICE_POWER_STATE MinPatternWakeUp
NDIS_DEVICE_POWER_STATE MinLinkChangeWakeUp
NDIS_PM_WAKE_UP_CAPABILITIES WakeUpCapabilities
ULONG nofMulticastEntries
UCHAR MulticastList[ETH_LENGTH_OF_ADDRESS *PARANDIS_MULTICAST_LIST_SIZE]
ULONG64 ifHCOutMulticastPkts
ULONG64 ifHCInBroadcastPkts
ULONG64 ifHCOutMulticastOctets
ULONG64 ifHCOutBroadcastOctets
ULONG64 ifHCInMulticastOctets
ULONG64 ifHCInMulticastPkts
ULONG64 ifHCInUcastOctets
ULONG64 ifHCOutUcastOctets
ULONG64 ifHCOutBroadcastPkts
ULONG64 ifHCInBroadcastOctets
UINT InformationBufferLength
tMulticastData MulticastData
NDIS_STATISTICS_INFO Statistics
UINT nofFreeTxDescriptors
UINT NetMaxReceiveBuffers
UCHAR CurrentMacAddress[ETH_LENGTH_OF_ADDRESS]
UCHAR PermanentMacAddress[ETH_LENGTH_OF_ADDRESS]
tMaxPacketSize MaxPacketSize
UINT maxFreeTxDescriptors