GETRTABLE(2) OpenBSD Programmer's Manual GETRTABLE(2)NAME
getrtable, setrtable - get and set the default routing domain of the
current process
SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
int
getrtable(void);
int
setrtable(int rtableid);
DESCRIPTIONgetrtable() and setrtable() manipulate the routing table and routing
domain associated with the current process.
Only the superuser is allowed to change the process routing domain if it
is already set to a non-zero value.
RETURN VALUES
A 0 is returned if the call succeeds, -1 if it fails.
ERRORS
The call succeeds unless:
[EINVAL] The value of the rtableid argument is not a valid routing
table.
[EPERM] The user is not the superuser and the routing domain of the
calling process is already set to a non-zero value.
SEE ALSOgetsockopt(2), setsockopt(2), route(8)HISTORY
The getrtable() and setrtable() system calls appeared in OpenBSD 4.8.
OpenBSD 4.9 July 3, 2010 OpenBSD 4.9