summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/getaddrinfo.3
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2015-09-20 01:09:23 +0000
committerhrs <hrs@FreeBSD.org>2015-09-20 01:09:23 +0000
commita3fcca6713520dc0bf112298215886bcceed5a0f (patch)
tree77e76ada766a17a7c962eca30f68e4bcd6ba0307 /lib/libc/net/getaddrinfo.3
parent92177854740b4059d4a698eddb8a7cc0f09188d5 (diff)
downloadFreeBSD-src-a3fcca6713520dc0bf112298215886bcceed5a0f.zip
FreeBSD-src-a3fcca6713520dc0bf112298215886bcceed5a0f.tar.gz
Add PF_LOCAL support in getaddrinfo(3) and getnameinfo(3):
- In a PF_LOCAL address, "hostname" must begins with '/' and "servname" is always NULL. All of ai_flags are ignored. - PF_UNSPEC matches PF_LOCAL. EAI_SERVICE is not returned to make AF-independent programming easier; "servname" is always ignored in PF_LOCAL. In practice, PF_INET* and PF_LOCAL are mutually-exclusive because a hostname which begins with '/' is invalid in PF_INET*. No domain name resolution is performed for a PF_LOCAL address. Differential Revision: https://reviews.freebsd.org/D3634
Diffstat (limited to 'lib/libc/net/getaddrinfo.3')
-rw-r--r--lib/libc/net/getaddrinfo.320
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3
index 570fc2e..e13c667 100644
--- a/lib/libc/net/getaddrinfo.3
+++ b/lib/libc/net/getaddrinfo.3
@@ -18,7 +18,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 14, 2013
+.Dd September 20, 2015
.Dt GETADDRINFO 3
.Os
.Sh NAME
@@ -40,7 +40,6 @@
The
.Fn getaddrinfo
function is used to get a list of
-.Tn IP
addresses and port numbers for host
.Fa hostname
and service
@@ -59,7 +58,9 @@ arguments are either pointers to NUL-terminated strings or the null pointer.
An acceptable value for
.Fa hostname
is either a valid host name or a numeric host address string consisting
-of a dotted decimal IPv4 address or an IPv6 address.
+of a dotted decimal IPv4 address,
+an IPv6 address,
+or a UNIX-domain address.
The
.Fa servname
is either a decimal port number or a service name listed in
@@ -105,6 +106,7 @@ operating system.
Denotes the type of socket that is wanted:
.Dv SOCK_STREAM ,
.Dv SOCK_DGRAM ,
+.Dv SOCK_SEQPACKET ,
or
.Dv SOCK_RAW .
When
@@ -112,9 +114,11 @@ When
is zero the caller will accept any socket type.
.It Fa ai_protocol
Indicates which transport protocol is desired,
-.Dv IPPROTO_UDP
+.Dv IPPROTO_UDP ,
+.Dv IPPROTO_TCP ,
+.Dv IPPROTO_SCTP ,
or
-.Dv IPPROTO_TCP .
+.Dv IPPROTO_UDPLITE .
If
.Fa ai_protocol
is zero the caller will accept any protocol.
@@ -131,6 +135,9 @@ or be the bitwise-inclusive OR of one or more of the values
.Dv AI_NUMERICSERV
and
.Dv AI_PASSIVE .
+For a UNIX-domain address,
+.Fa ai_flags
+is ignored.
.Bl -tag -width "AI_CANONNAMEXX"
.It Dv AI_ADDRCONFIG
If the
@@ -419,6 +426,9 @@ freeaddrinfo(res0);
.Xr getnameinfo 3 ,
.Xr getservbyname 3 ,
.Xr resolver 3 ,
+.Xr inet 4 ,
+.Xr inet6 4 ,
+.Xr unix 4 ,
.Xr hosts 5 ,
.Xr resolv.conf 5 ,
.Xr services 5 ,
OpenPOWER on IntegriCloud