- Document RT_[UN]LOCK, RT_ADDREF, RT_REMREF.
- Describe how RT_FREE actually works. Grammar check: ru Reviewed by: sam MFC after: 1 month
This commit is contained in:
parent
dbc8f2b5ce
commit
bb978628ec
@ -27,7 +27,7 @@
|
|||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.Dd October 7, 2004
|
.Dd October 11, 2004
|
||||||
.Os
|
.Os
|
||||||
.Dt RTALLOC 9
|
.Dt RTALLOC 9
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -49,6 +49,10 @@
|
|||||||
.Ft void
|
.Ft void
|
||||||
.Fn rtfree "struct rt_entry *rt"
|
.Fn rtfree "struct rt_entry *rt"
|
||||||
.Fn RTFREE "struct rt_entry *rt"
|
.Fn RTFREE "struct rt_entry *rt"
|
||||||
|
.Fn RT_LOCK "struct rt_entry *rt"
|
||||||
|
.Fn RT_UNLOCK "struct rt_entry *rt"
|
||||||
|
.Fn RT_ADDREF "struct rt_entry *rt"
|
||||||
|
.Fn RT_REMREF "struct rt_entry *rt"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The kernel uses a radix tree structure to manage routes for the
|
The kernel uses a radix tree structure to manage routes for the
|
||||||
networking subsystem.
|
networking subsystem.
|
||||||
@ -189,12 +193,31 @@ macro is used to free unlocked route entries, previously allocated by
|
|||||||
.Fn rtalloc
|
.Fn rtalloc
|
||||||
or
|
or
|
||||||
.Fn rtalloc_ign .
|
.Fn rtalloc_ign .
|
||||||
|
The
|
||||||
|
.Fn RTFREE
|
||||||
|
macro decrements the reference count on the routing table entry (see below),
|
||||||
|
and frees it if the reference count has reached zero.
|
||||||
|
.Pp
|
||||||
The preferred usage is allocating a route using
|
The preferred usage is allocating a route using
|
||||||
.Fn rtalloc
|
.Fn rtalloc
|
||||||
or
|
or
|
||||||
.Fn rtalloc_ign
|
.Fn rtalloc_ign
|
||||||
and freeing using
|
and freeing using
|
||||||
.Fn RTFREE .
|
.Fn RTFREE .
|
||||||
|
.Pp
|
||||||
|
The
|
||||||
|
.Fn RT_LOCK
|
||||||
|
macro is used to lock a routing table entry.
|
||||||
|
The
|
||||||
|
.Fn RT_UNLOCK
|
||||||
|
macro is used to unlock a routing table entry.
|
||||||
|
.Pp
|
||||||
|
The
|
||||||
|
.Fn RT_ADDREF
|
||||||
|
macro increments the reference count on a previously locked route entry.
|
||||||
|
The
|
||||||
|
.Fn RT_REMREF
|
||||||
|
macro decrements the reference count on a previously locked route entry.
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
The
|
The
|
||||||
.Fn rtalloc ,
|
.Fn rtalloc ,
|
||||||
@ -228,6 +251,8 @@ argument to
|
|||||||
.Fn rtalloc1
|
.Fn rtalloc1
|
||||||
first appeared in
|
first appeared in
|
||||||
.Fx 2.0 .
|
.Fx 2.0 .
|
||||||
|
Routing table locking was introduced in
|
||||||
|
.Fx 5.2 .
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
This manual page was written by
|
This manual page was written by
|
||||||
.An Garrett Wollman ,
|
.An Garrett Wollman ,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user