Question : How to specify outgoing NIC for traffic sent out via UDP (in VC8 with winsock)

If a box has two network interfaces on it (i.e. two NIC's), and I want to send out UDP packets only on a specific NIC, how do we do it?
We use VC8 + winsock for socket communication.
We are able to listen only traffic coming from a specific NIC. Our problem is how to send it on a specific NIC.

Answer : How to specify outgoing NIC for traffic sent out via UDP (in VC8 with winsock)

If the UDP packet is a directed broadcast, say 192.168.7.255 then it should only go out that NIC
If the UDP packet is a broadcast 255.255.255.255 then it will go out both NICs
There is no way to even manipulate the routing table to accomadate that unless the UDP packets are unicast to a specific destination IP address, then you can route that to the next hop that is on the 192.168.7.x network...

Random Solutions  
 
programming4us programming4us