Packet Sniffer SDK DLL Edition

HNUserFilter :: Methods :: BpfDecompileBPFAsmToFile

 Previous Next

Decompiles BPF program into BPF assembler source and saves it in a file.

Syntax:

DWORD __stdcall BpfDecompileBPFAsmToFile(HANDLE hFtr, LPCTSTR FileName, BOOL StrLabels);

Parameters:

hFtr

[in] HNUserFilter object handle.

FileName

[in] The name of a file in which source text will be saved to.

StrLabels

[in] Flag sets that all offsets in JMP commands must be marked as labels (TRUE) or offsets (FALSE).

Return values:

HNERR_OKNo errors.
HNERR_SAVE_FILE_ERRORCannot write to a file.

Description:

This function decompiles the current HNUserFilter component BPF program to a program in BPF assembler language and saves it in the predefined file. This program can be compiled again and reused for traffic filtering later.

Requirements:

Unicode

Implemented as BpfDecompileBPFAsmToFileW (Unicode) and BpfDecompileBPFAsmToFileA (ANSI).

See also:HNUserFilter, BPF instructions, BPF Assembler