Feature #2587
closed
helper function to finde the right interface for a remote IP-Address
Added by dexter over 6 years ago.
Updated about 6 years ago.
Description
In some cases (mgcp-gw) it is important to know the IP-Address of the interface through which a remote IP-Address is reachable. This can be done using the syscalls connect() and getsockname(). Implement a helper function in socket.c that takes a remote ip-address as input and outputs the coresponding local interface
- Status changed from New to In Progress
- % Done changed from 0 to 50
Made an experiment to confirm that our idea works.
As a sidenote:
The idea is to connect (but not bind) a socket. With the connect syscall, the
kernel will make the actual decision which local interface is appropiate in
order to reach the remote address. We can then query the address of the local
interface choosen using getsockname().
The actual problem we try to solve with this is in the MGCP domain. An MGCP_GW,
that has to serves connections on two different interfaces must return the
ip addres of the interface where the remote reach it to send RTP packets. In
order to know which IP to return, we must probe with the remote IP we already
know thorugh the CRCX or MDCX. The kernel has the routing information of all
interfaces and can make the decision for us.
- % Done changed from 50 to 100
- Tracker changed from Bug to Feature
- Status changed from In Progress to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF