NDIS_RECEIVE_FILTER_FIELD_PARAMETERS structure (ntddndis.h)
The NDIS_RECEIVE_FILTER_FIELD_PARAMETERS structure specifies the filter test criterion for a field in a network packet header.
NDIS receive filters are used in the following NDIS interfaces:
-
NDIS Packet Coalescing. For more information about how to use receive filters in this interface, see Managing Packet Coalescing Receive Filters.
-
Single Root I/O Virtualization (SR-IOV). For more information about how to use receive filters in this interface, see Setting a Receive Filter on a Virtual Port.
-
Virtual Machine Queue (VMQ). For more information about how to use receive filters in this interface, see Setting and Clearing VMQ Filters.
Syntax
typedef struct _NDIS_RECEIVE_FILTER_FIELD_PARAMETERS {
NDIS_OBJECT_HEADER Header;
ULONG Flags;
NDIS_FRAME_HEADER FrameHeader;
NDIS_RECEIVE_FILTER_TEST ReceiveFilterTest;
union {
NDIS_MAC_HEADER_FIELD MacHeaderField;
NDIS_ARP_HEADER_FIELD ArpHeaderField;
NDIS_IPV4_HEADER_FIELD IPv4HeaderField;
NDIS_IPV6_HEADER_FIELD IPv6HeaderField;
NDIS_UDP_HEADER_FIELD UdpHeaderField;
} HeaderField;
_HEADER_FIELD _HEADER_FIELD;
union {
UCHAR FieldByteValue;
USHORT FieldShortValue;
ULONG FieldLongValue;
ULONG64 FieldLong64Value;
UCHAR FieldByteArrayValue[16];
} FieldValue;
_FIELD_VALUE _FIELD_VALUE;
union {
UCHAR ResultByteValue;
USHORT ResultShortValue;
ULONG ResultLongValue;
ULONG64 ResultLong64Value;
UCHAR ResultByteArrayValue[16];
} ResultValue;
_RESULT_VALUE _RESULT_VALUE;
} NDIS_RECEIVE_FILTER_FIELD_PARAMETERS, *PNDIS_RECEIVE_FILTER_FIELD_PARAMETERS;
Members
Header
The NDIS_OBJECT_HEADER structure for the NDIS_RECEIVE_FILTER_FIELD_PARAMETERS structure. The driver sets the Type member of the structure that Header specifies to NDIS_OBJECT_TYPE_DEFAULT.
To indicate the version of the NDIS_RECEIVE_FILTER_FIELD_PARAMETERS structure, the driver sets the Revision member to one of the following values:
Flags
A bitwise OR of flags. The following flags are valid for the OID_RECEIVE_FILTER_SET_FILTER OID.
Value | Meaning |
---|---|
|
If this flag is set, the network adapter must only indicate received packets that pass the following criteria:
Note If an overlying driver sets a MAC address filter and a VLAN identifier filter with an
OID request of OID_RECEIVE_FILTER_SET_FILTER, it does not set this flag in either of the filter fields. In this
case, the miniport driver should indicate packets that match both the specified MAC address and the
VLAN identifier. That is, the miniport driver should not indicate packets with a matching MAC address
that have a zero VLAN identifier or are untagged packets.
|
FrameHeader
The type of header in the network data frame.
ReceiveFilterTest
The type of test to perform for the receive filter.
HeaderField
The type of field in a header. The field type (for example, NDIS_MAC_HEADER_FIELD) corresponds to the type of header that is specified in the FrameHeader member.
This union contains the following members:
HeaderField.MacHeaderField
The type of field in a MAC header.
HeaderField.ArpHeaderField
The type of field in an Address Resolution Protocol (ARP) header.
HeaderField.IPv4HeaderField
An NDIS_IPV4_HEADER_FIELD enumeration value that specifies the type of field in an IP version 4 (IPv4) header.
HeaderField.IPv6HeaderField
An NDIS_IPV6_HEADER_FIELD enumeration value that specifies the type of field in an IP version 6 (IPv6) header.
HeaderField.UdpHeaderField
The type of field in a User Datagram Protocol (UDP) header.
_HEADER_FIELD
FieldValue
The value that the miniport adapter compares to the corresponding header field value in incoming packets. The location of the header field value is determined by the field type that is specified in the HeaderField member.
For more information, see the Remarks section.
This union contains the following members:
FieldValue.FieldByteValue
A UCHAR value to compare with a field in a network packet.
FieldValue.FieldShortValue
A USHORT value to compare with a field in a network packet.
FieldValue.FieldLongValue
A ULONG value to compare with a field in a network packet.
FieldValue.FieldLong64Value
A ULONG64 value to compare with a field in a network packet.
FieldValue.FieldByteArrayValue[16]
A UCHAR array to compare with a field in a network packet.
_FIELD_VALUE
ResultValue
A union that contains a test result value.
If the ReceiveFilterTest member is set to NdisReceiveFilterTestMaskEqual, the network adapter first calculates a result from the value in the FieldValue member and the header field value as specified by the HeaderField member. The adapter then compares the calculated result with ResultValue.
For more information, see the Remarks section.
This union contains the following members:
ResultValue.ResultByteValue
A UCHAR value to compare with a test result.
ResultValue.ResultShortValue
A USHORT value to compare with a test result.
ResultValue.ResultLongValue
A ULONG value to compare with a test result.
ResultValue.ResultLong64Value
A ULONG64 value to compare with a test result.
ResultValue.ResultByteArrayValue[16]
A UCHAR array to compare with a test result.
_RESULT_VALUE
Remarks
The NDIS_RECEIVE_FILTER_FIELD_PARAMETERS structure specifies the filter test criterion for one field in a possible array of field tests that can be specified with the NDIS_RECEIVE_FILTER_PARAMETERS structure.
The following table describes how the network adapter uses the ReceiveFilterTest, FieldValue, and ResultValue members to perform a filter test on the specified header field value of a received packet.
ReceiveFilterTest value | Filter test performed by network adapter |
---|---|
NdisReceiveFilterTestEqual | (<header field value> == FieldValue) |
NdisReceiveFilterTestMaskEqual | ((<header field value> & FieldValue) == ResultValue) |
NdisReceiveFilterTestNotEqual | (<header field value> != FieldValue) |
- For NDIS 6.20, the miniport driver must return a failed status for the OID request of OID_RECEIVE_FILTER_SET_FILTER.
-
Starting with NDIS 6.30, if the NDIS_RECEIVE_FILTER_FIELD_MAC_HEADER_VLAN_UNTAGGED_OR_ZERO flag is not set and there is no VLAN identifier filter configured by the OID_RECEIVE_FILTER_SET_FILTER method request, the miniport driver must do either one of the following:
- The miniport driver must return a failed status for the OID_RECEIVE_FILTER_SET_FILTER method request.
- The miniport driver must configure the network adapter to inspect and filter the specified MAC address fields. If a VLAN tag is present in the received packet, the network adapter must remove it from the packet data. The miniport driver must put the VLAN tag in an NDIS_NET_BUFFER_LIST_8021Q_INFO that is associated with the packet's NET_BUFFER_LIST structure.
-
The miniport driver must configure the network adapter to inspect and filter the specified MAC address and VLAN identifier fields.
If a VLAN tag is present in the received packet, the network adapter must remove it from the packet data. The miniport driver must put the VLAN tag in an NDIS_NET_BUFFER_LIST_8021Q_INFO that is associated with the packet's NET_BUFFER_LIST structure.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported in NDIS 6.20 and later. |
Header | ntddndis.h (include Ndis.h) |
See also
NDIS_RECEIVE_FILTER_PARAMETERSFeedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for