Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ip_fib.h File Reference
#include <net/flow.h>
#include <linux/seq_file.h>
#include <linux/rcupdate.h>
#include <net/fib_rules.h>
#include <net/inetpeer.h>
#include <linux/percpu.h>

Go to the source code of this file.

Data Structures

struct  fib_config
 
struct  fib_nh_exception
 
struct  fnhe_hash_bucket
 
struct  fib_nh
 
struct  fib_info
 
struct  fib_result
 
struct  fib_result_nl
 
struct  fib_table
 

Macros

#define FNHE_HASH_SIZE   2048
 
#define FNHE_RECLAIM_DEPTH   5
 
#define fib_mtu   fib_metrics[RTAX_MTU-1]
 
#define fib_window   fib_metrics[RTAX_WINDOW-1]
 
#define fib_rtt   fib_metrics[RTAX_RTT-1]
 
#define fib_advmss   fib_metrics[RTAX_ADVMSS-1]
 
#define fib_dev   fib_nh[0].nh_dev
 
#define FIB_RES_NH(res)   ((res).fi->fib_nh[0])
 
#define FIB_TABLE_HASHSZ   256
 
#define FIB_RES_SADDR(net, res)
 
#define FIB_RES_GW(res)   (FIB_RES_NH(res).nh_gw)
 
#define FIB_RES_DEV(res)   (FIB_RES_NH(res).nh_dev)
 
#define FIB_RES_OIF(res)   (FIB_RES_NH(res).nh_oif)
 
#define FIB_RES_PREFSRC(net, res)
 
#define TABLE_LOCAL_INDEX   0
 
#define TABLE_MAIN_INDEX   1
 

Functions

__be32 fib_info_update_nh_saddr (struct net *net, struct fib_nh *nh)
 
int fib_table_lookup (struct fib_table *tb, const struct flowi4 *flp, struct fib_result *res, int fib_flags)
 
int fib_table_insert (struct fib_table *, struct fib_config *)
 
int fib_table_delete (struct fib_table *, struct fib_config *)
 
int fib_table_dump (struct fib_table *table, struct sk_buff *skb, struct netlink_callback *cb)
 
int fib_table_flush (struct fib_table *table)
 
void fib_free_table (struct fib_table *tb)
 
void ip_fib_init (void)
 
__be32 fib_compute_spec_dst (struct sk_buff *skb)
 
int fib_validate_source (struct sk_buff *skb, __be32 src, __be32 dst, u8 tos, int oif, struct net_device *dev, struct in_device *idev, u32 *itag)
 
void fib_select_default (struct fib_result *res)
 
int ip_fib_check_default (__be32 gw, struct net_device *dev)
 
int fib_sync_down_dev (struct net_device *dev, int force)
 
int fib_sync_down_addr (struct net *net, __be32 local)
 
void fib_update_nh_saddrs (struct net_device *dev)
 
int fib_sync_up (struct net_device *dev)
 
void fib_select_multipath (struct fib_result *res)
 
void fib_trie_init (void)
 
struct fib_tablefib_trie_table (u32 id)
 
void free_fib_info (struct fib_info *fi)
 

Variables

struct nla_policy rtm_ipv4_policy []
 

Macro Definition Documentation

#define fib_advmss   fib_metrics[RTAX_ADVMSS-1]

Definition at line 112 of file ip_fib.h.

#define fib_dev   fib_nh[0].nh_dev

Definition at line 119 of file ip_fib.h.

#define fib_mtu   fib_metrics[RTAX_MTU-1]

Definition at line 109 of file ip_fib.h.

#define FIB_RES_DEV (   res)    (FIB_RES_NH(res).nh_dev)

Definition at line 176 of file ip_fib.h.

#define FIB_RES_GW (   res)    (FIB_RES_NH(res).nh_gw)

Definition at line 175 of file ip_fib.h.

#define FIB_RES_NH (   res)    ((res).fi->fib_nh[0])

