BOOL CNdisApi::SetHwPacketFilter ( HANDLE hAdapter, DWORD Filter );
TRUE if call was successful, FALSE otherwise
Specifies adapter handle.
Specifies hardware filter value.
This function sets 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 identifier of the 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