Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/net Various improvements.



details:   https://anonhg.NetBSD.org/src/rev/7ae61c9d5521
branches:  trunk
changeset: 365375:7ae61c9d5521
user:      wiz <wiz%NetBSD.org@localhost>
date:      Mon Aug 13 06:00:21 2018 +0000

description:
Various improvements.
More markup, sort errors, fix -1.

diffstat:

 lib/libc/net/sctp_bindx.3      |  16 ++++----
 lib/libc/net/sctp_connectx.3   |  12 +++---
 lib/libc/net/sctp_freepaddrs.3 |   9 ++--
 lib/libc/net/sctp_getaddrlen.3 |   6 +-
 lib/libc/net/sctp_getassocid.3 |  10 ++--
 lib/libc/net/sctp_getpaddrs.3  |  18 ++++----
 lib/libc/net/sctp_opt_info.3   |  24 ++++++------
 lib/libc/net/sctp_peeloff.3    |  16 ++++----
 lib/libc/net/sctp_recvmsg.3    |  83 ++++++++++++++++++++++-------------------
 lib/libc/net/sctp_send.3       |  83 +++++++++++++++++++++++------------------
 lib/libc/net/sctp_sendmsg.3    |  71 +++++++++++++++++++----------------
 11 files changed, 184 insertions(+), 164 deletions(-)

diffs (truncated from 856 to 300 lines):

diff -r 71856be80fec -r 7ae61c9d5521 lib/libc/net/sctp_bindx.3
--- a/lib/libc/net/sctp_bindx.3 Mon Aug 13 05:41:54 2018 +0000
+++ b/lib/libc/net/sctp_bindx.3 Mon Aug 13 06:00:21 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sctp_bindx.3,v 1.1 2018/08/02 08:40:48 rjs Exp $
+.\"    $NetBSD: sctp_bindx.3,v 1.2 2018/08/13 06:00:21 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -34,7 +34,7 @@
 .Os
 .Sh NAME
 .Nm sctp_bindx
-.Nd bind or unbind an SCTP socket to a list of addresses.
+.Nd bind or unbind an SCTP socket to a list of addresses
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -83,12 +83,16 @@
 have the address(es) added dynamically to the existing
 association.
 .Sh RETURN VALUES
-The call returns 0 on success and -1 upon failure.
+The call returns 0 on success and \-1 upon failure.
 .Sh ERRORS
 The
 .Fn sctp_bindx
 function can return the following errors:
 .Bl -tag -width Er
+.It Bq Er EBADF
+The argument
+.Fa s
+is not a valid descriptor.
 .It Bq Er EINVAL
 This value is returned if the
 .Fa type
@@ -97,10 +101,6 @@
 This value is returned if the number of addresses
 being added causes a memory allocation failure in
 the call.
-.It Bq Er EBADF
-The argument
-.Fa s
-is not a valid descriptor.
 .It Bq Er ENOTSOCK
 The argument
 .Fa s
@@ -114,7 +114,7 @@
 .%N 6458
 .%T "Sockets API Extensions for the Stream Control Transmission Protocol (SCTP)"
 .%D December 2011
-.Re 
+.Re
 .Sh HISTORY
 This function first appeared in
 .Nx 9.0 .
diff -r 71856be80fec -r 7ae61c9d5521 lib/libc/net/sctp_connectx.3
--- a/lib/libc/net/sctp_connectx.3      Mon Aug 13 05:41:54 2018 +0000
+++ b/lib/libc/net/sctp_connectx.3      Mon Aug 13 06:00:21 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sctp_connectx.3,v 1.1 2018/08/02 08:40:48 rjs Exp $
+.\"    $NetBSD: sctp_connectx.3,v 1.2 2018/08/13 06:00:21 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -76,15 +76,12 @@
 filled in with the association identification of the newly
 forming association.
 .Sh RETURN VALUES
-The call returns 0 on success and -1 upon failure.
+The call returns 0 on success and \-1 upon failure.
 .Sh ERRORS
 The
 .Fn sctp_connectx
 function can return the following errors:
 .Bl -tag -width Er