Definition at line 162 of file ip_fib.h.

#define FIB_RES_OIF (   res)    (FIB_RES_NH(res).nh_oif)

Definition at line 177 of file ip_fib.h.

#define FIB_RES_PREFSRC (   net,
  res 
)
Value:
((res).fi->fib_prefsrc ? : \

Definition at line 179 of file ip_fib.h.

#define FIB_RES_SADDR (   net,
  res 
)
Value:
((FIB_RES_NH(res).nh_saddr_genid == \
atomic_read(&(net)->ipv4.dev_addr_genid)) ? \
FIB_RES_NH(res).nh_saddr : \
fib_info_update_nh_saddr((net), &FIB_RES_NH(res)))

Definition at line 170 of file ip_fib.h.

#define fib_rtt   fib_metrics[RTAX_RTT-1]

Definition at line 111 of file ip_fib.h.

#define FIB_TABLE_HASHSZ   256

Definition at line 164 of file ip_fib.h.

#define fib_window   fib_metrics[RTAX_WINDOW-1]

Definition at line 110 of file ip_fib.h.

#define FNHE_HASH_SIZE   2048

Definition at line 66 of file ip_fib.h.

#define FNHE_RECLAIM_DEPTH   5

Definition at line 67 of file ip_fib.h.

#define TABLE_LOCAL_INDEX   0

Definition at line 203 of file ip_fib.h.

#define TABLE_MAIN_INDEX   1

Definition at line 204 of file ip_fib.h.

Function Documentation

__be32 fib_compute_spec_dst ( struct sk_buff skb)

Definition at line 198 of file fib_frontend.c.

void fib_free_table ( struct fib_table tb)

Definition at line 1852 of file fib_trie.c.

__be32 fib_info_update_nh_saddr ( struct net net,
struct fib_nh nh 
)

Definition at line 765 of file fib_semantics.c.

void fib_select_default ( struct fib_result res)

Definition at line 1169 of file fib_semantics.c.

void fib_select_multipath ( struct fib_result res)
int fib_sync_down_addr ( struct net net,
__be32  local 
)

Definition at line 1094 of file fib_semantics.c.

int fib_sync_down_dev ( struct net_device dev,
int  force 
)

Definition at line 1116 of file fib_semantics.c.

int fib_sync_up ( struct net_device dev)
int fib_table_delete ( struct fib_table ,
struct fib_config  
)

Definition at line 1633 of file fib_trie.c.

int fib_table_dump ( struct fib_table table,
struct sk_buff skb,
struct netlink_callback cb 
)

Definition at line 1928 of file fib_trie.c.

int fib_table_flush ( struct fib_table table)

Definition at line 1831 of file fib_trie.c.

int fib_table_insert ( struct fib_table ,
struct fib_config  
)

Definition at line 1183 of file fib_trie.c.

int fib_table_lookup ( struct fib_table tb,
const struct flowi4 flp,
struct fib_result res,
int  fib_flags 
)

Definition at line 1417 of file fib_trie.c.

void fib_trie_init ( void  )

Definition at line 1970 of file fib_trie.c.

struct fib_table* fib_trie_table ( u32  id)
read

Definition at line 1983 of file fib_trie.c.

void fib_update_nh_saddrs ( struct net_device dev)
int fib_validate_source ( struct sk_buff skb,
__be32  src,
__be32  dst,
u8  tos,
int  oif,
struct net_device dev,
struct in_device *  idev,
u32 itag 
)

Definition at line 319 of file fib_frontend.c.

void free_fib_info ( struct fib_info fi)

Definition at line 219 of file fib_semantics.c.

int ip_fib_check_default ( __be32  gw,
struct net_device dev 
)

Definition at line 331 of file fib_semantics.c.

void ip_fib_init ( void  )

Definition at line 1171 of file fib_frontend.c.

Variable Documentation

struct nla_policy rtm_ipv4_policy[]

Definition at line 525 of file fib_frontend.c.