I\'m writing a TCP server that needs to know which interface each connection arrived from. I cannot use the address/subnet to deduce which interface was used, since there mi
Look at the destination address.
Each interface is normally bound to a unique address. If multiple interfaces are bonded together, it probably doesn't matter which one it used.
The only exception to this, is when using ipv6 anycast, but even then, you wouldn't normally have multiple interfaces on the same host with the same ip.