/SET resolve_prefer_ipv6 - should we prefer IPv6 or IPv4 addresses in

host name resolving. /SERVER ADD: added options -4 and -6. Fixed crash
at startup if server didn't have chat network set. "Connecting to xxx
[ip]" is now displayed before calling connect(), so if it fails we'll
still get the IP it's trying to connect to.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1268 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-02-20 16:23:28 +00:00 committed by cras
commit 481f4bc327
6 changed files with 58 additions and 13 deletions

View file

@ -51,9 +51,12 @@ int net_receive(GIOChannel *handle, char *buf, int len);
int net_transmit(GIOChannel *handle, const char *data, int len);
/* Get IP address for host. family specifies if we should prefer to
IPv4 or IPv6 address (0 = don't care, AF_INET or AF_INET6).
IPv4 or IPv6 address (0 = default, AF_INET or AF_INET6).
returns 0 = ok, others = error code for net_gethosterror() */
int net_gethostbyname(const char *addr, IPADDR *ip, int family);
/* Set the default address family to use with host resolving
(AF_INET or AF_INET6) */
void net_host_resolver_set_default_family(unsigned short family);
/* Get name for host, *name should be g_free()'d unless it's NULL.
Return values are the same as with net_gethostbyname() */
int net_gethostbyaddr(IPADDR *ip, char **name);