summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2002-01-04 18:12:38 +0000
committeryar <yar@FreeBSD.org>2002-01-04 18:12:38 +0000
commitea2e48c1df54eedb4916429fbbe30adad48d83ed (patch)
tree57f98d98603de866948936b4156dab75cf24653a /lib/libc
parent46f317e07b711d66d04c13582722f6381fe86f01 (diff)
downloadFreeBSD-src-ea2e48c1df54eedb4916429fbbe30adad48d83ed.zip
FreeBSD-src-ea2e48c1df54eedb4916429fbbe30adad48d83ed.tar.gz
State clearly that one should call listen(2) on a socket
at first and try to set an accept_filter(9) on it only after that. Also document errno value that will be set if installing the filter on a non-listening socket.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/getsockopt.211
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2
index d932e1d..45362b3 100644
--- a/lib/libc/sys/getsockopt.2
+++ b/lib/libc/sys/getsockopt.2
@@ -309,6 +309,13 @@ on the socket,
which will filter incoming connections
on a listening stream socket before being presented for
.Xr accept 2 .
+Once more,
+.Xr listen 2
+must be called on the socket before
+trying to install the filter on it,
+or else the
+.Fn setsockopt
+call will fail.
.Bd -literal
struct accept_filter_arg {
char af_name[16];
@@ -372,6 +379,10 @@ For
this error may also be returned if
.Fa optlen
is not in a valid part of the process address space.
+.It Bq Er EINVAL
+Installing an
+.Xr accept_filter 9
+on a non-listening socket was attempted.
.El
.Sh SEE ALSO
.Xr ioctl 2 ,
OpenPOWER on IntegriCloud