Reply To: SEND PACKET TO DESIRED ADAPTER

Home Forums Discussions Support Portal SEND PACKET TO DESIRED ADAPTER Reply To: SEND PACKET TO DESIRED ADAPTER

#9686

Vadim Smirnov
Moderator

If I’m not mistaken Internet Gateway uses single thread to send/receive packets from both adapters (LAN and WAN) waiting with WaitForMultipleObjects an adapter associated event objects.

So, in order to implement bandwidth management I’d advise launching two threads instead, one per network interface, each waiting with WaitForSingleObject on associated event. This way you should be able to delay packets for the selected network adapter without affecting the second one. Just note to take care about threads synchronization when accessing shared data. You can use Ethernet Bridge source for the reference for thread per network adapter model.