3 #include <netinet/in.h>
23 int ResolveHost(
char const* host_in, in_addr& addr);
59 int ResolveHost(
char const* host_in,
int dflt_port, sockaddr_in& sin);
68 int TCPConnect(
char const* host_in,
int dflt_port, int64_t flags = 0,
int sndbufsiz = 0);
70 #endif // TCPConnect_hh
int ResolveHost(char const *host_in, in_addr &addr)
Convert a string hostname to a in_addr suitable for socket communication.
int GetIPOfInterface(const std::string &interface_name, in_addr &addr)
Get the IP address associated with a given interface name.
int TCPConnect(char const *host_in, int dflt_port, int64_t flags=0, int sndbufsiz=0)
Connect to a host on a given port.
int GetInterfaceForNetwork(char const *host_in, in_addr &addr)
Convert an IP address to the network address of the interface sharing the subnet mask.
int AutodetectPrivateInterface(in_addr &addr)
Pick a private IP address on this host.