summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3')
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.341
1 files changed, 26 insertions, 15 deletions
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3 b/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3
index 80c23221f4b..98e979ec827 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.3
@@ -1,4 +1,4 @@
-.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
.\"
.\" Permission to use, copy, modify, and distribute this software for any
@@ -13,13 +13,13 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $ISC: lwres_getaddrinfo.3,v 1.16.2.1.8.7 2006/06/29 13:02:31 marka Exp $
+.\" $ISC: lwres_getaddrinfo.3,v 1.20.18.11 2007/01/30 00:23:45 marka Exp $
.\"
.hy 0
.ad l
.\" Title: lwres_getaddrinfo
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
.\" Date: Jun 30, 2000
.\" Manual: BIND9
.\" Source: BIND9
@@ -36,14 +36,14 @@ lwres_getaddrinfo, lwres_freeaddrinfo \- socket address structure to host and se
#include <lwres/netdb.h>
.fi
.HP 22
-.BI "int lwres_getaddrinfo(const\ char\ *hostname, const\ char\ *servname, const\ struct\ addrinfo\ *hints, struct\ addrinfo\ **res);"
+.BI "int lwres_getaddrinfo(const\ char\ *" "hostname" ", const\ char\ *" "servname" ", const\ struct\ addrinfo\ *" "hints" ", struct\ addrinfo\ **" "res" ");"
.HP 24
-.BI "void lwres_freeaddrinfo(struct\ addrinfo\ *ai);"
+.BI "void lwres_freeaddrinfo(struct\ addrinfo\ *" "ai" ");"
.PP
If the operating system does not provide a
\fBstruct addrinfo\fR, the following structure is used:
-.sp
-.RS 3n
+.PP
+.RS 4
.nf
struct addrinfo {
int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
@@ -82,14 +82,17 @@ is either a decimal port number or a service name as listed in
is an optional pointer to a
\fBstruct addrinfo\fR. This structure can be used to provide hints concerning the type of socket that the caller supports or wishes to use. The caller can supply the following structure elements in
\fI*hints\fR:
-.TP 3n
+.PP
\fBai_family\fR
+.RS 4
The protocol family that should be used. When
\fBai_family\fR
is set to
\fBPF_UNSPEC\fR, it means the caller will accept any protocol family supported by the operating system.
-.TP 3n
+.RE
+.PP
\fBai_socktype\fR
+.RS 4
denotes the type of socket \(em
\fBSOCK_STREAM\fR,
\fBSOCK_DGRAM\fR
@@ -98,13 +101,17 @@ or
\(em that is wanted. When
\fBai_socktype\fR
is zero the caller will accept any socket type.
-.TP 3n
+.RE
+.PP
\fBai_protocol\fR
+.RS 4
indicates which transport protocol is wanted: IPPROTO_UDP or IPPROTO_TCP. If
\fBai_protocol\fR
is zero the caller will accept any protocol.
-.TP 3n
+.RE
+.PP
\fBai_flags\fR
+.RS 4
Flag bits. If the
\fBAI_CANONNAME\fR
bit is set, a successful call to
@@ -129,11 +136,11 @@ When
does not set the
\fBAI_PASSIVE\fR
bit, the returned socket address structure will be ready for use in a call to
-\fBconnect\fR(2 )
+\fBconnect\fR(2)
for a connection\-oriented protocol or
\fBconnect\fR(2),
\fBsendto\fR(2), or
-\fBsendmsg\fR(2 )
+\fBsendmsg\fR(2)
if a connectionless protocol was chosen. The IP address portion of the socket address structure will be set to the loopback address if
\fIhostname\fR
is a
@@ -150,6 +157,7 @@ is set to
it indicates that
\fIhostname\fR
should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
+.RE
.PP
All other elements of the
\fBstruct addrinfo\fR
@@ -208,7 +216,7 @@ created by a call to
.PP
\fBlwres_getaddrinfo()\fR
returns zero on success or one of the error codes listed in
-\fBgai_strerror\fR(3 )
+\fBgai_strerror\fR(3)
if an error occurs. If both
\fIhostname\fR
and
@@ -232,4 +240,7 @@ returns
\fBsendmsg\fR(2),
\fBsocket\fR(2).
.SH "COPYRIGHT"
-Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+.br
+Copyright \(co 2000, 2001, 2003 Internet Software Consortium.
+.br