ip6_fib.h (bba73071b6f71be0a101658d7c13866e30b264a6) | ip6_fib.h (b75cc8f90f07342467b3bd51dbc0054f185032c9) |
---|---|
1/* 2 * Linux INET6 implementation 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 336 unchanged lines hidden (view full) --- 345#else 346#define FIB6_TABLE_MIN RT_TABLE_MAIN 347#define FIB6_TABLE_MAX FIB6_TABLE_MIN 348#define RT6_TABLE_LOCAL RT6_TABLE_MAIN 349#endif 350 351typedef struct rt6_info *(*pol_lookup_t)(struct net *, 352 struct fib6_table *, | 1/* 2 * Linux INET6 implementation 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 336 unchanged lines hidden (view full) --- 345#else 346#define FIB6_TABLE_MIN RT_TABLE_MAIN 347#define FIB6_TABLE_MAX FIB6_TABLE_MIN 348#define RT6_TABLE_LOCAL RT6_TABLE_MAIN 349#endif 350 351typedef struct rt6_info *(*pol_lookup_t)(struct net *, 352 struct fib6_table *, |
353 struct flowi6 *, int); | 353 struct flowi6 *, 354 const struct sk_buff *, int); |
354 355struct fib6_entry_notifier_info { 356 struct fib_notifier_info info; /* must be first */ 357 struct rt6_info *rt; 358}; 359 360/* 361 * exported functions 362 */ 363 364struct fib6_table *fib6_get_table(struct net *net, u32 id); 365struct fib6_table *fib6_new_table(struct net *net, u32 id); 366struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6, | 355 356struct fib6_entry_notifier_info { 357 struct fib_notifier_info info; /* must be first */ 358 struct rt6_info *rt; 359}; 360 361/* 362 * exported functions 363 */ 364 365struct fib6_table *fib6_get_table(struct net *net, u32 id); 366struct fib6_table *fib6_new_table(struct net *net, u32 id); 367struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6, |
368 const struct sk_buff *skb, |
|
367 int flags, pol_lookup_t lookup); 368 369struct fib6_node *fib6_lookup(struct fib6_node *root, 370 const struct in6_addr *daddr, 371 const struct in6_addr *saddr); 372 373struct fib6_node *fib6_locate(struct fib6_node *root, 374 const struct in6_addr *daddr, int dst_len, --- 35 unchanged lines hidden (view full) --- 410void fib6_update_sernum_upto_root(struct net *net, struct rt6_info *rt); 411 412#ifdef CONFIG_IPV6_MULTIPLE_TABLES 413int fib6_rules_init(void); 414void fib6_rules_cleanup(void); 415bool fib6_rule_default(const struct fib_rule *rule); 416int fib6_rules_dump(struct net *net, struct notifier_block *nb); 417unsigned int fib6_rules_seq_read(struct net *net); | 369 int flags, pol_lookup_t lookup); 370 371struct fib6_node *fib6_lookup(struct fib6_node *root, 372 const struct in6_addr *daddr, 373 const struct in6_addr *saddr); 374 375struct fib6_node *fib6_locate(struct fib6_node *root, 376 const struct in6_addr *daddr, int dst_len, --- 35 unchanged lines hidden (view full) --- 412void fib6_update_sernum_upto_root(struct net *net, struct rt6_info *rt); 413 414#ifdef CONFIG_IPV6_MULTIPLE_TABLES 415int fib6_rules_init(void); 416void fib6_rules_cleanup(void); 417bool fib6_rule_default(const struct fib_rule *rule); 418int fib6_rules_dump(struct net *net, struct notifier_block *nb); 419unsigned int fib6_rules_seq_read(struct net *net); |
420 421static inline bool fib6_rules_early_flow_dissect(struct net *net, 422 struct sk_buff *skb, 423 struct flowi6 *fl6, 424 struct flow_keys *flkeys) 425{ 426 unsigned int flag = FLOW_DISSECTOR_F_STOP_AT_ENCAP; 427 428 if (!net->ipv6.fib6_rules_require_fldissect) 429 return false; 430 431 skb_flow_dissect_flow_keys(skb, flkeys, flag); 432 fl6->fl6_sport = flkeys->ports.src; 433 fl6->fl6_dport = flkeys->ports.dst; 434 fl6->flowi6_proto = flkeys->basic.ip_proto; 435 436 return true; 437} |
|
418#else 419static inline int fib6_rules_init(void) 420{ 421 return 0; 422} 423static inline void fib6_rules_cleanup(void) 424{ 425 return ; --- 5 unchanged lines hidden (view full) --- 431static inline int fib6_rules_dump(struct net *net, struct notifier_block *nb) 432{ 433 return 0; 434} 435static inline unsigned int fib6_rules_seq_read(struct net *net) 436{ 437 return 0; 438} | 438#else 439static inline int fib6_rules_init(void) 440{ 441 return 0; 442} 443static inline void fib6_rules_cleanup(void) 444{ 445 return ; --- 5 unchanged lines hidden (view full) --- 451static inline int fib6_rules_dump(struct net *net, struct notifier_block *nb) 452{ 453 return 0; 454} 455static inline unsigned int fib6_rules_seq_read(struct net *net) 456{ 457 return 0; 458} |
459static inline bool fib6_rules_early_flow_dissect(struct net *net, 460 struct sk_buff *skb, 461 struct flowi6 *fl6, 462 struct flow_keys *flkeys) 463{ 464 return false; 465} |
|
439#endif 440#endif | 466#endif 467#endif |