-.It Bq Er EINVAL
-An address listed has an invalid family or no
-addresses were provided.
 .It Bq Er E2BIG
 The size of the address list exceeds the amount of
 data provided.
@@ -92,6 +89,9 @@
 The argument
 .Fa s
 is not a valid descriptor.
+.It Bq Er EINVAL
+An address listed has an invalid family or no
+addresses were provided.
 .It Bq Er ENOTSOCK
 The argument
 .Fa s
@@ -105,7 +105,7 @@
 .%N 6458
 .%T "Sockets API Extensions for the Stream Control Transmission Protocol (SCTP)"
 .%D December 2011
-.Re 
+.Re
 .Sh HISTORY
 This function first appeared in
 .Nx 9.0 .
diff -r 71856be80fec -r 7ae61c9d5521 lib/libc/net/sctp_freepaddrs.3
--- a/lib/libc/net/sctp_freepaddrs.3    Mon Aug 13 05:41:54 2018 +0000
+++ b/lib/libc/net/sctp_freepaddrs.3    Mon Aug 13 06:00:21 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sctp_freepaddrs.3,v 1.1 2018/08/02 08:40:48 rjs Exp $
+.\"    $NetBSD: sctp_freepaddrs.3,v 1.2 2018/08/13 06:00:21 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -53,9 +53,9 @@
 .Fn sctp_freeladdrs
 functions are used to release the memory allocated by previous
 calls to
-.Fn sctp_getpaddrs
+.Xr sctp_getpaddrs 3
 or
-.Fn sctp_getladdrs
+.Xr sctp_getladdrs 3
 respectively.
 .Sh RETURN VALUES
 none.
@@ -68,8 +68,7 @@
 .%N 6458
 .%T "Sockets API Extensions for the Stream Control Transmission Protocol (SCTP)"
 .%D December 2011
-.Re 
+.Re
 .Sh HISTORY
 These functions first appeared in
 .Nx 9.0 .
-
diff -r 71856be80fec -r 7ae61c9d5521 lib/libc/net/sctp_getaddrlen.3
--- a/lib/libc/net/sctp_getaddrlen.3    Mon Aug 13 05:41:54 2018 +0000
+++ b/lib/libc/net/sctp_getaddrlen.3    Mon Aug 13 06:00:21 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sctp_getaddrlen.3,v 1.1 2018/08/02 08:40:48 rjs Exp $
+.\"    $NetBSD: sctp_getaddrlen.3,v 1.2 2018/08/13 06:00:21 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -69,7 +69,7 @@
 system call.
 .Sh RETURN VALUES
 The call returns the number of bytes that the operating
-system expects for the specific address family or -1.
+system expects for the specific address family or \-1.
 .Sh ERRORS
 The
 .Fn sctp_getaddrlen
@@ -87,7 +87,7 @@
 .%N 6458
 .%T "Sockets API Extensions for the Stream Control Transmission Protocol (SCTP)"
 .%D December 2011
-.Re 
+.Re
 .Sh HISTORY
 This function first appeared in
 .Nx 9.0 .
diff -r 71856be80fec -r 7ae61c9d5521 lib/libc/net/sctp_getassocid.3
--- a/lib/libc/net/sctp_getassocid.3    Mon Aug 13 05:41:54 2018 +0000
+++ b/lib/libc/net/sctp_getassocid.3    Mon Aug 13 06:00:21 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sctp_getassocid.3,v 1.1 2018/08/02 08:40:48 rjs Exp $
+.\"    $NetBSD: sctp_getassocid.3,v 1.2 2018/08/13 06:00:21 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .Os
 .Sh NAME
 .Nm sctp_getassocid
-.Nd return an association id for a specified socket address.
+.Nd return an association id for a specified socket address
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -55,12 +55,12 @@
 .Fn sctp_getassocid
 function can return the following errors:
 .Bl -tag -width Er
