Packet Sniffer SDK DLL Edition

HNUserFilter :: Methods :: BpfSaveToMemory

 Previous Next

Saves the BPF program to memory.

Syntax:

DWORD __stdcall BpfSaveToMemory(HANDLE hFtr, HN_BPF_PROGRAMM *pProgramm, DWORD Size);

Parameters:

hFtr

[in] HNUserFilter object handle.

pProgramm

[in] A pointer to the memory block, which the BPF program, described by the HN_BPF_PROGRAMM structure must be saved in.

Size

[in] The memory block size.

Return values:

HNERR_OKNo errors.
HNERR_ADDR_ERRAn address access error (the wrong pProgramm parameter).
HNERR_BUFFER_TOO_SMALLThe memory buffer is too small.
HNERR_INVALID_HANDLEhFtr parameter is not the HNUserFilter object handle.

Description:

Use the BpfSaveToMemory function to save the BPF program to memory in the HN_BPF_PROGRAMM structure format. After it has been saved, you can analyze and change it.

See also:HNUserFilter, HN_BPF_PROGRAMM, BpfLoadFromMemory