|
NAMEipaddr_local - resolve the address of a local network interfaceSYNOPSIS
DESCRIPTIONConverts an IP address in human-readable format, or a name of a local network interface into an ipaddr structure.Mode specifies which kind of addresses should be returned. Possible values are:
Setting the argument to zero invokes default behaviour, which, at the present, is IPADDR_PREF_IPV4. However, in the future when IPv6 becomes more common it may be switched to IPADDR_PREF_IPV6. addr: Out parameter, The IP address object. name: Name of the local network interface, such as "eth0", "192.168.0.111" or "::1". port: Port number. Valid values are 1-65535. mode: What kind of address to return. See above. This function is not available if libdill is compiled with --disable-sockets option. RETURN VALUEIn case of success the function returns 0. In case of error it returns -1 and sets errno to one of the values below.ERRORS
EXAMPLE
SEE ALSOipaddr_equal(3) ipaddr_family(3) ipaddr_len(3) ipaddr_port(3) ipaddr_remote(3) ipaddr_remotes(3) ipaddr_setport(3) ipaddr_sockaddr(3) ipaddr_str(3)
Visit the GSP FreeBSD Man Page Interface. |