I am trying to send UDP packets via a specific interface using the NDK
I am using TIRTOS 2_12_01_33 with NDK 2_24_02_31
I have one Ethernet interface and up to two PPP interfaces.
I am only using UDP protocol.
When I transmit a UDP packet on a socket I want that packet to be sent via the specific interface I wish to use, rather than routing choosing what it feels is the best interface.
I have tried using setsockopt to set SO_IFDEVICE but this doesn't send my packets via the desired interface.
When I have more than one PPP interface the send or sendto functions only appear to work via whichever PPP interface is first to be connected.
Packets sent to sockets connected to the second PPP interface simply seem to fail (They appear to go through the working PPP link when send is called but never seem to arrive at the destination address).
Below is my route table with the two PPP links active
Address Subnet Mask Flags Gateway
--------------- --------------- ------ -----------------
0.0.0.0 0.0.0.0 U if-2
0.0.0.0 0.0.0.0 U if-3
10.107.120.145 255.255.255.255 U H L local (if-2)
100.111.151.255 255.255.255.255 U H L local (if-3)