aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-08-11 02:08:33 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:54:24 -0400
commit2dfe55b47e3d66ded5a84caf71e0da5710edf48b (patch)
treef3818a7016985f79856212d797921e319bff8cd2 /include
parentd924424aaed116b362c6d0e667d912b77e655085 (diff)
[NET]: Use u32 for routing table IDs
Use u32 for routing table IDs in net/ipv4 and net/decnet in preparation of support for a larger number of routing tables. net/ipv6 already uses u32 everywhere and needs no further changes. No functional changes are made by this patch. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/dn_fib.h4
-rw-r--r--include/net/ip_fib.h14
2 files changed, 9 insertions, 9 deletions
diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h
index 32bc8ce5c5ce..cd9c3782f838 100644
--- a/include/net/dn_fib.h
+++ b/include/net/dn_fib.h
@@ -94,7 +94,7 @@ struct dn_fib_node {
94 94
95 95
96struct dn_fib_table { 96struct dn_fib_table {
97 int n; 97 u32 n;
98 98
99 int (*insert)(struct dn_fib_table *t, struct rtmsg *r, 99 int (*insert)(struct dn_fib_table *t, struct rtmsg *r,
100 struct dn_kern_rta *rta, struct nlmsghdr *n, 100 struct dn_kern_rta *rta, struct nlmsghdr *n,
@@ -137,7 +137,7 @@ extern int dn_fib_sync_up(struct net_device *dev);
137/* 137/*
138 * dn_tables.c 138 * dn_tables.c
139 */ 139 */
140extern struct dn_fib_table *dn_fib_get_table(int n, int creat); 140extern struct dn_fib_table *dn_fib_get_table(u32 n, int creat);
141extern struct dn_fib_table *dn_fib_empty_table(void); 141extern struct dn_fib_table *dn_fib_empty_table(void);
142extern void dn_fib_table_init(void); 142extern void dn_fib_table_init(void);
143extern void dn_fib_table_cleanup(void); 143extern void dn_fib_table_cleanup(void);
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index adf73586bc05..0dcbf166eb94 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -150,7 +150,7 @@ struct fib_result_nl {
150#endif /* CONFIG_IP_ROUTE_MULTIPATH_WRANDOM */ 150#endif /* CONFIG_IP_ROUTE_MULTIPATH_WRANDOM */
151 151
152struct fib_table { 152struct fib_table {
153 unsigned char tb_id; 153 u32 tb_id;
154 unsigned tb_stamp; 154 unsigned tb_stamp;
155 int (*tb_lookup)(struct fib_table *tb, const struct flowi *flp, struct fib_result *res); 155 int (*tb_lookup)(struct fib_table *tb, const struct flowi *flp, struct fib_result *res);
156 int (*tb_insert)(struct fib_table *table, struct rtmsg *r, 156 int (*tb_insert)(struct fib_table *table, struct rtmsg *r,
@@ -173,14 +173,14 @@ struct fib_table {
173extern struct fib_table *ip_fib_local_table; 173extern struct fib_table *ip_fib_local_table;
174extern struct fib_table *ip_fib_main_table; 174extern struct fib_table *ip_fib_main_table;
175 175
176static inline struct fib_table *fib_get_table(int id) 176static inline struct fib_table *fib_get_table(u32 id)
177{ 177{
178 if (id != RT_TABLE_LOCAL) 178 if (id != RT_TABLE_LOCAL)
179 return ip_fib_main_table; 179 return ip_fib_main_table;
180 return ip_fib_local_table; 180 return ip_fib_local_table;
181} 181}
182 182
183static inline struct fib_table *fib_new_table(int id) 183static inline struct fib_table *fib_new_table(u32 id)
184{ 184{
185 return fib_get_table(id); 185 return fib_get_table(id);
186} 186}
@@ -205,9 +205,9 @@ static inline void fib_select_default(const struct flowi *flp, struct fib_result
205 205
206extern struct fib_table * fib_tables[RT_TABLE_MAX+1]; 206extern struct fib_table * fib_tables[RT_TABLE_MAX+1];
207extern int fib_lookup(struct flowi *flp, struct fib_result *res); 207extern int fib_lookup(struct flowi *flp, struct fib_result *res);
208extern struct fib_table *__fib_new_table(int id); 208extern struct fib_table *__fib_new_table(u32 id);
209 209
210static inline struct fib_table *fib_get_table(int id) 210static inline struct fib_table *fib_get_table(u32 id)
211{ 211{
212 if (id == 0) 212 if (id == 0)
213 id = RT_TABLE_MAIN; 213 id = RT_TABLE_MAIN;
@@ -215,7 +215,7 @@ static inline struct fib_table *fib_get_table(int id)
215 return fib_tables[id]; 215 return fib_tables[id];
216} 216}
217 217
218static inline struct fib_table *fib_new_table(int id) 218static inline struct fib_table *fib_new_table(u32 id)
219{ 219{
220 if (id == 0) 220 if (id == 0)
221 id = RT_TABLE_MAIN; 221 id = RT_TABLE_MAIN;
@@ -248,7 +248,7 @@ extern int fib_convert_rtentry(int cmd, struct nlmsghdr *nl, struct rtmsg *rtm,
248extern u32 __fib_res_prefsrc(struct fib_result *res); 248extern u32 __fib_res_prefsrc(struct fib_result *res);
249 249
250/* Exported by fib_hash.c */ 250/* Exported by fib_hash.c */
251extern struct fib_table *fib_hash_init(int id); 251extern struct fib_table *fib_hash_init(u32 id);
252 252
253#ifdef CONFIG_IP_MULTIPLE_TABLES 253#ifdef CONFIG_IP_MULTIPLE_TABLES
254extern int fib4_rules_dump(struct sk_buff *skb, struct netlink_callback *cb); 254extern int fib4_rules_dump(struct sk_buff *skb, struct netlink_callback *cb);