4 #include <linux/config.h>
6 #ifdef CONFIG_DECNET_ROUTER
16 struct dn_fib_node
*res_fn
;
17 struct dn_fib_action
*res_fa
;
20 struct dn_fib_action
{
21 struct dn_fib_action
*fa_next
;
29 struct neighbour
*fau_neigh
; /* Normal route */
30 int fau_error
; /* Reject */
31 int fau_table
; /* Throw */
33 #define fa_neigh fa_u.fau_neigh
34 #define fa_error fa_u.fau_error
35 #define fa_table fa_u.fau_table
39 struct dn_fib_node
*fn_up
;
40 dn_address fn_cmpmask
;
43 struct dn_fib_action
*fn_action
;
44 struct dn_fib_node
*fn_children
[2];
47 #define DN_FIB_NEXT(fibnode, key) ((fibnode)->fn_children[((key) ^ (fibnode)->fn_cmpmask) >> (fibnode)->fn_shift])
49 struct dn_fib_walker_t
;
54 struct dn_fib_node
*root
;
56 int (*insert
)(struct dn_fib_table
*t
, struct dn_fib_action
*fa
);
57 int (*delete)(struct dn_fib_table
*t
, struct dn_fib_action
*fa
);
58 int (*lookup
)(struct dn_fib_table
*t
, struct dn_fib_res
*res
);
59 int (*walk
)(struct dn_fib_walker_t
*fwt
);
60 #ifdef CONFIG_RTNETLINK
61 int (*dump
)(struct dn_fib_table
*t
, struct sk_buff
*skb
, struct netlink_callback
*cb
);
62 #endif /* CONFIG_RTNETLINK */
65 struct dn_fib_walker_t
{
66 struct dn_fib_table
*table
;
68 int (*fxn
)(struct dn_fib_walker_t
*fwt
, struct dn_fib_node
*n
);
71 extern void dn_fib_init(void);
72 extern void dn_fib_cleanup(void);
74 extern int dn_fib_rt_message(struct sk_buff
*skb
);
75 extern int dn_fib_ioctl(struct socket
*sock
, unsigned int cmd
, unsigned long arg
);
77 #ifdef CONFIG_RTNETLINK
78 extern int dn_fib_rtm_delroute(struct sk_buff
*skb
, struct nlmsghdr
*nlh
, void *arg
);
79 extern int dn_fib_rtm_newroute(struct sk_buff
*skb
, struct nlmsghdr
*nlh
, void *arg
);
80 extern int dn_fib_dump(struct sk_buff
*skb
, struct netlink_callback
*cb
);
81 extern int dn_fib_rtm_getroute(struct sk_buff
*skb
, struct nlmsghdr
*nlh
, void *arg
);
82 #endif /* CONFIG_RTNETLINK */
83 #endif /* CONFIG_DECNET_ROUTER */
85 #endif /* _NET_DN_FIB_H */