Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/sys Document EINVAL for out of range socket address...



details:   https://anonhg.NetBSD.org/src/rev/acfd398b5ba0
branches:  trunk
changeset: 954028:acfd398b5ba0
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sun Mar 28 03:29:31 2021 +0000

description:
Document EINVAL for out of range socket address lengths.

This is what happens, but wasn't documented. Applies to bind(2),
connect(2), and send(2).

diffstat:

 lib/libc/sys/bind.2    |  6 ++++--
 lib/libc/sys/connect.2 |  6 ++++--
 lib/libc/sys/send.2    |  6 ++++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diffs (81 lines):

diff -r 42734f9a3583 -r acfd398b5ba0 lib/libc/sys/bind.2
--- a/lib/libc/sys/bind.2       Sat Mar 27 23:35:37 2021 +0000
+++ b/lib/libc/sys/bind.2       Sun Mar 28 03:29:31 2021 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: bind.2,v 1.30 2017/07/03 21:32:50 wiz Exp $
+.\"    $NetBSD: bind.2,v 1.31 2021/03/28 03:29:31 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)bind.2     8.1 (Berkeley) 6/4/93
 .\"
-.Dd April 5, 2015
+.Dd March 27, 2021
 .Dt BIND 2
 .Os
 .Sh NAME
@@ -99,6 +99,8 @@
 the family of the socket and that requested in
 .Fa name->sa_family
 are not equivalent.
+.It Bq Er EINVAL
+The socket address length passed was outside the allowable range.
 .It Bq Er ENOTSOCK
 .Fa s
 is not a socket.
diff -r 42734f9a3583 -r acfd398b5ba0 lib/libc/sys/connect.2
--- a/lib/libc/sys/connect.2    Sat Mar 27 23:35:37 2021 +0000
+++ b/lib/libc/sys/connect.2    Sun Mar 28 03:29:31 2021 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: connect.2,v 1.28 2010/05/31 12:16:20 njoly Exp $
+.\"    $NetBSD: connect.2,v 1.29 2021/03/28 03:29:31 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)connect.2  8.1 (Berkeley) 6/4/93
 .\"
-.Dd May 18, 2004
+.Dd March 27, 2021
 .Dt CONNECT 2
 .Os
 .Sh NAME
@@ -97,6 +97,8 @@
 .It Bq Er ENOTSOCK
 .Fa s
 is a descriptor for a file, not a socket.
+.It Bq Er EINVAL
+The socket address length passed was outside the allowable range.
 .It Bq Er EADDRNOTAVAIL
 The specified address is not available on this machine.
 .It Bq Er EAFNOSUPPORT
diff -r 42734f9a3583 -r acfd398b5ba0 lib/libc/sys/send.2
--- a/lib/libc/sys/send.2       Sat Mar 27 23:35:37 2021 +0000
+++ b/lib/libc/sys/send.2       Sun Mar 28 03:29:31 2021 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: send.2,v 1.32 2017/06/11 17:01:26 abhinav Exp $
+.\"    $NetBSD: send.2,v 1.33 2021/03/28 03:29:31 dholland Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)send.2     8.2 (Berkeley) 2/21/94
 .\"
-.Dd June 22, 2012
+.Dd March 27, 2021
 .Dt SEND 2
 .Os
 .Sh NAME
@@ -217,6 +217,8 @@
 .It Bq Er EINVAL
 The total length of the I/O is more than can be expressed by the ssize_t
 return value.
+.It Bq Er EINVAL
+The socket address length passed was outside the allowable range.
 .It Bq Er EMSGSIZE
 The socket requires that message be sent atomically,
 and the size of the message to be sent made this impossible.



Home | Main Index | Thread Index | Old Index