BOOL __stdcall GetHwPacketFilter (HANDLE hOpen, HANDLE hAdapter, PDWORD pFilter);
TRUE if call was successful, FALSE otherwise
Specifies driver object open handle.
Specifies adapter handle.
Specifies pointer to the user allocated variable to save current hardware packet filter.
This function gets a hardware filter on the incoming packets. The constants that define the filters are declared in the file ntddndis.h. The input parameters are the adapter on which the filter must be defined, and the pointer to the variable to save current filter. Here is a list of the most useful filters:
- NDIS_PACKET_TYPE_PROMISCUOUS: sets the promiscuous mode. Every incoming packet is accepted by the adapter.
- NDIS_PACKET_TYPE_DIRECTED: only packets directed to the workstation’s adapter are accepted.
- NDIS_PACKET_TYPE_BROADCAST: only the broadcast packets are accepted.
- NDIS_PACKET_TYPE_MULTICAST: only the multicast packets belonging to the groups of which this adapter is a member are accepted.
- NDIS_PACKET_TYPE_ALL_MULTICAST: every multicast packet is accepted.
- NDIS_PACKET_TYPE_ALL_LOCAL: all local packets, i.e. NDIS_PACKET_TYPE_DIRECTED + NDIS_PACKET_TYPE_BROADCAST + NDIS_PACKET_TYPE_MULTICAST
This function is C-style wrapper for CNdisApi::GetHwPacketFilter