Rename rt_foreach_fib() to rt_foreach_fib_walk().
Suggested by: julian
This commit is contained in:
parent
2e92f38b63
commit
2caee4be35
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286594
@ -813,8 +813,16 @@ rtrequest_fib(int req,
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Iterates over all existing fibs in system calling
|
||||
* @setwa_f function prior to 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.
|
||||
*/
|
||||
void
|
||||
rt_foreach_fib(int af, rt_setwarg_t *setwa_f, rt_walktree_f_t *wa_f, void *arg)
|
||||
rt_foreach_fib_walk(int af, rt_setwarg_t *setwa_f, rt_walktree_f_t *wa_f,
|
||||
void *arg)
|
||||
{
|
||||
struct radix_node_head *rnh;
|
||||
uint32_t fibnum;
|
||||
@ -899,7 +907,7 @@ void
|
||||
rt_flushifroutes(struct ifnet *ifp)
|
||||
{
|
||||
|
||||
rt_foreach_fib(AF_UNSPEC, NULL, rt_ifdelroute, ifp);
|
||||
rt_foreach_fib_walk(AF_UNSPEC, NULL, rt_ifdelroute, ifp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -382,7 +382,7 @@ void rt_updatemtu(struct ifnet *);
|
||||
|
||||
typedef int rt_walktree_f_t(struct rtentry *, void *);
|
||||
typedef void rt_setwarg_t(struct radix_node_head *, uint32_t, int, void *);
|
||||
void rt_foreach_fib(int af, rt_setwarg_t *, rt_walktree_f_t *, void *);
|
||||
void rt_foreach_fib_walk(int af, rt_setwarg_t *, rt_walktree_f_t *, void *);
|
||||
void rt_flushifroutes(struct ifnet *ifp);
|
||||
|
||||
/* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */
|
||||
|
@ -213,7 +213,7 @@ in_ifadown(struct ifaddr *ifa, int delete)
|
||||
arg.ifa = ifa;
|
||||
arg.del = delete;
|
||||
|
||||
rt_foreach_fib(AF_INET, in_setifarnh, in_ifadownkill, &arg);
|
||||
rt_foreach_fib_walk(AF_INET, in_setifarnh, in_ifadownkill, &arg);
|
||||
ifa->ifa_flags &= ~IFA_ROUTE; /* XXXlocking? */
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,8 @@ in6_mtuexpire(struct rtentry *rt, void *rock)
|
||||
#define MTUTIMO_DEFAULT (60*1)
|
||||
|
||||
static void
|
||||
in6_mtutimo_setwa(struct radix_node_head *rnh, uint32_t fibum, int af, void *_arg)
|
||||
in6_mtutimo_setwa(struct radix_node_head *rnh, uint32_t fibum, int af,
|
||||
void *_arg)
|
||||
{
|
||||
struct mtuex_arg *arg;
|
||||
|
||||
@ -223,7 +224,7 @@ in6_mtutimo(void *rock)
|
||||
struct timeval atv;
|
||||
struct mtuex_arg arg;
|
||||
|
||||
rt_foreach_fib(AF_INET6, in6_mtutimo_setwa, in6_mtuexpire, &arg);
|
||||
rt_foreach_fib_walk(AF_INET6, in6_mtutimo_setwa, in6_mtuexpire, &arg);
|
||||
|
||||
atv.tv_sec = MTUTIMO_DEFAULT;
|
||||
atv.tv_usec = 0;
|
||||
|
@ -2073,7 +2073,7 @@ rt6_flush(struct in6_addr *gateway, struct ifnet *ifp)
|
||||
return;
|
||||
|
||||
/* XXX Do we really need to walk any but the default FIB? */
|
||||
rt_foreach_fib(AF_INET6, NULL, rt6_deleteroute, (void *)gateway);
|
||||
rt_foreach_fib_walk(AF_INET6, NULL, rt6_deleteroute, (void *)gateway);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user