summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-12-18 12:45:11 +0000
committerru <ru@FreeBSD.org>2002-12-18 12:45:11 +0000
commit8746d263e1451855025dc83dde5176cc9f1fbe3f (patch)
treeee7f7ba4650cadf44410ca9a44676c72c96739b7 /lib/libc/net
parent160081aef68b0dc49b79d3b7702b75671d9c06ff (diff)
downloadFreeBSD-src-8746d263e1451855025dc83dde5176cc9f1fbe3f.zip
FreeBSD-src-8746d263e1451855025dc83dde5176cc9f1fbe3f.tar.gz
mdoc(7) police: "The .Fn function".
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/ethers.34
-rw-r--r--lib/libc/net/getaddrinfo.34
-rw-r--r--lib/libc/net/gethostbyname.32
-rw-r--r--lib/libc/net/getipnodebyname.315
-rw-r--r--lib/libc/net/hesiod.319
-rw-r--r--lib/libc/net/inet6_option_space.38
-rw-r--r--lib/libc/net/inet6_rthdr_space.310
-rw-r--r--lib/libc/net/iso_addr.34
-rw-r--r--lib/libc/net/linkaddr.34
-rw-r--r--lib/libc/net/rcmd.36
-rw-r--r--lib/libc/net/sockatmark.32
11 files changed, 74 insertions, 4 deletions
diff --git a/lib/libc/net/ethers.3 b/lib/libc/net/ethers.3
index 40b5c7d..bfa5955 100644
--- a/lib/libc/net/ethers.3
+++ b/lib/libc/net/ethers.3
@@ -116,12 +116,16 @@ functions map ethernet addresses to their corresponding hostnames
as specified in the
.Pa /etc/ethers
database.
+The
.Fn ether_ntohost
+function
converts from ethernet address to hostname, and
.Fn ether_hostton
converts from hostname to ethernet address.
.Sh RETURN VALUES
+The
.Fn ether_line
+function
returns zero on success and non-zero if it was unable to parse
any part of the supplied line
.Ar l .
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3
index 9ef8898..4dbd771 100644
--- a/lib/libc/net/getaddrinfo.3
+++ b/lib/libc/net/getaddrinfo.3
@@ -1,4 +1,3 @@
-.\" $FreeBSD$
.\" $KAME: getaddrinfo.3,v 1.31 2001/08/05 18:19:38 itojun Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993
@@ -33,6 +32,7 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
+.\" $FreeBSD$
.\"
.Dd May 25, 1995
.Dt GETADDRINFO 3
@@ -274,7 +274,9 @@ must be sufficiently consistent and unambiguous.
Here are some problem cases you may encounter:
.Bl -bullet
.It
+The
.Fn getaddrinfo
+function
will fail if the members in the
.Fa hints
structure are not consistent.
diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3
index 72cd124..4f4b9dc 100644
--- a/lib/libc/net/gethostbyname.3
+++ b/lib/libc/net/gethostbyname.3
@@ -372,7 +372,9 @@ copied before any subsequent calls overwrite it.
Only the Internet
address format is currently understood.
.Pp
+The
.Fn gethostbyname2
+function
cannot perform
.Dv AF_INET6
lookups over NIS.
diff --git a/lib/libc/net/getipnodebyname.3 b/lib/libc/net/getipnodebyname.3
index 5860fb8..b564c41 100644
--- a/lib/libc/net/getipnodebyname.3
+++ b/lib/libc/net/getipnodebyname.3
@@ -1,4 +1,3 @@
-.\" $FreeBSD$
.\" $KAME: getipnodebyname.3,v 1.6 2000/08/09 21:16:17 itojun Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993
@@ -33,6 +32,7 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
+.\" $FreeBSD$
.\"
.Dd May 25, 1995
.Dt GETIPNODEBYNAME 3
@@ -58,6 +58,7 @@
.Fn freehostent "struct hostent *ptr"
.\"
.Sh DESCRIPTION
+The
.Fn getipnodebyname
and
.Fn getipnodebyaddr
@@ -375,18 +376,24 @@ pointer and the value pointed to by
equals
.Dv HOST_NOT_FOUND .
.Pp
+The
.Fn getipnodebyaddr
+function
takes almost the same argument as
.Xr gethostbyaddr 3 ,
but adds a pointer to return an error number.
Additionally it takes care of IPv4-mapped IPv6 addresses,
and IPv4-compatible IPv6 addresses.
.Pp
+The
.Fn getipnodebyname
and
.Fn getipnodebyaddr
+functions
dynamically allocate the structure to be returned to the caller.
+The
.Fn freehostent
+function
reclaims memory region allocated and returned by
.Fn getipnodebyname
or
@@ -400,9 +407,11 @@ or
.El
.\"
.Sh DIAGNOSTICS
+The
.Fn getipnodebyname
and
.Fn getipnodebyaddr
+functions
returns
.Dv NULL
on errors.
@@ -436,17 +445,21 @@ The meanings of each error code are described in
The implementation first appeared in KAME advanced networking kit.
.\"
.Sh STANDARDS
+The
.Fn getipnodebyname
and
.Fn getipnodebyaddr
+functions
are documented in
.Dq Basic Socket Interface Extensions for IPv6
(RFC2553).
.\"
.Sh BUGS
+The
.Fn getipnodebyname
and
.Fn getipnodebyaddr
+functions
do not handle scoped IPv6 address properly.
If you use these functions,
your program will not be able to handle scoped IPv6 addresses.
diff --git a/lib/libc/net/hesiod.3 b/lib/libc/net/hesiod.3
index 9b9ad1c..d91db9e 100644
--- a/lib/libc/net/hesiod.3
+++ b/lib/libc/net/hesiod.3
@@ -1,5 +1,4 @@
.\" $NetBSD: hesiod.3,v 1.1 1999/01/25 03:43:04 lukem Exp $
-.\" $FreeBSD$
.\"
.\" from: #Id: hesiod.3,v 1.9.2.1 1997/01/03 21:02:23 ghudson Exp #
.\"
@@ -17,6 +16,8 @@
.\" this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
+.\" $FreeBSD$
+.\"
.Dd November 30, 1996
.Dt HESIOD 3
.Os
@@ -50,15 +51,21 @@ To perform lookups, you must first initialize a
.Fa context ,
an opaque object which stores information used internally by the
library between calls.
+The
.Fn hesiod_init
+function
initializes a context, storing a pointer to the context in the
location pointed to by the
.Fa context
argument.
+The
.Fn hesiod_end
+function
frees the resources used by a context.
.Pp
+The
.Fn hesiod_resolve
+function
is the primary interface to the library.
If successful, it returns a
list of one or more strings giving the records matching
@@ -73,7 +80,9 @@ caller's responsibility to call
.Fn hesiod_free_list
to free the resources used by the returned list.
.Pp
+The
.Fn hesiod_to_bind
+function
converts
.Fa name
and
@@ -117,19 +126,27 @@ Hesiod calls may fail because of:
Insufficient memory was available to carry out the requested
operation.
.It Bq Er ENOEXEC
+The
.Fn hesiod_init
+function
failed because the Hesiod configuration file was invalid.
.It Bq Er ECONNREFUSED
+The
.Fn hesiod_resolve
+function
failed because no name server could be contacted to answer the query.
.It Bq Er EMSGSIZE
+The
.Fn hesiod_resolve
or
.Fn hesiod_to_bind
+function
failed because the query or response was too big to fit into the
packet buffers.
.It Bq Er ENOENT
+The
.Fn hesiod_resolve
+function
failed because the name server had no text records matching
.Fa name
and
diff --git a/lib/libc/net/inet6_option_space.3 b/lib/libc/net/inet6_option_space.3
index 3e1649a..00a9b46 100644
--- a/lib/libc/net/inet6_option_space.3
+++ b/lib/libc/net/inet6_option_space.3
@@ -75,7 +75,9 @@ these functions are all in the
header.
.\"
.Ss inet6_option_space
+The
.Fn inet6_option_space
+function
returns the number of bytes required to hold an option when it is stored as
ancillary data, including the
.Li cmsghdr
@@ -105,7 +107,9 @@ one option
(appendix B of [RFC-2460]).
.\"
.Ss inet6_option_init
+The
.Fn inet6_option_init
+function
is called once per ancillary data object that will
contain either Hop-by-Hop or Destination options.
It returns
@@ -387,16 +391,20 @@ is not
.Dv NULL .
.\"
.Sh DIAGNOSTICS
+The
.Fn inet6_option_init
and
.Fn inet6_option_append
+functions
return
.Li 0
on success or
.Li -1
on an error.
.Pp
+The
.Fn inet6_option_alloc
+function
returns
.Dv NULL
on an error.
diff --git a/lib/libc/net/inet6_rthdr_space.3 b/lib/libc/net/inet6_rthdr_space.3
index 154f514..428d96f 100644
--- a/lib/libc/net/inet6_rthdr_space.3
+++ b/lib/libc/net/inet6_rthdr_space.3
@@ -267,25 +267,33 @@ Note: Addresses are indexed starting at 1, and flags starting at 0,
to maintain consistency with the terminology and figures in RFC2460.
.\"
.Sh DIAGNOSTICS
+The
.Fn inet6_rthdr_space
+function
returns 0 on errors.
.Pp
+The
.Fn inet6_rthdr_add ,
.Fn inet6_rthdr_lasthop
and
.Fn inet6_rthdr_reverse
+functions
return 0 on success, and returns -1 on error.
.Pp
+The
.Fn inet6_rthdr_init
and
.Fn inet6_rthdr_getaddr
+functions
return
.Dv NULL
on error.
.Pp
+The
.Fn inet6_rthdr_segments
and
.Fn inet6_rthdr_getflags
+functions
return -1 on error.
.\"
.Sh EXAMPLES
@@ -319,5 +327,7 @@ are documented in
.Sh BUGS
The text was shamelessly copied from RFC2292.
.Pp
+The
.Fn inet6_rthdr_reverse
+function
is not implemented yet.
diff --git a/lib/libc/net/iso_addr.3 b/lib/libc/net/iso_addr.3
index 4407dca..5654ae8 100644
--- a/lib/libc/net/iso_addr.3
+++ b/lib/libc/net/iso_addr.3
@@ -88,9 +88,13 @@ A period following an odd number of bytes has the
effect of causing the byte of address being translated
to have its higher order bits filled with zeros.
.Sh RETURN VALUES
+The
.Fn iso_ntoa
+function
always returns a null terminated string.
+The
.Fn iso_addr
+function
always returns a pointer to a struct iso_addr.
(See
.Sx BUGS . )
diff --git a/lib/libc/net/linkaddr.3 b/lib/libc/net/linkaddr.3
index 4b1c6e9..61ebee0 100644
--- a/lib/libc/net/linkaddr.3
+++ b/lib/libc/net/linkaddr.3
@@ -102,9 +102,13 @@ The direct use of these functions is deprecated in favor of the
interface; however, portable programs cannot rely on the latter as it is
not yet widely implemented.
.Sh RETURN VALUES
+The
.Fn link_ntoa
+function
always returns a null terminated string.
+The
.Fn link_addr
+function
has no return value.
(See
.Sx BUGS . )
diff --git a/lib/libc/net/rcmd.3 b/lib/libc/net/rcmd.3
index 5367655..3673c81 100644
--- a/lib/libc/net/rcmd.3
+++ b/lib/libc/net/rcmd.3
@@ -286,13 +286,19 @@ is overloaded to mean ``All network ports in use.''
Most of these
functions appeared in
.Bx 4.2 .
+The
.Fn rresvport_af
+function
appeared in RFC2292, and was implemented by the WIDE project
for the Hydrangea IPv6 protocol stack kit.
+The
.Fn rcmd_af
+function
appeared in draft-ietf-ipngwg-rfc2292bis-01.txt,
and was implemented in the WIDE/KAME IPv6 protocol stack kit.
+The
.Fn iruserok_sa
+function
appeared in discussion on the IETF ipngwg mailing list,
and was implemented in
.Fx 4.0 .
diff --git a/lib/libc/net/sockatmark.3 b/lib/libc/net/sockatmark.3
index 0cd8427..da073c0 100644
--- a/lib/libc/net/sockatmark.3
+++ b/lib/libc/net/sockatmark.3
@@ -106,7 +106,7 @@ is a descriptor for a file, not a socket.
.Sh HISTORY
The
.Fn sockatmark
-function call was introduced by
+function was introduced by
.St -p1003.1-2001 ,
to standardize the historical
.Dv SIOCATMARK
OpenPOWER on IntegriCloud