aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
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 /net/ipv4
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 'net/ipv4')
-rw-r--r--net/ipv4/fib_frontend.c8
-rw-r--r--net/ipv4/fib_hash.c4
-rw-r--r--net/ipv4/fib_lookup.h4
-rw-r--r--net/ipv4/fib_rules.c2
-rw-r--r--net/ipv4/fib_semantics.c4
-rw-r--r--net/ipv4/fib_trie.c6
6 files changed, 14 insertions, 14 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index a83f1aa8034e..06f4b23f6f57 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -62,7 +62,7 @@ struct fib_table *ip_fib_main_table;
62 62
63struct fib_table *fib_tables[RT_TABLE_MAX+1]; 63struct fib_table *fib_tables[RT_TABLE_MAX+1];
64 64
65struct fib_table *__fib_new_table(int id) 65struct fib_table *__fib_new_table(u32 id)
66{ 66{
67 struct fib_table *tb; 67 struct fib_table *tb;
68 68
@@ -82,7 +82,7 @@ static void fib_flush(void)
82 int flushed = 0; 82 int flushed = 0;
83#ifdef CONFIG_IP_MULTIPLE_TABLES 83#ifdef CONFIG_IP_MULTIPLE_TABLES
84 struct fib_table *tb; 84 struct fib_table *tb;
85 int id; 85 u32 id;
86 86
87 for (id = RT_TABLE_MAX; id>0; id--) { 87 for (id = RT_TABLE_MAX; id>0; id--) {
88 if ((tb = fib_get_table(id))==NULL) 88 if ((tb = fib_get_table(id))==NULL)
@@ -333,8 +333,8 @@ int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
333 333
334int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb) 334int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
335{ 335{
336 int t; 336 u32 t;
337 int s_t; 337 u32 s_t;
338 struct fib_table *tb; 338 struct fib_table *tb;
339 339
340 if (NLMSG_PAYLOAD(cb->nlh, 0) >= sizeof(struct rtmsg) && 340 if (NLMSG_PAYLOAD(cb->nlh, 0) >= sizeof(struct rtmsg) &&
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 72c633b357cf..f8d5c8024ccb 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -765,9 +765,9 @@ static int fn_hash_dump(struct fib_table *tb, struct sk_buff *skb, struct netlin
765} 765}
766 766
767#ifdef CONFIG_IP_MULTIPLE_TABLES 767#ifdef CONFIG_IP_MULTIPLE_TABLES
768struct fib_table * fib_hash_init(int id) 768struct fib_table * fib_hash_init(u32 id)
769#else 769#else
770struct fib_table * __init fib_hash_init(int id) 770struct fib_table * __init fib_hash_init(u32 id)
771#endif 771#endif
772{ 772{
773 struct fib_table *tb; 773 struct fib_table *tb;
diff --git a/net/ipv4/fib_lookup.h b/net/ipv4/fib_lookup.h
index ef6609ea0eb7..ddd52496b451 100644
--- a/net/ipv4/fib_lookup.h
+++ b/net/ipv4/fib_lookup.h
@@ -30,11 +30,11 @@ extern struct fib_info *fib_create_info(const struct rtmsg *r,
30extern int fib_nh_match(struct rtmsg *r, struct nlmsghdr *, 30extern int fib_nh_match(struct rtmsg *r, struct nlmsghdr *,
31 struct kern_rta *rta, struct fib_info *fi); 31 struct kern_rta *rta, struct fib_info *fi);
32extern int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, 32extern int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
33 u8 tb_id, u8 type, u8 scope, void *dst, 33 u32 tb_id, u8 type, u8 scope, void *dst,
34 int dst_len, u8 tos, struct fib_info *fi, 34 int dst_len, u8 tos, struct fib_info *fi,
35 unsigned int); 35 unsigned int);
36extern void rtmsg_fib(int event, u32 key, struct fib_alias *fa, 36extern void rtmsg_fib(int event, u32 key, struct fib_alias *fa,
37 int z, int tb_id, 37 int z, u32 tb_id,
38 struct nlmsghdr *n, struct netlink_skb_parms *req); 38 struct nlmsghdr *n, struct netlink_skb_parms *req);
39extern struct fib_alias *fib_find_alias(struct list_head *fah, 39extern struct fib_alias *fib_find_alias(struct list_head *fah,
40 u8 tos, u32 prio); 40 u8 tos, u32 prio);
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index d242e5291fcc..58fb91b00fdf 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -169,7 +169,7 @@ static int fib4_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
169 169
170static struct fib_table *fib_empty_table(void) 170static struct fib_table *fib_empty_table(void)
171{ 171{
172 int id; 172 u32 id;
173 173
174 for (id = 1; id <= RT_TABLE_MAX; id++) 174 for (id = 1; id <= RT_TABLE_MAX; id++)
175 if (fib_tables[id] == NULL) 175 if (fib_tables[id] == NULL)
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 38bca473c7e2..c7a112b5a185 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -273,7 +273,7 @@ int ip_fib_check_default(u32 gw, struct net_device *dev)
273} 273}
274 274
275void rtmsg_fib(int event, u32 key, struct fib_alias *fa, 275void rtmsg_fib(int event, u32 key, struct fib_alias *fa,
276 int z, int tb_id, 276 int z, u32 tb_id,
277 struct nlmsghdr *n, struct netlink_skb_parms *req) 277 struct nlmsghdr *n, struct netlink_skb_parms *req)
278{ 278{
279 struct sk_buff *skb; 279 struct sk_buff *skb;
@@ -939,7 +939,7 @@ u32 __fib_res_prefsrc(struct fib_result *res)
939 939
940int 940int
941fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, 941fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
942 u8 tb_id, u8 type, u8 scope, void *dst, int dst_len, u8 tos, 942 u32 tb_id, u8 type, u8 scope, void *dst, int dst_len, u8 tos,
943 struct fib_info *fi, unsigned int flags) 943 struct fib_info *fi, unsigned int flags)
944{ 944{
945 struct rtmsg *rtm; 945 struct rtmsg *rtm;
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 01801c0f885d..4a27b2d573a3 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1148,7 +1148,7 @@ fn_trie_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
1148 1148
1149 key = ntohl(key); 1149 key = ntohl(key);
1150 1150
1151 pr_debug("Insert table=%d %08x/%d\n", tb->tb_id, key, plen); 1151 pr_debug("Insert table=%u %08x/%d\n", tb->tb_id, key, plen);
1152 1152
1153 mask = ntohl(inet_make_mask(plen)); 1153 mask = ntohl(inet_make_mask(plen));
1154 1154
@@ -1943,9 +1943,9 @@ out:
1943/* Fix more generic FIB names for init later */ 1943/* Fix more generic FIB names for init later */
1944 1944
1945#ifdef CONFIG_IP_MULTIPLE_TABLES 1945#ifdef CONFIG_IP_MULTIPLE_TABLES
1946struct fib_table * fib_hash_init(int id) 1946struct fib_table * fib_hash_init(u32 id)
1947#else 1947#else
1948struct fib_table * __init fib_hash_init(int id) 1948struct fib_table * __init fib_hash_init(u32 id)
1949#endif 1949#endif
1950{ 1950{
1951 struct fib_table *tb; 1951 struct fib_table *tb;