summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-10-16 08:50:34 +0000
committerguenther <guenther@openbsd.org>2011-10-16 08:50:34 +0000
commit4904963edbdd50c5e91bf1f08cb165b50c022db3 (patch)
tree95265d66738287560af1247cea331fec8d2472d6 /lib/libc
parentNote a restriction that is actually enforced in 5.0 (diff)
downloadwireguard-openbsd-4904963edbdd50c5e91bf1f08cb165b50c022db3.tar.xz
wireguard-openbsd-4904963edbdd50c5e91bf1f08cb165b50c022db3.zip
Tweak wording, to clarify that setrtable affects the routing table
and that getrtable returns the table, not 0/-1. Also, strip some quotes that mandoc made superfluous, per comment from jmc@. ok claudio@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/getrtable.216
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/libc/sys/getrtable.2 b/lib/libc/sys/getrtable.2
index efda35b89fe..a5bde85f095 100644
--- a/lib/libc/sys/getrtable.2
+++ b/lib/libc/sys/getrtable.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getrtable.2,v 1.1 2010/07/03 04:44:51 guenther Exp $
+.\" $OpenBSD: getrtable.2,v 1.2 2011/10/16 08:50:34 guenther Exp $
.\"
.\" Copyright (c) 2009 Reyk Floeter <reyk@openbsd.org>
.\"
@@ -14,13 +14,13 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 3 2010 $
+.Dd $Mdocdate: October 16 2011 $
.Dt GETRTABLE 2
.Os
.Sh NAME
.Nm getrtable ,
.Nm setrtable
-.Nd "get and set the default routing domain of the current process"
+.Nd get and set the default routing table of the current process
.Sh SYNOPSIS
.Fd #include <sys/types.h>
.Fd #include <sys/socket.h>
@@ -35,10 +35,14 @@ and
manipulate the routing table and routing domain associated with the current
process.
.Pp
-Only the superuser is allowed to change the process routing domain if
+Only the superuser is allowed to change the process routing table if
it is already set to a non-zero value.
.Sh RETURN VALUES
-A 0 is returned if the call succeeds, \-1 if it fails.
+.Fn getrtable
+returns the routing table of the current process.
+Upon successful completion,
+.Fn setrtable
+returns 0 if the call succeeds, \-1 if it fails.
.Sh ERRORS
The call succeeds unless:
.Bl -tag -width Er
@@ -47,7 +51,7 @@ The value of the
.Fa rtableid
argument is not a valid routing table.
.It Bq Er EPERM
-The user is not the superuser and the routing domain of the
+The user is not the superuser and the routing table of the
calling process is already set to a non-zero value.
.El
.Sh SEE ALSO