Is there a way to implement in C program a next feature: it's need to making outgoing TCP connections through specified network interface? as example:
eth0 - 172.16.0.1 eth1 - 192.168.1.1
In some case I'm need to make outgoing connections from source address 172.16.0.1, and under some other circumstances from 192.168.1.1.
Is this possible ? Is this can be achieved with bind() routine?