Link to home
Start Free TrialLog in
Avatar of teltel
teltel

asked on

Determine if send/receive queue is full (Data-link layer).

Hi experts,

I'm writing a Win32 program to send ARP requests and receive replys in two threads.
The question is that i need to send so many ARPs (to all subnet IPs) so the send/receive queues may be full.
The consequence is that some of the ARPs are push out of the queue.
Currently my temp solution is to sleep 5 ms each time an ARP is sent so the send queue won't get full.

My question is to find a way to detect the status (if its full) of both send/receive queues?


Many thanks,

Polo Wang
ASKER CERTIFIED SOLUTION
Avatar of grg99
grg99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would recommend to change to TCP/IP. Though it is slower it guarantees all packets to be sent/received in the correct order. If you couldn't change, at the receiver site you would need to request missing or incomplete packets using a second connection. However, that exactly is what TCP/IP does automatically and I could think that it is faster when doing it yourself.

Regards, Alex
Avatar of teltel
teltel

ASKER

I need to send many ARPs so TCP/IP will take lots of time; I need to setup a tunnel before i can send a ARP through TCP.
It is still best for me to do it on layer2.