I have 2 Ethernet interfaces configured in my Linux Machine.
Lets say Interface A and Interface B.
I am writing a tcp client socket program and need to send the packets on the defined interface.
For example.
./client -intf interface A/B
if it the input is interface A, then the client has to send packets only via interface A and vice versa.
Could anyone provides some hint on how to implement this?.
Thanks in advance!!!
Had to do something similar before, have you tried this?
https://austinmarton.wordpress.com/2011/09/14/sending-raw-ethernet-packets-from-a-specific-interface-in-c-on-linux/