Packet Sniffer SDK DLL Edition

HNUserFilter :: Properties :: BpfGetErrInstruction

 Previous Next

Returns the number of the first erroneous instruction in the user-settable packet filtering program.

Syntax:

DWORD __stdcall BpfGetErrInstruction(HANDLE hFtr);

Parameters:

hFtr

[in] HNUserFilter object handle.

Return values:

If the function succeeds the return value will be the number of the first erroneous instruction in the user-settable packet filtering program, otherwise it returns -1.

Description:

If BpfCheckFilter function returns error code (HNERR_WRONG_INSTRUCTION, HNERR_JMP_TO_LONG, or HNERR_WORK_MEM, HNERR_NO_RET), then BpfGetErrInstruction function returns the first erroneous instruction number (from 0 to InstructionsCount[Get] - 1.).

See also:HNUserFilter, BpfGetInstructionsCount, BpfCheckFilter