MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rib_walk_ext_internal

Function rib_walk_ext_internal

freebsd/net/route/route_helpers.c:90–105  ·  view source on GitHub ↗

* Calls @wa_f with @arg for each entry in the table specified by * @af and @fibnum. * * @ss_t callback is called before and after the tree traversal * while holding table lock. * * Table is traversed under read lock unless @wlock is set. */

Source from the content-addressed store, hash-verified

88 * Table is traversed under read lock unless @wlock is set.
89 */
90void
91rib_walk_ext_internal(struct rib_head *rnh, bool wlock, rib_walktree_f_t *wa_f,
92 rib_walk_hook_f_t *hook_f, void *arg)
93{
94 RIB_RLOCK_TRACKER;
95
96 if (wlock)
97 RIB_WLOCK(rnh);
98 else
99 RIB_RLOCK(rnh);
100 rib_walk_ext_locked(rnh, wa_f, hook_f, arg);
101 if (wlock)
102 RIB_WUNLOCK(rnh);
103 else
104 RIB_RUNLOCK(rnh);
105}
106
107void
108rib_walk_ext(uint32_t fibnum, int family, bool wlock, rib_walktree_f_t *wa_f,

Callers 1

rib_walk_extFunction · 0.85

Calls 1

rib_walk_ext_lockedFunction · 0.85

Tested by

no test coverage detected