-.It Bq Er ENOENT
-The address does not have an association setup to it.
 .It Bq Er EBADF
 The argument
 .Fa s
 is not a valid descriptor.
+.It Bq Er ENOENT
+The address does not have an association setup to it.
 .It Bq Er ENOTSOCK
 The argument
 .Fa s
@@ -73,7 +73,7 @@
 .%N 6458
 .%T "Sockets API Extensions for the Stream Control Transmission Protocol (SCTP)"
 .%D December 2011
-.Re 
+.Re
 .Sh HISTORY
 This function first appeared in
 .Nx 9.0 .
diff -r 71856be80fec -r 7ae61c9d5521 lib/libc/net/sctp_getpaddrs.3
--- a/lib/libc/net/sctp_getpaddrs.3     Mon Aug 13 05:41:54 2018 +0000
+++ b/lib/libc/net/sctp_getpaddrs.3     Mon Aug 13 06:00:21 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sctp_getpaddrs.3,v 1.1 2018/08/02 08:40:48 rjs Exp $
+.\"    $NetBSD: sctp_getpaddrs.3,v 1.2 2018/08/13 06:00:21 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -62,29 +62,29 @@
 upon success.
 .Pp
 After the caller is finished, the function
-.Fn sctp_freepaddrs
+.Xr sctp_freepaddrs 3
 or
-.Fn sctp_freeladdrs
+.Xr sctp_freeladdrs 3
 should be used to release the memory allocated by these
 calls.
 .Sh RETURN VALUES
-The call returns -1 upon failure and a count of
+The call returns \-1 upon failure and a count of
 the number of addresses returned in
 .Fa addrs
 upon success.
 .Sh ERRORS
 The functions can return the following errors:
 .Bl -tag -width Er
+.It Bq Er EBADF
+The argument
+.Fa s
+is not a valid descriptor.
 .It Bq Er EINVAL
 An address listed has an invalid family or no
 addresses were provided.
 .It Bq Er ENOMEM
 The call cannot allocate memory to hold the
 socket addresses.
-.It Bq Er EBADF
-The argument
-.Fa s
-is not a valid descriptor.
 .It Bq Er ENOTSOCK
 The argument
 .Fa s
@@ -100,7 +100,7 @@
 .%N 6458
 .%T "Sockets API Extensions for the Stream Control Transmission Protocol (SCTP)"
 .%D December 2011
-.Re 
+.Re
 .Sh HISTORY
 These functions first appeared in
 .Nx 9.0 .
diff -r 71856be80fec -r 7ae61c9d5521 lib/libc/net/sctp_opt_info.3
--- a/lib/libc/net/sctp_opt_info.3      Mon Aug 13 05:41:54 2018 +0000
+++ b/lib/libc/net/sctp_opt_info.3      Mon Aug 13 06:00:21 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sctp_opt_info.3,v 1.1 2018/08/02 08:40:48 rjs Exp $
+.\"    $NetBSD: sctp_opt_info.3,v 1.2 2018/08/13 06:00:21 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -90,40 +90,40 @@
 .Pp
 .Dv SCTP_LOCAL_AUTH_CHUNKS
 .Sh RETURN VALUES
-The call returns 0 on success and -1 upon error.
+The call returns 0 on success and \-1 upon error.
 .Sh ERRORS
 The
 .Fn sctp_opt_info
 function can return the following errors:
 .Bl -tag -width Er
+.It Bq Er EBADF
+The argument
+.Fa s
+is not a valid descriptor.
 .It Bq Er EINVAL
 The argument
 .Fa arg
 value was invalid.
+.It Bq Er ENOTSOCK
+The argument
+.Fa s
+is not a socket.
 .It Bq Er EOPNOTSUPP
 The argument
 .Fa opt
 was not one of the above listed SCTP socket
 options.
-.It Bq Er EBADF
-The argument
-.Fa s
-is not a valid descriptor.
-.It Bq Er ENOTSOCK
-The argument
-.Fa s



Home | Main Index | Thread Index | Old Index