aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip_fib.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-02-17 12:27:37 -0500
committerThomas Gleixner <tglx@linutronix.de>2010-02-17 12:28:05 -0500
commitb7e56edba4b02f2079042c326a8cd72a44635817 (patch)
treeb5042002e9747cd8fb1278d61f86d8b92a74c018 /include/net/ip_fib.h
parent13ca0fcaa33f6b1984c4111b6ec5df42689fea6f (diff)
parentb0483e78e5c4c9871fc5541875b3bc006846d46b (diff)
Merge branch 'linus' into x86/mm
x86/mm is on 32-rc4 and missing the spinlock namespace changes which are needed for further commits into this topic. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/net/ip_fib.h')
-rw-r--r--include/net/ip_fib.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index ef91fe924ba4..c93f94edc610 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -144,18 +144,21 @@ struct fib_table {
144 struct hlist_node tb_hlist; 144 struct hlist_node tb_hlist;
145 u32 tb_id; 145 u32 tb_id;
146 int tb_default; 146 int tb_default;
147 int (*tb_lookup)(struct fib_table *tb, const struct flowi *flp, struct fib_result *res);
148 int (*tb_insert)(struct fib_table *, struct fib_config *);
149 int (*tb_delete)(struct fib_table *, struct fib_config *);
150 int (*tb_dump)(struct fib_table *table, struct sk_buff *skb,
151 struct netlink_callback *cb);
152 int (*tb_flush)(struct fib_table *table);
153 void (*tb_select_default)(struct fib_table *table,
154 const struct flowi *flp, struct fib_result *res);
155
156 unsigned char tb_data[0]; 147 unsigned char tb_data[0];
157}; 148};
158 149
150extern int fib_table_lookup(struct fib_table *tb, const struct flowi *flp,
151 struct fib_result *res);
152extern int fib_table_insert(struct fib_table *, struct fib_config *);
153extern int fib_table_delete(struct fib_table *, struct fib_config *);
154extern int fib_table_dump(struct fib_table *table, struct sk_buff *skb,
155 struct netlink_callback *cb);
156extern int fib_table_flush(struct fib_table *table);
157extern void fib_table_select_default(struct fib_table *table,
158 const struct flowi *flp,
159 struct fib_result *res);
160
161
159#ifndef CONFIG_IP_MULTIPLE_TABLES 162#ifndef CONFIG_IP_MULTIPLE_TABLES
160 163
161#define TABLE_LOCAL_INDEX 0 164#define TABLE_LOCAL_INDEX 0
@@ -182,11 +185,11 @@ static inline int fib_lookup(struct net *net, const struct flowi *flp,
182 struct fib_table *table; 185 struct fib_table *table;
183 186
184 table = fib_get_table(net, RT_TABLE_LOCAL); 187 table = fib_get_table(net, RT_TABLE_LOCAL);
185 if (!table->tb_lookup(table, flp, res)) 188 if (!fib_table_lookup(table, flp, res))
186 return 0; 189 return 0;
187 190
188 table = fib_get_table(net, RT_TABLE_MAIN); 191 table = fib_get_table(net, RT_TABLE_MAIN);
189 if (!table->tb_lookup(table, flp, res)) 192 if (!fib_table_lookup(table, flp, res))
190 return 0; 193 return 0;
191 return -ENETUNREACH; 194 return -ENETUNREACH;
192} 195}
@@ -210,7 +213,8 @@ extern struct fib_table *fib_get_table(struct net *net, u32 id);
210extern const struct nla_policy rtm_ipv4_policy[]; 213extern const struct nla_policy rtm_ipv4_policy[];
211extern void ip_fib_init(void); 214extern void ip_fib_init(void);
212extern int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif, 215extern int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
213 struct net_device *dev, __be32 *spec_dst, u32 *itag); 216 struct net_device *dev, __be32 *spec_dst,
217 u32 *itag, u32 mark);
214extern void fib_select_default(struct net *net, const struct flowi *flp, 218extern void fib_select_default(struct net *net, const struct flowi *flp,
215 struct fib_result *res); 219 struct fib_result *res);
216 220