As a query, the OID_GEN_CURRENT_PACKET_FILTER OID reports the types of net packets that are in receive indications from a miniport driver.
As a set, the OID_GEN_CURRENT_PACKET_FILTER OID specifies the types of net packets for which a protocol receives indications from a miniport driver.
For NDIS 6.0 and later miniport drivers, the query is not requested and the set is mandatory. NDIS handles the query for miniport drivers. The miniport driver reports the packet filter information during initialization.
The miniport driver reports its medium type as one for which the system provides a filter library. The packet filter uses the OR operation to inclusively combine the following types:
A protocol driver can receive Ethernet (802.3) multicast packets by specifying the multicast or functional address packet type. Setting the multicast address list or functional address determines which multicast address groups the NIC driver enables.
For miniport adapters whose media type is NdisMedium802_3 or NdisMedium802_5, NDIS disables packet reception, along with multicast and functional addresses during a call to the NdisOpenAdapterEx function.
For miniport adapters with all other media types, the protocol driver can begin receiving packets at any time during the NdisOpenAdapterEx call. Note that the protocol can even receive packets before NdisOpenAdapterEx returns. In general, packet filtering is best effort, and protocol drivers must be prepared to handle receive indications even when the packet filter is zero.
For a query, NDIS returns the binding filters that are combined using the OR operator.
For a set, the specified packet filter replaces the previous packet filter for the binding. If the miniport driver previously enabled a packet type but the protocol driver does not specify that type in a new filter, the protocol driver will not receive packets of this type.
For miniport adapters whose media type is NdisMedium802_3 or NdisMedium802_5, if the miniport driver does not set a bit for a particular packet type in response to this query, the protocol driver will not receive packets of that type. Consequently, a protocol driver can disable packet reception by calling the NdisOidRequest or NdisCoOidRequest function using a filter of zero.
For miniport adapters with all other media types, NDIS does not check the packet type. For these media types, a protocol driver cannot disable packet reception by specifying a filter of zero.
When a miniport driver's MiniportInitializeEx function is called, the miniport driver's packet filter should be set to zero. When the packet filter is zero, receive indications are disabled. After a miniport driver's MiniportInitializeEx function has returned, a protocol driver can set OID_GEN_CURRENT_PACKET_FILTER to a nonzero value, thereby enabling the miniport driver to indicate received packets to that protocol.
If promiscuous mode is enabled with the NDIS_PACKET_TYPE_PROMISCUOUS bit, the protocol driver continues to receive packets even if the sending network node does not direct them to it. NDIS then sends the protocol driver all packets the NIC receives.
Setting a specific packet filter does not alter the packet filter for other protocol drivers that are bound to (or above) the same NIC. For example, if one bound protocol enables promiscuous mode, other bound protocol drivers do not receive packets that they have not specifically requested with their own packet filters.
Native 802.11 Packet Filters
The Native 802.11 miniport driver must only support the following standard packet filter types:
When enabled, these standard packet filters are only applicable to 802.11 data packets.
In addition, the Native 802.11 miniport driver must support the following packet filter types, which are specific to the Native 802.11 media:
An 802.11 media access control (MAC) protocol data unit (MPDU) frame, which contains all of the data in the format received by the 802.11 station. When this filter is set, the driver must indicate every unmodified MPDU fragment before it indicates the MAC service data unit (MSDU) packet reassembled from the MPDU fragments.
If an MPDU fragment is encrypted, it must not decrypt the fragment before it is indicated. However, the miniport driver must decrypt each MPDU fragment before reassembling and indicating the MSDU packet.
If enabled, this filter type only affects other standard packet filters, such as NDIS_PACKET_TYPE_DIRECTED or NDIS_PACKET_TYPE_BROADCAST.
For more information about the method for indicating raw 802.11 data packets, see Indicating Raw 802.11 Packets.
All multicast 802.11 management packets received by the 802.11 station, regardless of whether the destination address in the 802.11 MAC header is in the multicast address list.
An 802.11 MPDU management frame, which contains all of the data in the format received by the 802.11 station. When this filter is set, the driver must indicate every unmodified MPDU fragment before it indicates the MAC management protocol data unit (MMPDU) packet reassembled from the MPDU fragments.
If enabled, this filter type only affects other 802.11 management packet filters, such as NDIS_PACKET_TYPE_802_11_DIRECTED_MGMT or NDIS_PACKET_TYPE_802_11_MULTICAST_MGMT.
For more information about the method for indicating raw 802.11 management packets, see Indicating Raw 802.11 Packets.
If a miniport driver is operating in Native 802.11 Network Monitor (NetMon) or Extensible Access Point (AP) modes, the driver must enable the following packet filters through a set request of OID_GEN_CURRENT_PACKET_FILTER.
A miniport driver operating in other Native 802.11 modes besides NetMon must not enable these packet filter settings, with the exception of NDIS_PACKET_TYPE_802_11_PROMISCUOUS_CTRL. A miniport driver that is not operating in NetMon mode can optionally enable NDIS_PACKET_TYPE_802_11_PROMISCUOUS_CTRL through a set request of OID_GEN_CURRENT_PACKET_FILTER.
Note When the miniport driver is in Native 802.11 modes other than NetMon, and OID_GEN_CURRENT_PACKET_FILTER is set, the driver must not fail the set request if any promiscuous or raw filter settings are enabled in the OID data.
For more information about the NetMon and ExtAP operating modes, see the following topics:
|Ntddndis.h (include Ndis.h)