Partager via


OID_GEN_CURRENT_PACKET_FILTER (Compact 2013)

3/26/2014

As a query, this OID reports the types of net packets that are in receive indications from a miniport driver.

As a set, this OID specifies the types of net packets for which a protocol receives indications from a miniport driver.

Remarks

For NDIS 6.0 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:

  • NDIS_PACKET_TYPE_DIRECTED
    Directed packets. Directed packets contain a destination address equal to the station address of the network adapter.
  • NDIS_PACKET_TYPE_MULTICAST
    Multicast address packets sent to addresses in the multicast address list.

    A protocol driver can receive Ethernet (802.3) multicast packets or Token Ring (802.5) functional address packets by specifying the multicast or functional address packet type. Setting the multicast address list or functional address determines which multicast address groups the network adapter driver enables.

  • NDIS_PACKET_TYPE_ALL_MULTICAST
    All multicast address packets, not only the ones enumerated in the multicast address list.
  • NDIS_PACKET_TYPE_BROADCAST
    Broadcast packets.
  • NDIS_PACKET_TYPE_PROMISCUOUS
    Specifies all packets.
  • NDIS_PACKET_TYPE_ALL_FUNCTIONAL
    All functional address packets, not only the ones in the current functional address.
  • NDIS_PACKET_TYPE_ALL_LOCAL
    All packets sent by installed protocols and all packets indicated by the network adapter that is identified by a given NdisBindingHandle.
  • NDIS_PACKET_TYPE_FUNCTIONAL
    Functional address packets sent to addresses included in the current functional address.
  • NDIS_PACKET_TYPE_GROUP
    Packets sent to the current group address.
  • NDIS_PACKET_TYPE_MAC_FRAME
    Network adapter driver frames that a Token Ring network adapter receives.
  • NDIS_PACKET_TYPE_SMT
    SMT packets that an FDDI network adapter receives.
  • NDIS_PACKET_TYPE_SOURCE_ROUTING
    All source routing packets. If the protocol driver sets this bit, the NDIS library attempts to act as a source routing bridge.

During a call to the NdisOpenAdapterEx function, NDIS disables packet reception, together with multicast and functional addresses.

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.

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. Therefore, a protocol driver can disable packet reception by calling the NdisOidRequest or NdisCoOidRequest function by using 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 network adapter receives.

Setting a specific packet filter does not alter the packet filter for other protocol drivers that are bound to (or above) the same network adapter. 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:

  • NDIS_PACKET_TYPE_DIRECTED
  • NDIS_PACKET_TYPE_MULTICAST
  • NDIS_PACKET_TYPE_BROADCAST
  • NDIS_PACKET_TYPE_PROMISCUOUS

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:

  • NDIS_PACKET_TYPE_802_11_RAW_DATA
    An 802.11 media access control (MAC) protocol data unit (MPDU) frame, which contains all 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 it is enabled, this filter type only affects other standard packet filters, such as NDIS_PACKET_TYPE_DIRECTED or NDIS_PACKET_TYPE_BROADCAST.

  • NDIS_PACKET_TYPE_802_11_DIRECTED_MGMT
    Directed 802.11 management packets. Directed packets contain a destination address equal to the station address of the network adapter.
  • NDIS_PACKET_TYPE_802_11_MULTICAST_MGMT
    Multicast 802.11 management packets sent to addresses in the multicast address list.
  • NDIS_PACKET_TYPE_802_11_ALL_MULTICAST_MGMT
    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.
  • NDIS_PACKET_TYPE_802_11_BROADCAST_MGMT
    Broadcast 802.11 management packets received by the 802.11 station.
  • NDIS_PACKET_TYPE_802_11_PROMISCUOUS_MGMT
    All 802.11 management packets received by the 802.11 station.
  • NDIS_PACKET_TYPE_802_11_RAW_MGMT
    An 802.11 MPDU management frame, which contains all 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 it is 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.

  • NDIS_PACKET_TYPE_802_11_DIRECTED_CTRL
    Directed 802.11 control packets. Directed packets contain a destination address equal to the station address of the network adapter.
  • NDIS_PACKET_TYPE_802_11_BROADCAST_CTRL
    Broadcast 802.11 control packets received by the 802.11 station.
  • NDIS_PACKET_TYPE_802_11_PROMISCUOUS_CTRL
    All 802.11 control packets received by the 802.11 station.

If a miniport driver is operating in Native 802.11 Network Monitor (NetMon) mode, the driver must enable the following packet filters through a set request of OID_GEN_CURRENT_PACKET_FILTER.

  • NDIS_PACKET_TYPE_PROMISCUOUS
  • NDIS_PACKET_TYPE_802_11_RAW_DATA
  • NDIS_PACKET_TYPE_802_11_PROMISCUOUS_MGMT
  • NDIS_PACKET_TYPE_802_11_RAW_MGMT
  • NDIS_PACKET_TYPE_802_11_PROMISCUOUS_CTRL

A miniport driver operating in other Native 802.11 modes besides NetMon must not enable these packet filter settings, except NDIS_PACKET_TYPE_802_11_PROMISCUOUS_CTRL. A miniport driver that is not operating in NetMon mode can also 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.

Requirements

Header

ntddndis.h

See Also

Reference

General Operational OIDs
MiniportInitializeEx
NdisOidRequest
NdisOpenAdapterEx