aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorHannes Frederic Sowa <hannes@stressinduktion.org>2014-10-06 13:58:34 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-07 00:02:30 -0400
commit94b2cfe02bfe3f1918d91bd6f498e308c5605cbc (patch)
tree597dc0faf3ccd86acc74851f92e37bef3988973f /include/net
parent1ff0dc9499b25d016777f9b8d3ee486fd588ba59 (diff)
ipv6: minor fib6 cleanups like type safety, bool conversion, inline removal
Also renamed struct fib6_walker_t to fib6_walker and enum fib_walk_state_t to fib6_walk_state as recommended by Cong Wang. Cc: Cong Wang <cwang@twopensource.com> Cc: YOSHIFUJI Hideaki <hideaki@yoshifuji.org> Cc: Martin Lau <kafai@fb.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip6_fib.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index cf485f9aa563..9221bf4c64f7 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -202,15 +202,25 @@ static inline void ip6_rt_put(struct rt6_info *rt)
202 dst_release(&rt->dst); 202 dst_release(&rt->dst);
203} 203}
204 204
205struct fib6_walker_t { 205enum fib6_walk_state {
206#ifdef CONFIG_IPV6_SUBTREES
207 FWS_S,
208#endif
209 FWS_L,
210 FWS_R,
211 FWS_C,
212 FWS_U
213};
214
215struct fib6_walker {
206 struct list_head lh; 216 struct list_head lh;
207 struct fib6_node *root, *node; 217 struct fib6_node *root, *node;
208 struct rt6_info *leaf; 218 struct rt6_info *leaf;
209 unsigned char state; 219 enum fib6_walk_state state;
210 unsigned char prune; 220 bool prune;
211 unsigned int skip; 221 unsigned int skip;
212 unsigned int count; 222 unsigned int count;
213 int (*func)(struct fib6_walker_t *); 223 int (*func)(struct fib6_walker *);
214 void *args; 224 void *args;
215}; 225};
216 226