Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/inet - Add an ERRORS section rather than incomplete...
details: https://anonhg.NetBSD.org/src/rev/d487428a463a
branches: trunk
changeset: 780349:d487428a463a
user: ginsbach <ginsbach%NetBSD.org@localhost>
date: Fri Jul 20 19:44:39 2012 +0000
description:
- Add an ERRORS section rather than incompletely documenting the
possible errno values in the DESCRIPTION section.
diffstat:
lib/libc/inet/inet_net.3 | 54 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 47 insertions(+), 7 deletions(-)
diffs (89 lines):
diff -r 24e9b4da6d38 -r d487428a463a lib/libc/inet/inet_net.3
--- a/lib/libc/inet/inet_net.3 Fri Jul 20 19:31:53 2012 +0000
+++ b/lib/libc/inet/inet_net.3 Fri Jul 20 19:44:39 2012 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: inet_net.3,v 1.3 2012/07/20 13:40:58 ginsbach Exp $
+.\" $NetBSD: inet_net.3,v 1.4 2012/07/20 19:44:39 ginsbach Exp $
.\"
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd December 8, 2001
+.Dd July 20, 2012
.Dt INET_NET 3
.Os
.Sh NAME
@@ -58,7 +58,7 @@
that are the network number.
It returns
.Dv NULL
-if a system error occurs (in which case,
+if an error occurs (in which case
.Va errno
will have been set), or it returns a pointer to the destination string.
.Pp
@@ -72,10 +72,7 @@
specified with /CIDR), or \-1 if a failure occurred
(in which case
.Va errno
-will have been set.
-It will be set to
-.Er ENOENT
-if the Internet network number was not valid).
+will have been set).
.Pp
The currently supported values for
.Fa af
@@ -141,6 +138,49 @@
.\" .Sh NETWORK NUMBERS (IP VERSION 6)
.\" XXX - document this!
.\"
+.Sh ERRORS
+The
+.Fn inet_net_ntop
+and
+.Fn inet_net_pton
+functions may fail with
+.Bl -tag -width Er
+.It Bq Er EAFNOSUPPORT
+The value of
+.Fa af
+was not
+.Dv AF_INET
+or
+.Dv AF_INET6 .
+.It Bq Er EMSGSIZE
+The conversion of
+.Fa src
+overflows
+.Fa size
+of
+.Fa dst.
+.El
+.Pp
+The
+.Fn inet_net_ntop
+function may fail with
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The
+.Fa bits
+argument contains an invalid number of bits
+for the requested address family.
+.El
+.Pp
+The
+.Fn inet_net_pton
+function may fail with
+.Bl -tag -width Er
+.It Bq Er ENOENT
+The
+.Fa src
+was not a valid Internet network number.
+.El
.Sh SEE ALSO
.Xr byteorder 3 ,
.Xr inet 3 ,
Home |
Main Index |
Thread Index |
Old Index