Packet Sniffer SDK DLL Edition

HNUserFilter :: Methods :: BpfCompileToFastBPF

 Previous Next

Compiles BPF filter in a 32/64-bit optimized CPU code.

Syntax:

DWORD __stdcall BpfCompilesToFastBPF(HANDLE hFtr);

Parameters:

hFtr

[in] HNUserFilter object handle.

Return values:

HNERR_OKNo errors.
HNERR_MEM_ALLOC_ERRORThe memory for the FastBPF program is not allocated. This can happen because of insufficient system resources.

Description:

Use this function to compile BPF program in 32-bit CPU code.

BpfCheckFilter function is being executed while BpfCompileToFastBPF function execution to check BPF program before the compilation. If BpfCheckFilter fails an error code is returned.

See also:HNUserFilter, BpfCheckFilter, BpfGetUseFastBPF, BpfSetUseFastBPF