Packet Sniffer SDK DLL Edition

HNLBAdapter :: Properties :: LbAdpSetReceiveQueue

 Previous Next

Sets the handle of HNQueue object.

Syntax:

HANDLE __stdcall LbAdpSetReceiveQueue(HANDLE hLbAdp, HANDLE hQue);

Parameters:

hLbAdp

[in] HNLBAdapter object handle.

hQue

[in] HNQueue object handle.

Return values:

If the function succeeds the return value will be the HNQueue handle, otherwise the returned value will be NULL.

Description:

Use LbAdpSetReceiveQueue to set the received packets queue.

If ReceiveQueue property was not set to NULL before the opening of the loopback adapter, then traffic processing will be executed by HNQueue component, otherwise a standard OnPacketReceive event handler will be called.

ReceiveQueue property may be used in the Ethernet emulation mode only (see HNLBAdapter.EthEmulation[Get/Set]).

To set packets queue for the network adapter, please do the following:

...
QueSetMaxPacketSize(hQue,1514);
QueSetItemsCount(hQue,50000);
QueAllocItems(hQue);
LbAdpSetReceiveQueue(hLbAdp,hQue);
...
LbAdpOpenAdapter(hLbAdp);
...
LbAdpCloseAdapter(hLbAdp);
...
QueFreeItems(hQue);
See also:HNLBAdapter, HNQueue, OnPacketReceive, LbAdpGetReceiveQueue