From e6eee664723aa0e1d87eac65216cdf12636e3284 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 14 Nov 2010 07:00:55 +0100 Subject: Rename net_{get,find}2 to net_{get,find}_cast --- nest/route.h | 8 ++++---- nest/rt-table.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'nest') diff --git a/nest/route.h b/nest/route.h index 0634ab7..c41ebf6 100644 --- a/nest/route.h +++ b/nest/route.h @@ -319,10 +319,10 @@ typedef struct rta { protocol-specific metric is availabe */ static inline struct fib *rt_fib(rtable *tab, int cast) { return (cast == RTC_MULTICAST) ? &tab->fib_multicast : &tab->fib_unicast; } -static inline net *net_find2(rtable *tab, ip_addr addr, unsigned len, int cast) { return (net *) fib_find(rt_fib(tab, cast), &addr, len); } -static inline net *net_find(rtable *tab, ip_addr addr, unsigned len) { return net_find2(tab, addr, len, RTC_UNICAST); } -static inline net *net_get2(rtable *tab, ip_addr addr, unsigned len, int cast) { return (net *) fib_get(rt_fib(tab, cast), &addr, len); } -static inline net *net_get(rtable *tab, ip_addr addr, unsigned len) { return net_get2(tab, addr, len, RTC_UNICAST); } +static inline net *net_find_cast(rtable *tab, ip_addr addr, unsigned len, int cast) { return (net *) fib_find(rt_fib(tab, cast), &addr, len); } +static inline net *net_find(rtable *tab, ip_addr addr, unsigned len) { return net_find_cast(tab, addr, len, RTC_UNICAST); } +static inline net *net_get_cast(rtable *tab, ip_addr addr, unsigned len, int cast) { return (net *) fib_get(rt_fib(tab, cast), &addr, len); } +static inline net *net_get(rtable *tab, ip_addr addr, unsigned len) { return net_get_cast(tab, addr, len, RTC_UNICAST); } /* diff --git a/nest/rt-table.c b/nest/rt-table.c index 5d17ca0..1303843 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -1838,8 +1838,8 @@ rt_show(struct rt_show_data *d) } else { - n = net_find2(d->table, d->prefix, d->pxlen, RTC_UNICAST); - n2 = net_find2(d->table, d->prefix, d->pxlen, RTC_MULTICAST); + n = net_find_cast(d->table, d->prefix, d->pxlen, RTC_UNICAST); + n2 = net_find_cast(d->table, d->prefix, d->pxlen, RTC_MULTICAST); } if (n || n2) { -- cgit v1.2.3