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.
- Windows Vista and later versions of Windows
- Windows XP
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:
Directed packets. Directed packets contain a destination address equal to the station address of the NIC.
Multicast address packets sent to addresses in the multicast address list.
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.
All multicast address packets, not just the ones enumerated in the multicast address list.
Specifies all packets regardless of whether VLAN filtering is enabled or not and whether the VLAN identifier matches or not.
All functional address packets, not just the ones in the current functional address.
All packets sent by installed protocols and all packets indicated by the NIC that is identified by a given NdisBindingHandle .
Functional address packets sent to addresses included in the current functional address.
Packets sent to the current group address.
NIC driver frames that a Token Ring NIC receives.
SMT packets that an FDDI NIC receives.
All source routing packets. If the protocol driver sets this bit, the NDIS library attempts to act as a source routing bridge.
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.
Directed 802.11 management packets. Directed packets contain a destination address equal to the station address of the NIC.
Multicast 802.11 management packets sent to addresses in the multicast address list.
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.
Broadcast 802.11 management packets received by the 802.11 station.
All 802.11 management packets received by the 802.11 station.
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.
Directed 802.11 control packets. Directed packets contain a destination address equal to the station address of the NIC.
Broadcast 802.11 control packets received by the 802.11 station.
All 802.11 control packets received by the 802.11 station.
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: