summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2010-07-03 04:44:53 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2010-07-03 04:44:53 +0000
commit1df4f9d5fc0dabecca2ff9680db469442a1cfc73 (patch)
treef1096c33d9ee94872dc2030b23f093a1335185a3 /lib
parenta5a38a4c5ed836aeac420d462a2319bc2732aab9 (diff)
Fix the naming of interfaces and variables for rdomains and rtables
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/shlib_version2
-rw-r--r--lib/libc/sys/Makefile.inc8
-rw-r--r--lib/libc/sys/getrtable.2 (renamed from lib/libc/sys/getrdomain.2)31
3 files changed, 21 insertions, 20 deletions
diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version
index edb06f55ccd..ced9f0a5390 100644
--- a/lib/libc/shlib_version
+++ b/lib/libc/shlib_version
@@ -1,4 +1,4 @@
-major=54
+major=55
minor=0
# note: If changes were made to include/thread_private.h or if system
# calls were added/changed then libpthread must also be updated.
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index ecfeba72cff..6a6b2b6ef5f 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.91 2010/07/01 19:15:30 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.92 2010/07/03 04:44:51 guenther Exp $
# $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $
# @(#)Makefile.inc 8.1 (Berkeley) 6/17/93
@@ -67,7 +67,7 @@ ASM= accept.o access.o acct.o adjfreq.o adjtime.o bind.o chdir.o chflags.o \
utimes.o wait4.o write.o writev.o nnpfspioctl.o __semctl.o \
__syscall.o __sysctl.o __getcwd.o sched_yield.o getthrid.o \
thrsleep.o thrwakeup.o threxit.o thrsigdivert.o \
- setrdomain.o getrdomain.o
+ setrtable.o getrtable.o
GASM= ${ASM:.o=.go}
PASM= ${ASM:.o=.po}
@@ -219,7 +219,7 @@ MAN+= accept.2 access.2 acct.2 adjfreq.2 adjtime.2 bind.2 brk.2 chdir.2 \
dup.2 execve.2 _exit.2 fcntl.2 fhopen.2 \
flock.2 fork.2 fsync.2 getdirentries.2 \
getfh.2 getfsstat.2 getgid.2 getgroups.2 getitimer.2 getlogin.2 \
- getpeername.2 getpgrp.2 getrdomain.2 \
+ getpeername.2 getpgrp.2 getrtable.2 \
getpid.2 getpriority.2 getrlimit.2 getrusage.2 getsid.2 getsockname.2 \
getsockopt.2 gettimeofday.2 getuid.2 intro.2 issetugid.2 ioctl.2 \
kill.2 kqueue.2 ktrace.2 link.2 \
@@ -262,7 +262,7 @@ MLINKS+=getpid.2 getppid.2
MLINKS+=getpriority.2 setpriority.2
MLINKS+=getrlimit.2 setrlimit.2
MLINKS+=getsockopt.2 setsockopt.2
-MLINKS+=getrdomain.2 setrdomain.2
+MLINKS+=getrtable.2 setrtable.2
MLINKS+=gettimeofday.2 settimeofday.2
MLINKS+=getuid.2 geteuid.2
MLINKS+=kqueue.2 kevent.2 kqueue.2 EV_SET.2
diff --git a/lib/libc/sys/getrdomain.2 b/lib/libc/sys/getrtable.2
index d31ad749d77..efda35b89fe 100644
--- a/lib/libc/sys/getrdomain.2
+++ b/lib/libc/sys/getrtable.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getrdomain.2,v 1.2 2009/11/27 22:02:55 jmc Exp $
+.\" $OpenBSD: getrtable.2,v 1.1 2010/07/03 04:44:51 guenther Exp $
.\"
.\" Copyright (c) 2009 Reyk Floeter <reyk@openbsd.org>
.\"
@@ -14,25 +14,26 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 27 2009 $
-.Dt GETRDOMAIN 2
+.Dd $Mdocdate: July 3 2010 $
+.Dt GETRTABLE 2
.Os
.Sh NAME
-.Nm getrdomain ,
-.Nm setrdomain
+.Nm getrtable ,
+.Nm setrtable
.Nd "get and set the default routing domain of the current process"
.Sh SYNOPSIS
.Fd #include <sys/types.h>
.Fd #include <sys/socket.h>
.Ft int
-.Fn getrdomain "void"
+.Fn getrtable "void"
.Ft int
-.Fn setrdomain "int rdomain"
+.Fn setrtable "int rtableid"
.Sh DESCRIPTION
-.Fn getrdomain
+.Fn getrtable
and
-.Fn setrdomain
-manipulate the routing domain associated with the current process.
+.Fn setrtable
+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
it is already set to a non-zero value.
@@ -43,8 +44,8 @@ The call succeeds unless:
.Bl -tag -width Er
.It Bq Er EINVAL
The value of the
-.Fa rdomain
-argument is not a valid routing domain.
+.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
calling process is already set to a non-zero value.
@@ -55,8 +56,8 @@ calling process is already set to a non-zero value.
.Xr route 8
.Sh HISTORY
The
-.Fn getrdomain
+.Fn getrtable
and
-.Fn setrdomain
+.Fn setrtable
system calls appeared in
-.Ox 4.7 .
+.Ox 4.8 .