* Iterates over all existing fibs in system calling * @hook_f function before/after traversing each fib. * Calls @wa_f function for each element in current fib. * If af is not AF_UNSPEC, iterates over fibs in particular * address family. */
| 136 | * address family. |
| 137 | */ |
| 138 | void |
| 139 | rib_foreach_table_walk(int family, bool wlock, rib_walktree_f_t *wa_f, |
| 140 | rib_walk_hook_f_t *hook_f, void *arg) |
| 141 | { |
| 142 | |
| 143 | for (uint32_t fibnum = 0; fibnum < rt_numfibs; fibnum++) { |
| 144 | /* Do we want some specific family? */ |
| 145 | if (family != AF_UNSPEC) { |
| 146 | rib_walk_ext(fibnum, family, wlock, wa_f, hook_f, arg); |
| 147 | continue; |
| 148 | } |
| 149 | |
| 150 | for (int i = 1; i <= AF_MAX; i++) |
| 151 | rib_walk_ext(fibnum, i, wlock, wa_f, hook_f, arg); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /* |
| 156 | * Iterates over all existing fibs in system and deletes each element |
nothing calls this directly
no test coverage detected