Packet Sniffer SDK DLL Edition

HNLBAdapter :: Methods :: LbAdpOpenAdapter

 Previous Next

Opens loopback adapter for TCP/UDP traffic capturing and tracking of TCP sessions.

Syntax:

DWORD __stdcall LbAdpOpenAdapter(HANDLE hLbAdp);

Parameters:

hLbAdp

[in] HNLBAdapter object handle.

Return values:

HNERR_OKLoopback adapter opening has been completed successfully.
HNERR_MEM_ALLOC_ERRORMemory for traffic processing is not allocated. This error may occur in case of insufficient system resources.
HNERR_ADAPTER_THREAD_ERRPSSDK internal thread creating error.
HNERR_TOO_BIG_PACKETS_POOLPackets pool size set in the LbAdpSetPacketPool property is too big for this system.

Description:

Use LbAdpOpenAdapter to open the loopback adapter. After this function has been executed successfully you can capture the traffic which the localhost is participating in, using the OnTcpPacketReceive and OnUdpPacketReceive event handlers and track opening/closing of TCP sessions by OnConnect and OnDisconnect event handlers.

See also:HNLBAdapter, OnTcpPacketReceive, OnUdpPacketReceive, OnConnect, OnDisconnect