summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-04-08 18:46:44 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-04-08 18:46:44 +0000
commitf147223f7f776671277075f595a77294849429b2 (patch)
tree3ac34a2296152f43f6034e46f2b2c4b2d7d559bc /lib/libc
parentc6fad1e63c6962bb9f3e76f12e67bab773f41d4f (diff)
Actually describe the parameters rather than calling facts BUGS
that aren't even small bugs. And stop talking about AF_LOCAL. Feedback and OK guenther@, OK jmc@.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/socketpair.240
1 files changed, 21 insertions, 19 deletions
diff --git a/lib/libc/sys/socketpair.2 b/lib/libc/sys/socketpair.2
index 3f7331c1896..28225c556d7 100644
--- a/lib/libc/sys/socketpair.2
+++ b/lib/libc/sys/socketpair.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: socketpair.2,v 1.20 2016/05/29 06:01:24 guenther Exp $
+.\" $OpenBSD: socketpair.2,v 1.21 2018/04/08 18:46:43 schwarze Exp $
.\" $NetBSD: socketpair.2,v 1.5 1995/02/27 12:38:00 cgd Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)socketpair.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: May 29 2016 $
+.Dd $Mdocdate: April 8 2018 $
.Dt SOCKETPAIR 2
.Os
.Sh NAME
@@ -39,17 +39,11 @@
.Sh SYNOPSIS
.In sys/socket.h
.Ft int
-.Fn socketpair "int d" "int type" "int protocol" "int sv[2]"
+.Fn socketpair "int domain" "int type" "int protocol" "int sv[2]"
.Sh DESCRIPTION
The
.Fn socketpair
-call creates an unnamed pair of connected sockets in
-the specified domain
-.Fa d ,
-of the specified
-.Fa type ,
-and using the optionally specified
-.Fa protocol .
+call creates an unnamed pair of connected sockets.
The descriptors used in referencing the new sockets
are returned in
.Fa sv Ns [0]
@@ -57,6 +51,23 @@ and
.Fa sv Ns [1] .
The two sockets are indistinguishable.
.Pp
+The only supported
+.Fa domain
+is
+.Dv AF_UNIX .
+Possible values for the
+.Fa type
+and
+.Fa protocol
+arguments are explained in the
+.Xr socket 2
+manual page.
+The only useful value for
+.Fa protocol
+is 0, which will let the system select an appropriate protocol
+for the requested socket
+.Fa type .
+.Pp
Any combination of the following flags may additionally be used in the
.Fa type
argument:
@@ -119,12 +130,3 @@ and
.Dv SOCK_NONBLOCK
flags appeared in
.Ox 5.7 .
-.Sh BUGS
-This call is currently implemented only for the LOCAL domain.
-Many operating systems only accept a
-.Fa protocol
-of
-.Dv AF_UNSPEC ,
-so that should be used instead of
-.Dv AF_LOCAL
-for maximal portability.