Author: melifaro Date: Mon Aug 10 20:50:31 2015 New Revision: 286594 URL: https://svnweb.freebsd.org/changeset/base/286594
Log: Rename rt_foreach_fib() to rt_foreach_fib_walk(). Suggested by: julian Modified: head/sys/net/route.c head/sys/net/route.h head/sys/netinet/in_rmx.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/nd6_rtr.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Aug 10 20:34:46 2015 (r286593) +++ head/sys/net/route.c Mon Aug 10 20:50:31 2015 (r286594) @@ -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); } /* Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Mon Aug 10 20:34:46 2015 (r286593) +++ head/sys/net/route.h Mon Aug 10 20:50:31 2015 (r286594) @@ -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 */ Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Mon Aug 10 20:34:46 2015 (r286593) +++ head/sys/netinet/in_rmx.c Mon Aug 10 20:50:31 2015 (r286594) @@ -213,7 +213,7 @@ in_ifadown(struct ifaddr *ifa, int delet 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? */ } Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Mon Aug 10 20:34:46 2015 (r286593) +++ head/sys/netinet6/in6_rmx.c Mon Aug 10 20:50:31 2015 (r286594) @@ -207,7 +207,8 @@ in6_mtuexpire(struct rtentry *rt, void * #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; Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Mon Aug 10 20:34:46 2015 (r286593) +++ head/sys/netinet6/nd6_rtr.c Mon Aug 10 20:50:31 2015 (r286594) @@ -2073,7 +2073,7 @@ rt6_flush(struct in6_addr *gateway, stru 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 _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"