Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GETRTABLE(2)		  FreeBSD System Calls Manual		  GETRTABLE(2)

NAME
     getrtable,	setrtable -- get and set the default routing table of the cur-
     rent process

SYNOPSIS
     #include <sys/types.h>
     #include <sys/socket.h>

     int
     getrtable(void);

     int
     setrtable(int rtableid);

DESCRIPTION
     getrtable() and setrtable() manipulate the	routing	table and routing do-
     main associated with the current process.

     Only the superuser	is allowed to change the process routing table if it
     is	already	set to a non-zero value.

RETURN VALUES
     getrtable() returns the routing table of the current process.  Upon suc-
     cessful completion, setrtable() returns 0 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 table of
			the calling process is already set to a	non-zero
			value.

SEE ALSO
     getsockopt(2), route(8)

HISTORY
     The getrtable() and setrtable() system calls appeared in OpenBSD 4.8.

FreeBSD	13.0		      September	10, 2015		  FreeBSD 13.0

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | SEE ALSO | HISTORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=getrtable&sektion=2&manpath=OpenBSD+6.9>

home | help