summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/getnameinfo.3
diff options
context:
space:
mode:
authoraaron <>1999-07-05 04:41:00 +0000
committeraaron <>1999-07-05 04:41:00 +0000
commitc47037b066169c61c5eefad3368f2da73ca4be54 (patch)
treefa80157fecd0fbb57811f82d8f3ce1366b44a203 /src/lib/libc/net/getnameinfo.3
parent5f78a44df1a8e524a82445f2fedb382128869a2a (diff)
downloadopenbsd-c47037b066169c61c5eefad3368f2da73ca4be54.tar.gz
openbsd-c47037b066169c61c5eefad3368f2da73ca4be54.tar.bz2
openbsd-c47037b066169c61c5eefad3368f2da73ca4be54.zip
repairs; better English, formatting, etc.
Diffstat (limited to 'src/lib/libc/net/getnameinfo.3')
-rw-r--r--src/lib/libc/net/getnameinfo.333
1 files changed, 17 insertions, 16 deletions
diff --git a/src/lib/libc/net/getnameinfo.3 b/src/lib/libc/net/getnameinfo.3
index a1b3bdabb6..dd1ff6b947 100644
--- a/src/lib/libc/net/getnameinfo.3
+++ b/src/lib/libc/net/getnameinfo.3
@@ -30,11 +30,11 @@
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 32.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
33.\" $Id: getnameinfo.3,v 1.1 1999/07/03 20:26:55 deraadt Exp $ 33.\" $Id: getnameinfo.3,v 1.2 1999/07/05 04:40:59 aaron Exp $
34.\" 34.\"
35.Dd May 25, 1995 35.Dd May 25, 1995
36.Dt GETNAMEINFO 3 36.Dt GETNAMEINFO 3
37.Os KAME 37.Os
38.Sh NAME 38.Sh NAME
39.Nm getnameinfo 39.Nm getnameinfo
40.Nd address-to-nodename translation in protocol-independent manner 40.Nd address-to-nodename translation in protocol-independent manner
@@ -64,16 +64,16 @@ a non-zero return value indicates failure.
64The first argument, 64The first argument,
65.Fa sa , 65.Fa sa ,
66points to either a 66points to either a
67.Fa sockaddr_in 67.Li sockaddr_in
68structure (for IPv4) or a 68structure (for IPv4) or a
69.Fa sockaddr_in6 69.Li sockaddr_in6
70structure (for IPv6) that holds the IP address and port number. 70structure (for IPv6) that holds the IP address and port number.
71The 71The
72.Fa salen 72.Fa salen
73argument gives the length of the 73argument gives the length of the
74.Fa sockaddr_in 74.Li sockaddr_in
75or 75or
76.Fa sockaddr_in6 76.Li sockaddr_in6
77structure. 77structure.
78.Pp 78.Pp
79The function returns the nodename associated with the IP address in 79The function returns the nodename associated with the IP address in
@@ -102,7 +102,7 @@ Unfortunately most systems do not provide constants that specify the
102maximum size of either a fully-qualified domain name or a service name. 102maximum size of either a fully-qualified domain name or a service name.
103Therefore to aid the application in allocating buffers for these two 103Therefore to aid the application in allocating buffers for these two
104returned strings the following constants are defined in 104returned strings the following constants are defined in
105.Li <netdb.h> : 105.Aq Pa netdb.h :
106.Bd -literal -offset 106.Bd -literal -offset
107#define NI_MAXHOST 1025 107#define NI_MAXHOST 1025
108#define NI_MAXSERV 32 108#define NI_MAXSERV 32
@@ -111,11 +111,8 @@ returned strings the following constants are defined in
111The first value is actually defined as the constant 111The first value is actually defined as the constant
112.Dv MAXDNAME 112.Dv MAXDNAME
113in recent versions of BIND's 113in recent versions of BIND's
114.Li <arpa/nameser.h> 114.Aq Pa arpa/nameser.h
115header 115header (older versions of BIND define this constant to be 256)
116.Po
117older versions of BIND define this constant to be 256
118.Pc
119and the second is a guess based on the services listed in the current 116and the second is a guess based on the services listed in the current
120Assigned Numbers RFC. 117Assigned Numbers RFC.
121.Pp 118.Pp
@@ -154,21 +151,24 @@ instead of its name.
154The two 151The two
155.Dv NI_NUMERICxxx 152.Dv NI_NUMERICxxx
156flags are required to support the 153flags are required to support the
157.Li "-n" 154.Fl n
158flag that many commands provide. 155flag that many commands provide.
159.Pp 156.Pp
160A fifth flag bit, 157A fifth flag bit,
161.Dv NI_DGRAM , 158.Dv NI_DGRAM ,
162specifies that the service is a datagram service, and causes 159specifies that the service is a datagram service, and causes
163.Fn getservbyport 160.Fn getservbyport
164to be called with a second argument of "udp" instead of its default of "tcp". 161to be called with a second argument of
162.Qq udp
163instead of its default of
164.Qq tcp .
165This is required for the few ports (512-514) 165This is required for the few ports (512-514)
166that have different services for UDP and TCP. 166that have different services for UDP and TCP.
167.Pp 167.Pp
168These 168These
169.Dv NI_xxx 169.Dv NI_xxx
170flags are defined in 170flags are defined in
171.Li <netdb.h> . 171.Aq Pa netdb.h .
172.Sh FILES 172.Sh FILES
173.Bl -tag -width /etc/resolv.conf -compact 173.Bl -tag -width /etc/resolv.conf -compact
174.It Pa /etc/hosts 174.It Pa /etc/hosts
@@ -193,7 +193,8 @@ R. Gilligan, S. Thomson, J. Bound, and W. Stevens,
193The 193The
194.Fn getaddrinfo 194.Fn getaddrinfo
195function is defined IEEE POSIX 1003.1g draft specification, 195function is defined IEEE POSIX 1003.1g draft specification,
196and documented in ``Basic Socket Interface Extensions for IPv6'' 196and documented in
197.Dq Basic Socket Interface Extensions for IPv6
197.Pq RFC2533 . 198.Pq RFC2533 .
198.Sh BUGS 199.Sh BUGS
199The text was shamelessly copied from RFC2553. 200The text was shamelessly copied from RFC2553.