xref: /freebsd/usr.sbin/setfib/setfib.1 (revision 22cf89c938886d14f5796fc49f9f020c23ea8eaf)
1.\" Copyright (c) 2008 Cisco systems
2.\"	Author Julian Elischer.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Neither the name of the University nor the names of its contributors
10.\"    may be used to endorse or promote products derived from this software
11.\"    without specific prior written permission.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd October 20, 2008
26.Dt SETFIB 1
27.Os
28.Sh NAME
29.Nm setfib
30.Nd execute a utility with an altered default network view
31.Sh SYNOPSIS
32.Nm
33.Op Fl F
34.Ar fib
35.Ar utility
36.Op Ar argument ...
37.Sh DESCRIPTION
38The
39.Nm
40utility runs another
41.Ar utility
42with a different routing table.
43The table number
44.Ar fib
45will be used by default for all sockets started by this
46process or descendants.
47.Sh ENVIRONMENT
48The
49.Ev PATH
50environment variable is used to locate the requested
51.Ar utility
52if the name contains no
53.Ql /
54characters.
55.Sh EXIT STATUS
56If
57.Ar utility
58is invoked, the exit status of
59.Nm
60is the exit status of
61.Ar utility .
62.Pp
63An exit status of 126 indicates
64.Ar utility
65was found, but could not be executed.
66An exit status of 127 indicates
67.Ar utility
68could not be found.
69.Sh EXAMPLES
70Run
71.Xr netstat 1
72to view the second routing table.
73.Pp
74.Dl "setfib -F 1 netstat -rn"
75or
76.Dl "setfib 1 netstat -rn"
77or
78.Dl "setfib -1 netstat -rn"
79.Sh SEE ALSO
80.Xr setfib 2 ,
81.Xr setsockopt 2
82.Sh STANDARDS
83The
84.Nm
85utility is a
86.Fx
87specific extension.
88However, many
89.Ux Ns - Ns
90like systems
91have an equivalent function.
92.Sh HISTORY
93The
94.Nm
95utility appeared in
96.Fx 7.1 .
97