Deleted Added
full compact
rtentry.9 (256618) rtentry.9 (262763)
1.\"
2.\" Copyright 1996 Massachusetts Institute of Technology
3.\"
4.\" Permission to use, copy, modify, and distribute this software and
5.\" its documentation for any purpose and without fee is hereby
6.\" granted, provided that both the above copyright notice and this
7.\" permission notice appear in all copies, that both the above
8.\" copyright notice and this permission notice appear in all

--- 12 unchanged lines hidden (view full) ---

21.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
1.\"
2.\" Copyright 1996 Massachusetts Institute of Technology
3.\"
4.\" Permission to use, copy, modify, and distribute this software and
5.\" its documentation for any purpose and without fee is hereby
6.\" granted, provided that both the above copyright notice and this
7.\" permission notice appear in all copies, that both the above
8.\" copyright notice and this permission notice appear in all

--- 12 unchanged lines hidden (view full) ---

21.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.\" $FreeBSD: head/share/man/man9/rtentry.9 256618 2013-10-16 10:36:42Z melifaro $
29.\" $FreeBSD: head/share/man/man9/rtentry.9 262763 2014-03-05 01:17:47Z glebius $
30.\"
30.\"
31.Dd October 16, 2013
31.Dd March 5, 2014
32.Dt RTENTRY 9
33.Os
34.Sh NAME
35.Nm rtentry
36.Nd structure of an entry in the kernel routing table
37.Sh SYNOPSIS
38.In sys/types.h
39.In sys/socket.h

--- 33 unchanged lines hidden (view full) ---

73.Dq target
74of the route, which can either represent a destination in its own
75right (some protocols will put a link-layer address here), or some
76intermediate stop on the way to that destination (if the
77.Dv RTF_GATEWAY
78flag is set).
79.It Vt "int rt_flags" ;
80See below.
32.Dt RTENTRY 9
33.Os
34.Sh NAME
35.Nm rtentry
36.Nd structure of an entry in the kernel routing table
37.Sh SYNOPSIS
38.In sys/types.h
39.In sys/socket.h

--- 33 unchanged lines hidden (view full) ---

73.Dq target
74of the route, which can either represent a destination in its own
75right (some protocols will put a link-layer address here), or some
76intermediate stop on the way to that destination (if the
77.Dv RTF_GATEWAY
78flag is set).
79.It Vt "int rt_flags" ;
80See below.
81If the
82.Dv RTF_UP
83flag is not present, the
84.Fn rtfree
85function will delete the route from the radix tree when the last
86reference drops.
81.It Vt "int rt_refcnt" ;
82Route entries are reference-counted; this field indicates the number
83of external (to the radix tree) references.
84.It Vt "struct ifnet *rt_ifp" ;
85.It Vt "struct ifaddr *rt_ifa" ;
86These two fields represent the
87.Dq answer ,
88as it were, to the question posed by a route lookup; that is, they
89name the interface and interface address to be used in sending a
90packet to the destination or set of destinations which this route
91represents.
87.It Vt "int rt_refcnt" ;
88Route entries are reference-counted; this field indicates the number
89of external (to the radix tree) references.
90.It Vt "struct ifnet *rt_ifp" ;
91.It Vt "struct ifaddr *rt_ifa" ;
92These two fields represent the
93.Dq answer ,
94as it were, to the question posed by a route lookup; that is, they
95name the interface and interface address to be used in sending a
96packet to the destination or set of destinations which this route
97represents.
92.It Vt "struct rt_metrics_lite rt_rmx" ;
93See below.
94If the
95.Dv RTF_UP
96flag is not present, the
97.Fn rtfree
98function will delete the route from the radix tree when the last
99reference drops.
98.It Vt "u_long rt_mtu";
99See description of rmx_mtu below.
100.It Vt "u_long rt_weight";
101See description of rmx_weight below.
102.It Vt "u_long rt_expire";
103See description of rmx_expire below.
104.It Vt "counter64_t rt_pksent";
105See description of rmx_pksent below.
100.It Vt "struct rtentry *rt_gwroute" ;
101This member is a reference to a route whose destination is
102.Va rt_gateway .
103It is only used for
104.Dv RTF_GATEWAY
105routes.
106.It Vt "struct mtx rt_mtx" ;
107Mutex to lock this routing entry.

--- 51 unchanged lines hidden (view full) ---

159Indicates that the destination of this route is an address configured
160as belonging to this system.
161.It Dv RTF_BROADCAST
162Indicates that the destination is a broadcast address.
163.It Dv RTF_MULTICAST
164Indicates that the destination is a multicast address.
165.El
166.Pp
106.It Vt "struct rtentry *rt_gwroute" ;
107This member is a reference to a route whose destination is
108.Va rt_gateway .
109It is only used for
110.Dv RTF_GATEWAY
111routes.
112.It Vt "struct mtx rt_mtx" ;
113Mutex to lock this routing entry.

--- 51 unchanged lines hidden (view full) ---

165Indicates that the destination of this route is an address configured
166as belonging to this system.
167.It Dv RTF_BROADCAST
168Indicates that the destination is a broadcast address.
169.It Dv RTF_MULTICAST
170Indicates that the destination is a multicast address.
171.El
172.Pp
167Every route has associated with it a set of metrics, stored in
168.Vt "struct rt_metrics_lite" .
169Metrics are supplied in
173Several metrics are supplied in
170.Vt "struct rt_metrics"
171passed with routing control messages via
172.Xr route 4
173API.
174Currently only
175.Vt rmx_mtu , rmx_expire ,
176and
177.Vt rmx_pksent
174.Vt "struct rt_metrics"
175passed with routing control messages via
176.Xr route 4
177API.
178Currently only
179.Vt rmx_mtu , rmx_expire ,
180and
181.Vt rmx_pksent
178metrics are used in
179.Vt "struct rt_metrics_lite" .
182metrics are supplied.
180All others are ignored.
181.Pp
182The following metrics are defined by
183.Vt "struct rt_metrics" :
184.Bl -tag -offset indent -width 6n
185.It Vt "u_long rmx_locks" ;
186Flag bits indicating which metrics the kernel is not permitted to
187dynamically modify.

--- 64 unchanged lines hidden ---
183All others are ignored.
184.Pp
185The following metrics are defined by
186.Vt "struct rt_metrics" :
187.Bl -tag -offset indent -width 6n
188.It Vt "u_long rmx_locks" ;
189Flag bits indicating which metrics the kernel is not permitted to
190dynamically modify.

--- 64 unchanged lines hidden ---