FACT++
1.0
|
string Dim::GetLocalIp | ( | const std::string & | dns = "10.0.100.1" | ) |
Tries to determine the local IP address with which we will connect to the DIM dns.
The local IP address is necessary because in some circumstances Dim needs the IP address of the connecting machine (DIM_HOST_NODE) for the clients to correctly connect to them. So what we would need is the IP address over which the machine is reachable from the client. Unfortunately, we have no access to the client connection, hence, we have to find the best guess of an address which is not our own machine and hope it is routed over the standard ethernet interface over which other clients will connect.
To not send random packages over the network we use a local IP address. To make sure it is something which leaves the network card and is not just our machine, we can use a broadcast address. Consequently, the deafult has been chosen to be "192.168.0.255"
dns | Address of the Dim-dns |
Definition at line 51 of file DimSetup.cc.
Referenced by GetLocalIp(), and Setup().