Packet Sniffer SDK DLL Edition

HNUserFilter :: Methods :: BpfCompileBPFDefinesFromStr

 Previous Next

Compiles constants definitions from an ASCIIZ string.

Syntax:

DWORD __stdcall BpfCompileBPFDefinesFromStr(HANDLE hFtr, LPCSTR Str);

Parameters:

hFtr

[in] HNUserFilter object handle.

Str

[in] Pointer to an ASCIIZ string containing constants definitions.

Return values:

HNERR_OKNo errors.
HNERR_ERRORErrors occured during the compilation. To track errors use OnBPFAsmError handler.

Description:

Compiles constants definitions from a file and loads them in a component for further using.

Constants compiled by this function can be reused in the programs compiled by the functions BpfCompileBPFAsmFromFile and BpfCompileBPFAsmFromStr.

#define <definition>

<definition> can be a number, a simple arithmetic expression, or a constant defined previously. Each definition should be written in a separate line.

See also:HNUserFilter, OnBPFAsmError, BPF instructions, BPF Assembler