summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2021-10-08 14:12:59 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2021-10-08 14:12:59 +0000
commit6987ef4aeaa48f53735df41996ce3ca00fbd6441 (patch)
treec574c78a0ebc01f8246f91bff117c260b3f1cf3e
parent30319faa0f512f0c92772a54728250c11eac9bda (diff)
group the SO_PEERCRED text more logically and mark it read only;
diff from chohag jtan com ok claudio
-rw-r--r--lib/libc/sys/getsockopt.240
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2
index 5ffe9c94ffc..07369b1aa1c 100644
--- a/lib/libc/sys/getsockopt.2
+++ b/lib/libc/sys/getsockopt.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getsockopt.2,v 1.57 2021/02/04 18:51:01 bluhm Exp $
+.\" $OpenBSD: getsockopt.2,v 1.58 2021/10/08 14:12:58 jmc Exp $
.\" $NetBSD: getsockopt.2,v 1.7 1995/02/27 12:33:29 cgd Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)getsockopt.2 8.3 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: February 4 2021 $
+.Dd $Mdocdate: October 8 2021 $
.Dt GETSOCKOPT 2
.Os
.Sh NAME
@@ -162,8 +162,6 @@ set timeout value for output
set timeout value for input
.It Dv SO_TIMESTAMP
enables reception of a timestamp with datagrams
-.It Dv SO_PEERCRED
-get the credentials from other side of connection
.It Dv SO_RTABLE
set the routing table used for route lookups
.It Dv SO_SPLICE
@@ -178,6 +176,8 @@ get and clear error on the socket (get only)
get the domain of the socket (get only)
.It Dv SO_PROTOCOL
get the protocol of the socket (get only)
+.It Dv SO_PEERCRED
+get the credentials from other side of connection (get only)
.El
.Pp
.Dv SO_DEBUG
@@ -349,20 +349,6 @@ cmsg_level = SOL_SOCKET
cmsg_type = SCM_TIMESTAMP
.Ed
.Pp
-.Dv SO_PEERCRED
-fetches the
-.Va struct sockpeercred
-credentials from the other side of the connection
-(currently only possible on
-.Dv AF_UNIX
-sockets).
-These credentials are from the time that
-.Xr bind 2 ,
-.Xr connect 2
-or
-.Xr socketpair 2
-were called.
-.Pp
The
.Dv SO_RTABLE
option gets or sets the routing table which will be used by the socket
@@ -459,9 +445,10 @@ is set, overwrite kernel memory after sending data.
Finally,
.Dv SO_TYPE ,
.Dv SO_DOMAIN ,
-.Dv SO_PROTOCOL
+.Dv SO_PROTOCOL ,
+.Dv SO_ERROR ,
and
-.Dv SO_ERROR
+.Dv SO_PEERCRED
are options used only with
.Fn getsockopt .
.Dv SO_TYPE
@@ -478,6 +465,19 @@ returns the protocol of the socket such as
returns any pending error on the socket and clears the error status.
It may be used to check for asynchronous errors on connected
datagram sockets or for other asynchronous errors.
+.Dv SO_PEERCRED
+fetches the
+.Va struct sockpeercred
+credentials from the other side of the connection
+(currently only possible on
+.Dv AF_UNIX
+sockets).
+These credentials are from the time that
+.Xr bind 2 ,
+.Xr connect 2
+or
+.Xr socketpair 2
+were called.
.Sh RETURN VALUES
.Rv -std
.Sh ERRORS