Function rc::getThisHostsIP

Function Documentation

bool rc::getThisHostsIP(std::string &this_hosts_ip, const std::string &other_hosts_ip, const std::string &network_interface = "")

Convenience function to scan this host’s (multiple) network interface(s) for a valid IP address. Users may give a hint either be specifying the preferred network interface to be used, or the IP address of another host that should be reachable from the returned IP address.

Parameters:
  • this_hosts_ip – IP address to be used as stream destination (only valid if returned true)

  • other_hosts_ip – rc_visard’s IP address, e.g. “192.168.0.20”

  • network_interface – name, e.g. eth0, wlan0, …

Returns:

true if valid IP address was found among network interfaces