Packet Sniffer SDK DLL Edition
HNUserFilter :: Methods :: BpfCheckPacket | | Previous Next |
Checks the packet by the user-settable packet filtering program.
Syntax:
DWORD __stdcall BpfCheckPacket(HANDLE hFtr, LPVOID pPacket, DWORD PacketSize);
Parameters:
hFtr
pPacket
[in] A pointer to the packet.
PacketSize
[in] The packet size.
Return values:
The function returns the values, defined in the BPF program within the BPF_RET instruction, or 0 in case
of the wrong instruction.
Description:
Use the BpfCheckPacket function to test your user-settable packet filtering program.
Do the following:
- load (or generate) the packet into memory;
- call the BpfCheckPacket function, passing the packet address and size to it.
Use BpfCheckFilter function to check the user-settable packet filtering
program accuracy.