FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
fib_entry.h File Reference
+ Include dependency graph for fib_entry.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fib_entry_src_t_
 Information related to the source of a FIB entry. More...
 
struct  fib_entry_t_
 An entry in a FIB table. More...
 

Macros

#define FIB_SOURCE_MAX   (FIB_SOURCE_LAST+1)
 The maximum number of sources. More...
 
#define FIB_SOURCES
 
#define FOR_EACH_FIB_SOURCE(_item)   for (_item = FIB_SOURCE_FIRST; _item < FIB_SOURCE_MAX; _item++)
 
#define FIB_ENTRY_ATTRIBUTES
 
#define FOR_EACH_FIB_ATTRIBUTE(_item)
 
#define FIB_ENTRY_SRC_ATTRIBUTES
 
#define FOR_EACH_FIB_SRC_ATTRIBUTE(_item)
 
#define FOR_EACH_FIB_ENTRY_FLAG(_item)   for (_item = FIB_ENTRY_FLAG_FIRST; _item < FIB_ENTRY_FLAG_MAX; _item++)
 
#define FIB_ENTRY_FORMAT_BRIEF   (0x0)
 
#define FIB_ENTRY_FORMAT_DETAIL   (0x1)
 
#define FIB_ENTRY_FORMAT_DETAIL2   (0x2)
 

Typedefs

typedef enum fib_source_t_ fib_source_t
 The different sources that can create a route. More...
 
typedef enum fib_entry_attribute_t_ fib_entry_attribute_t
 The different sources that can create a route. More...
 
typedef enum fib_entry_flag_t_ fib_entry_flag_t
 
typedef enum fib_entry_src_attribute_t_ fib_entry_src_attribute_t
 Flags for the source data. More...
 
typedef enum fib_entry_src_flag_t_ fib_entry_src_flag_t
 
typedef struct fib_entry_src_t_ fib_entry_src_t
 Information related to the source of a FIB entry. More...
 
typedef struct fib_entry_t_ fib_entry_t
 An entry in a FIB table. More...
 

Enumerations

enum  fib_source_t_ {
  FIB_SOURCE_FIRST, FIB_SOURCE_SPECIAL = FIB_SOURCE_FIRST, FIB_SOURCE_CLASSIFY, FIB_SOURCE_PROXY,
  FIB_SOURCE_INTERFACE, FIB_SOURCE_SR, FIB_SOURCE_PLUGIN_HI, FIB_SOURCE_BIER,
  FIB_SOURCE_API, FIB_SOURCE_CLI, FIB_SOURCE_PLUGIN_LOW, FIB_SOURCE_LISP,
  FIB_SOURCE_MAP, FIB_SOURCE_DHCP, FIB_SOURCE_IP6_ND_PROXY, FIB_SOURCE_IP6_ND,
  FIB_SOURCE_ADJ, FIB_SOURCE_MPLS, FIB_SOURCE_AE, FIB_SOURCE_RR,
  FIB_SOURCE_URPF_EXEMPT, FIB_SOURCE_DEFAULT_ROUTE, FIB_SOURCE_INTERPOSE, FIB_SOURCE_LAST = FIB_SOURCE_INTERPOSE
}
 The different sources that can create a route. More...
 
enum  fib_entry_attribute_t_ {
  FIB_ENTRY_ATTRIBUTE_FIRST, FIB_ENTRY_ATTRIBUTE_CONNECTED = FIB_ENTRY_ATTRIBUTE_FIRST, FIB_ENTRY_ATTRIBUTE_ATTACHED, FIB_ENTRY_ATTRIBUTE_DROP,
  FIB_ENTRY_ATTRIBUTE_EXCLUSIVE, FIB_ENTRY_ATTRIBUTE_IMPORT, FIB_ENTRY_ATTRIBUTE_LOCAL, FIB_ENTRY_ATTRIBUTE_MULTICAST,
  FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT, FIB_ENTRY_ATTRIBUTE_NO_ATTACHED_EXPORT, FIB_ENTRY_ATTRIBUTE_COVERED_INHERIT, FIB_ENTRY_ATTRIBUTE_INTERPOSE,
  FIB_ENTRY_ATTRIBUTE_LAST = FIB_ENTRY_ATTRIBUTE_INTERPOSE
}
 The different sources that can create a route. More...
 
enum  fib_entry_flag_t_ {
  FIB_ENTRY_FLAG_NONE = 0, FIB_ENTRY_FLAG_CONNECTED = (1 << FIB_ENTRY_ATTRIBUTE_CONNECTED), FIB_ENTRY_FLAG_ATTACHED = (1 << FIB_ENTRY_ATTRIBUTE_ATTACHED), FIB_ENTRY_FLAG_DROP = (1 << FIB_ENTRY_ATTRIBUTE_DROP),
  FIB_ENTRY_FLAG_EXCLUSIVE = (1 << FIB_ENTRY_ATTRIBUTE_EXCLUSIVE), FIB_ENTRY_FLAG_LOCAL = (1 << FIB_ENTRY_ATTRIBUTE_LOCAL), FIB_ENTRY_FLAG_IMPORT = (1 << FIB_ENTRY_ATTRIBUTE_IMPORT), FIB_ENTRY_FLAG_NO_ATTACHED_EXPORT = (1 << FIB_ENTRY_ATTRIBUTE_NO_ATTACHED_EXPORT),
  FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT = (1 << FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT), FIB_ENTRY_FLAG_MULTICAST = (1 << FIB_ENTRY_ATTRIBUTE_MULTICAST), FIB_ENTRY_FLAG_COVERED_INHERIT = (1 << FIB_ENTRY_ATTRIBUTE_COVERED_INHERIT), FIB_ENTRY_FLAG_INTERPOSE = (1 << FIB_ENTRY_ATTRIBUTE_INTERPOSE)
}
 
enum  fib_entry_src_attribute_t_ {
  FIB_ENTRY_SRC_ATTRIBUTE_FIRST, FIB_ENTRY_SRC_ATTRIBUTE_ADDED = FIB_ENTRY_SRC_ATTRIBUTE_FIRST, FIB_ENTRY_SRC_ATTRIBUTE_CONTRIBUTING, FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE,
  FIB_ENTRY_SRC_ATTRIBUTE_INHERITED, FIB_ENTRY_SRC_ATTRIBUTE_LAST = FIB_ENTRY_SRC_ATTRIBUTE_INHERITED
}
 Flags for the source data. More...
 
enum  fib_entry_src_flag_t_ {
  FIB_ENTRY_SRC_FLAG_NONE = 0, FIB_ENTRY_SRC_FLAG_ADDED = (1 << FIB_ENTRY_SRC_ATTRIBUTE_ADDED), FIB_ENTRY_SRC_FLAG_CONTRIBUTING = (1 << FIB_ENTRY_SRC_ATTRIBUTE_CONTRIBUTING), FIB_ENTRY_SRC_FLAG_ACTIVE = (1 << FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE),
  FIB_ENTRY_SRC_FLAG_INHERITED = (1 << FIB_ENTRY_SRC_ATTRIBUTE_INHERITED)
}
 

Functions

 STATIC_ASSERT (sizeof(fib_source_t)==1,"FIB too many sources")
 
 STATIC_ASSERT (sizeof(fib_entry_src_flag_t)<=2,"FIB entry flags field size too big")
 
u8format_fib_entry (u8 *s, va_list *args)
 
u8format_fib_source (u8 *s, va_list *args)
 
fib_node_index_t fib_entry_create_special (u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
 
fib_node_index_t fib_entry_create (u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *paths)
 
void fib_entry_update (fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *paths)
 fib_entry_update More...
 
void fib_entry_path_add (fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *rpath)
 
void fib_entry_special_add (fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
 
void fib_entry_special_update (fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
 
fib_entry_src_flag_t fib_entry_special_remove (fib_node_index_t fib_entry_index, fib_source_t source)
 
fib_entry_src_flag_t fib_entry_path_remove (fib_node_index_t fib_entry_index, fib_source_t source, const fib_route_path_t *rpath)
 
void fib_entry_inherit (fib_node_index_t cover, fib_node_index_t covered)
 fib_entry_inherit More...
 
fib_entry_src_flag_t fib_entry_delete (fib_node_index_t fib_entry_index, fib_source_t source)
 fib_entry_delete More...
 
void fib_entry_recalculate_forwarding (fib_node_index_t fib_entry_index)
 
void fib_entry_contribute_urpf (fib_node_index_t path_index, index_t urpf)
 Contribute the set of Adjacencies that this entry forwards with to build the uRPF list of its children. More...
 
void fib_entry_contribute_forwarding (fib_node_index_t fib_entry_index, fib_forward_chain_type_t type, dpo_id_t *dpo)
 
const dpo_id_tfib_entry_contribute_ip_forwarding (fib_node_index_t fib_entry_index)
 
adj_index_t fib_entry_get_adj_for_source (fib_node_index_t fib_entry_index, fib_source_t source)
 
const int fib_entry_get_dpo_for_source (fib_node_index_t fib_entry_index, fib_source_t source, dpo_id_t *dpo)
 
adj_index_t fib_entry_get_adj (fib_node_index_t fib_entry_index)
 
int fib_entry_cmp_for_sort (void *i1, void *i2)
 
void fib_entry_cover_changed (fib_node_index_t fib_entry)
 
void fib_entry_cover_updated (fib_node_index_t fib_entry)
 
int fib_entry_recursive_loop_detect (fib_node_index_t entry_index, fib_node_index_t **entry_indicies)
 
void fib_entry_lock (fib_node_index_t fib_entry_index)
 
void fib_entry_unlock (fib_node_index_t fib_entry_index)
 
u32 fib_entry_child_add (fib_node_index_t fib_entry_index, fib_node_type_t type, fib_node_index_t child_index)
 
void fib_entry_child_remove (fib_node_index_t fib_entry_index, u32 sibling_index)
 
u32 fib_entry_get_resolving_interface (fib_node_index_t fib_entry_index)
 
u32 fib_entry_get_resolving_interface_for_source (fib_node_index_t fib_entry_index, fib_source_t source)
 
void fib_entry_encode (fib_node_index_t fib_entry_index, fib_route_path_encode_t **api_rpaths)
 
void fib_entry_get_prefix (fib_node_index_t fib_entry_index, fib_prefix_t *pfx)
 
u32 fib_entry_get_fib_index (fib_node_index_t fib_entry_index)
 
void fib_entry_set_source_data (fib_node_index_t fib_entry_index, fib_source_t source, const void *data)
 
const void * fib_entry_get_source_data (fib_node_index_t fib_entry_index, fib_source_t source)
 
fib_entry_flag_t fib_entry_get_flags (fib_node_index_t fib_entry_index)
 
fib_entry_flag_t fib_entry_get_flags_for_source (fib_node_index_t fib_entry_index, fib_source_t source)
 
fib_source_t fib_entry_get_best_source (fib_node_index_t fib_entry_index)
 
int fib_entry_is_sourced (fib_node_index_t fib_entry_index, fib_source_t source)
 
fib_node_index_t fib_entry_get_path_list (fib_node_index_t fib_entry_index)
 
int fib_entry_is_resolved (fib_node_index_t fib_entry_index)
 Return !0 is the entry is reoslved, i.e. More...
 
int fib_entry_is_host (fib_node_index_t fib_entry_index)
 Return !0 is the entry represents a host prefix. More...
 
void fib_entry_set_flow_hash_config (fib_node_index_t fib_entry_index, flow_hash_config_t hash_config)
 
void fib_entry_module_init (void)
 
fib_node_index_t fib_entry_get_index (const fib_entry_t *fib_entry)
 
fib_entry_tfib_entry_get (fib_node_index_t fib_entry_index)
 
u32 fib_entry_pool_size (void)
 

Macro Definition Documentation

#define FIB_ENTRY_ATTRIBUTES
Value:
{ \
[FIB_ENTRY_ATTRIBUTE_CONNECTED] = "connected", \
[FIB_ENTRY_ATTRIBUTE_ATTACHED] = "attached", \
[FIB_ENTRY_ATTRIBUTE_EXCLUSIVE] = "exclusive", \
[FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT] = "uRPF-exempt", \
[FIB_ENTRY_ATTRIBUTE_MULTICAST] = "multicast", \
[FIB_ENTRY_ATTRIBUTE_NO_ATTACHED_EXPORT] = "no-attached-export", \
[FIB_ENTRY_ATTRIBUTE_COVERED_INHERIT] = "covered-inherit", \
[FIB_ENTRY_ATTRIBUTE_INTERPOSE] = "interpose", \
}
The prefix/address exempted from loose uRPF check To be used with caution.
Definition: fib_entry.h:228
Connected.
Definition: fib_entry.h:196
The prefix/address is local to this device.
Definition: fib_entry.h:218
This FIB entry imposes its source information on all prefixes that is covers.
Definition: fib_entry.h:237
The route is attached cross tables and thus imports covered prefixes from the other table...
Definition: fib_entry.h:214
The prefix/address exempted from attached export.
Definition: fib_entry.h:232
Attached.
Definition: fib_entry.h:200
The interpose attribute.
Definition: fib_entry.h:243
The route is an explicit drop.
Definition: fib_entry.h:204
The route is exclusive.
Definition: fib_entry.h:209
The prefix/address is a multicast prefix.
Definition: fib_entry.h:223

Definition at line 250 of file fib_entry.h.

#define FIB_ENTRY_FORMAT_BRIEF   (0x0)

Definition at line 507 of file fib_entry.h.

#define FIB_ENTRY_FORMAT_DETAIL   (0x1)

Definition at line 508 of file fib_entry.h.

#define FIB_ENTRY_FORMAT_DETAIL2   (0x2)

Definition at line 509 of file fib_entry.h.

#define FIB_ENTRY_SRC_ATTRIBUTES
Value:
{ \
}
the source is active/best
Definition: fib_entry.h:303
the source is contributing forwarding
Definition: fib_entry.h:299
the source is inherited from its cover
Definition: fib_entry.h:307
the source has been added to the entry
Definition: fib_entry.h:295

Definition at line 315 of file fib_entry.h.

#define FIB_SOURCE_MAX   (FIB_SOURCE_LAST+1)

The maximum number of sources.

Definition at line 153 of file fib_entry.h.

#define FIB_SOURCES
Value:
{ \
[FIB_SOURCE_SPECIAL] = "special", \
[FIB_SOURCE_INTERFACE] = "interface", \
[FIB_SOURCE_PROXY] = "proxy", \
[FIB_SOURCE_BIER] = "BIER", \
[FIB_SOURCE_API] = "API", \
[FIB_SOURCE_CLI] = "CLI", \
[FIB_SOURCE_ADJ] = "adjacency", \
[FIB_SOURCE_MAP] = "MAP", \
[FIB_SOURCE_SR] = "SR", \
[FIB_SOURCE_LISP] = "LISP", \
[FIB_SOURCE_CLASSIFY] = "classify", \
[FIB_SOURCE_DHCP] = "DHCP", \
[FIB_SOURCE_IP6_ND_PROXY] = "IPv6-proxy-nd", \
[FIB_SOURCE_IP6_ND] = "IPv6-nd", \
[FIB_SOURCE_RR] = "recursive-resolution", \
[FIB_SOURCE_AE] = "attached_export", \
[FIB_SOURCE_MPLS] = "mpls", \
[FIB_SOURCE_URPF_EXEMPT] = "urpf-exempt", \
[FIB_SOURCE_DEFAULT_ROUTE] = "default-route", \
[FIB_SOURCE_PLUGIN_HI] = "plugin-hi", \
[FIB_SOURCE_PLUGIN_LOW] = "plugin-low", \
[FIB_SOURCE_INTERPOSE] = "interpose", \
}
Recursive resolution source.
Definition: fib_entry.h:121
From the CLI.
Definition: fib_entry.h:74
Attached Export source.
Definition: fib_entry.h:116
uRPF bypass/exemption.
Definition: fib_entry.h:126
IPv[46] Mapping.
Definition: fib_entry.h:86
A high priority source a plugin can use.
Definition: fib_entry.h:62
MPLS label.
Definition: fib_entry.h:110
IPv6 ND (seen in the link-local tables)
Definition: fib_entry.h:98
Adjacency source.
Definition: fib_entry.h:104
From the BIER subsystem.
Definition: fib_entry.h:66
The default route source.
Definition: fib_entry.h:133
Classify.
Definition: fib_entry.h:44
The interpose source.
Definition: fib_entry.h:140
From the control plane API.
Definition: fib_entry.h:70
Route added as a result of interface configuration.
Definition: fib_entry.h:54
SRv6 and SR-MPLS.
Definition: fib_entry.h:58
DHCP.
Definition: fib_entry.h:90
A route the is being &#39;proxied&#39; on behalf of another device.
Definition: fib_entry.h:48
Special sources.
Definition: fib_entry.h:40
LISP.
Definition: fib_entry.h:82
A low (below routing) priority source a plugin can use.
Definition: fib_entry.h:78
IPv6 Proxy ND.
Definition: fib_entry.h:94

Definition at line 155 of file fib_entry.h.

#define FOR_EACH_FIB_ATTRIBUTE (   _item)
Value:

Definition at line 264 of file fib_entry.h.

#define FOR_EACH_FIB_ENTRY_FLAG (   _item)    for (_item = FIB_ENTRY_FLAG_FIRST; _item < FIB_ENTRY_FLAG_MAX; _item++)

Definition at line 504 of file fib_entry.h.

#define FOR_EACH_FIB_SOURCE (   _item)    for (_item = FIB_SOURCE_FIRST; _item < FIB_SOURCE_MAX; _item++)

Definition at line 180 of file fib_entry.h.

#define FOR_EACH_FIB_SRC_ATTRIBUTE (   _item)
Value:

Definition at line 322 of file fib_entry.h.

Typedef Documentation

The different sources that can create a route.

The sources are defined here the thier relative priority order. The lower the value the higher the priority

Flags for the source data.

Information related to the source of a FIB entry.

typedef struct fib_entry_t_ fib_entry_t

An entry in a FIB table.

This entry represents a route added to the FIB that is stored in one of the FIB tables.

The different sources that can create a route.

The sources are defined here the thier relative priority order. The lower the value the higher the priority

Enumeration Type Documentation

The different sources that can create a route.

The sources are defined here the thier relative priority order. The lower the value the higher the priority

Enumerator
FIB_ENTRY_ATTRIBUTE_FIRST 

Marker.

Add new values after this one.

FIB_ENTRY_ATTRIBUTE_CONNECTED 

Connected.

The prefix is configured on an interface.

FIB_ENTRY_ATTRIBUTE_ATTACHED 

Attached.

The prefix is attached to an interface.

FIB_ENTRY_ATTRIBUTE_DROP 

The route is an explicit drop.

FIB_ENTRY_ATTRIBUTE_EXCLUSIVE 

The route is exclusive.

The client creating the route is providing an exclusive adjacency.

FIB_ENTRY_ATTRIBUTE_IMPORT 

The route is attached cross tables and thus imports covered prefixes from the other table.

FIB_ENTRY_ATTRIBUTE_LOCAL 

The prefix/address is local to this device.

FIB_ENTRY_ATTRIBUTE_MULTICAST 

The prefix/address is a multicast prefix.

this aplies only to MPLS. IP multicast is handled by mfib

FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT 

The prefix/address exempted from loose uRPF check To be used with caution.

FIB_ENTRY_ATTRIBUTE_NO_ATTACHED_EXPORT 

The prefix/address exempted from attached export.

FIB_ENTRY_ATTRIBUTE_COVERED_INHERIT 

This FIB entry imposes its source information on all prefixes that is covers.

FIB_ENTRY_ATTRIBUTE_INTERPOSE 

The interpose attribute.

place the forwarding provided by the source infront of the forwarding provided by the best source, or failing that, by the cover.

FIB_ENTRY_ATTRIBUTE_LAST 

Marker.

add new entries before this one.

Definition at line 188 of file fib_entry.h.

Enumerator
FIB_ENTRY_FLAG_NONE 
FIB_ENTRY_FLAG_CONNECTED 
FIB_ENTRY_FLAG_ATTACHED 
FIB_ENTRY_FLAG_DROP 
FIB_ENTRY_FLAG_EXCLUSIVE 
FIB_ENTRY_FLAG_LOCAL 
FIB_ENTRY_FLAG_IMPORT 
FIB_ENTRY_FLAG_NO_ATTACHED_EXPORT 
FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT 
FIB_ENTRY_FLAG_MULTICAST 
FIB_ENTRY_FLAG_COVERED_INHERIT 
FIB_ENTRY_FLAG_INTERPOSE 

Definition at line 269 of file fib_entry.h.

Flags for the source data.

Enumerator
FIB_ENTRY_SRC_ATTRIBUTE_FIRST 

Marker.

Add new values after this one.

FIB_ENTRY_SRC_ATTRIBUTE_ADDED 

the source has been added to the entry

FIB_ENTRY_SRC_ATTRIBUTE_CONTRIBUTING 

the source is contributing forwarding

FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE 

the source is active/best

FIB_ENTRY_SRC_ATTRIBUTE_INHERITED 

the source is inherited from its cover

FIB_ENTRY_SRC_ATTRIBUTE_LAST 

Marker.

add new entries before this one.

Definition at line 287 of file fib_entry.h.

Enumerator
FIB_ENTRY_SRC_FLAG_NONE 
FIB_ENTRY_SRC_FLAG_ADDED 
FIB_ENTRY_SRC_FLAG_CONTRIBUTING 
FIB_ENTRY_SRC_FLAG_ACTIVE 
FIB_ENTRY_SRC_FLAG_INHERITED 

Definition at line 327 of file fib_entry.h.

The different sources that can create a route.

The sources are defined here the thier relative priority order. The lower the value the higher the priority

Enumerator
FIB_SOURCE_FIRST 

Marker.

Add new values after this one.

FIB_SOURCE_SPECIAL 

Special sources.

These are for entries that are added to all FIBs by default, and should never be over-ridden (hence they are the highest priority)

FIB_SOURCE_CLASSIFY 

Classify.

A route that links directly to a classify adj

FIB_SOURCE_PROXY 

A route the is being 'proxied' on behalf of another device.

FIB_SOURCE_INTERFACE 

Route added as a result of interface configuration.

this will also come from the API/CLI, but the distinction is that is from confiiguration on an interface, not a 'ip route' command

FIB_SOURCE_SR 

SRv6 and SR-MPLS.

FIB_SOURCE_PLUGIN_HI 

A high priority source a plugin can use.

FIB_SOURCE_BIER 

From the BIER subsystem.

FIB_SOURCE_API 

From the control plane API.

FIB_SOURCE_CLI 

From the CLI.

FIB_SOURCE_PLUGIN_LOW 

A low (below routing) priority source a plugin can use.

FIB_SOURCE_LISP 

LISP.

FIB_SOURCE_MAP 

IPv[46] Mapping.

FIB_SOURCE_DHCP 

DHCP.

FIB_SOURCE_IP6_ND_PROXY 

IPv6 Proxy ND.

FIB_SOURCE_IP6_ND 

IPv6 ND (seen in the link-local tables)

FIB_SOURCE_ADJ 

Adjacency source.

routes created as a result of ARP/ND entries. This is lower priority then the API/CLI. This is on purpose. trust me.

FIB_SOURCE_MPLS 

MPLS label.

The prefix has been assigned a local label. This source never provides forwarding information, instead it acts as a place-holder so the association of label to prefix can be maintained

FIB_SOURCE_AE 

Attached Export source.

routes created as a result of attahced export. routes thus sourced will be present in the export tables

FIB_SOURCE_RR 

Recursive resolution source.

Used to install an entry that is the resolution traget of another.

FIB_SOURCE_URPF_EXEMPT 

uRPF bypass/exemption.

Used to install an entry that is exempt from the loose uRPF check

FIB_SOURCE_DEFAULT_ROUTE 

The default route source.

The default route is always added to the FIB table (like the special sources) but we need to be able to over-ride it with 'ip route' sources when provided

FIB_SOURCE_INTERPOSE 

The interpose source.

This is not a real source, so don't use it to source a prefix. It exists here to provide a value against which to register to the VFT for providing the interpose actions to a real source.

FIB_SOURCE_LAST 

Marker.

add new entries before this one.

Definition at line 30 of file fib_entry.h.

Function Documentation

u32 fib_entry_child_add ( fib_node_index_t  fib_entry_index,
fib_node_type_t  type,
fib_node_index_t  child_index 
)

Definition at line 527 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_child_remove ( fib_node_index_t  fib_entry_index,
u32  sibling_index 
)

Definition at line 538 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int fib_entry_cmp_for_sort ( void *  i1,
void *  i2 
)

Definition at line 1568 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_contribute_forwarding ( fib_node_index_t  fib_entry_index,
fib_forward_chain_type_t  type,
dpo_id_t dpo 
)

Definition at line 419 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const dpo_id_t* fib_entry_contribute_ip_forwarding ( fib_node_index_t  fib_entry_index)

Definition at line 478 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_contribute_urpf ( fib_node_index_t  path_index,
index_t  urpf 
)

Contribute the set of Adjacencies that this entry forwards with to build the uRPF list of its children.

Definition at line 373 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_cover_changed ( fib_node_index_t  fib_entry)

Definition at line 1218 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_cover_updated ( fib_node_index_t  fib_entry)

Definition at line 1291 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_node_index_t fib_entry_create ( u32  fib_index,
const fib_prefix_t prefix,
fib_source_t  source,
fib_entry_flag_t  flags,
const fib_route_path_t paths 
)

Definition at line 689 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_node_index_t fib_entry_create_special ( u32  fib_index,
const fib_prefix_t prefix,
fib_source_t  source,
fib_entry_flag_t  flags,
const dpo_id_t dpo 
)

Definition at line 726 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_src_flag_t fib_entry_delete ( fib_node_index_t  fib_entry_index,
fib_source_t  source 
)

fib_entry_delete

The source is withdrawing all the paths it provided

Definition at line 1174 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_encode ( fib_node_index_t  fib_entry_index,
fib_route_path_encode_t **  api_rpaths 
)

Definition at line 1603 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_t* fib_entry_get ( fib_node_index_t  fib_entry_index)

Definition at line 45 of file fib_entry.c.

adj_index_t fib_entry_get_adj ( fib_node_index_t  fib_entry_index)

Definition at line 498 of file fib_entry.c.

+ Here is the call graph for this function:

adj_index_t fib_entry_get_adj_for_source ( fib_node_index_t  fib_entry_index,
fib_source_t  source 
)

Definition at line 1719 of file fib_entry_src.c.

+ Here is the call graph for this function:

fib_source_t fib_entry_get_best_source ( fib_node_index_t  fib_entry_index)

Definition at line 1419 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const int fib_entry_get_dpo_for_source ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
dpo_id_t dpo 
)

Definition at line 1744 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 fib_entry_get_fib_index ( fib_node_index_t  fib_entry_index)

Definition at line 1626 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_flag_t fib_entry_get_flags ( fib_node_index_t  fib_entry_index)

Definition at line 276 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_flag_t fib_entry_get_flags_for_source ( fib_node_index_t  fib_entry_index,
fib_source_t  source 
)

Definition at line 1795 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_node_index_t fib_entry_get_index ( const fib_entry_t fib_entry)

Definition at line 57 of file fib_entry.c.

+ Here is the caller graph for this function:

fib_node_index_t fib_entry_get_path_list ( fib_node_index_t  fib_entry_index)

Definition at line 517 of file fib_entry.c.

+ Here is the call graph for this function:

void fib_entry_get_prefix ( fib_node_index_t  fib_entry_index,
fib_prefix_t pfx 
)

Definition at line 1616 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 fib_entry_get_resolving_interface ( fib_node_index_t  fib_entry_index)

Definition at line 1409 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 fib_entry_get_resolving_interface_for_source ( fib_node_index_t  fib_entry_index,
fib_source_t  source 
)

Definition at line 1774 of file fib_entry_src.c.

+ Here is the call graph for this function:

const void* fib_entry_get_source_data ( fib_node_index_t  fib_entry_index,
fib_source_t  source 
)

Definition at line 1855 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_inherit ( fib_node_index_t  cover,
fib_node_index_t  covered 
)

fib_entry_inherit

If the source on the cover is inherting then push this source down to the covered.

Definition at line 1161 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int fib_entry_is_host ( fib_node_index_t  fib_entry_index)

Return !0 is the entry represents a host prefix.

Definition at line 1434 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int fib_entry_is_resolved ( fib_node_index_t  fib_entry_index)

Return !0 is the entry is reoslved, i.e.

will return a valid forwarding chain

Definition at line 1448 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int fib_entry_is_sourced ( fib_node_index_t  fib_entry_index,
fib_source_t  source 
)

Definition at line 133 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_lock ( fib_node_index_t  fib_entry_index)

Definition at line 1577 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_module_init ( void  )

Definition at line 1597 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_path_add ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
fib_entry_flag_t  flags,
const fib_route_path_t rpath 
)

Definition at line 873 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_src_flag_t fib_entry_path_remove ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
const fib_route_path_t rpath 
)

Definition at line 969 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 fib_entry_pool_size ( void  )

Definition at line 1636 of file fib_entry.c.

+ Here is the call graph for this function:

void fib_entry_recalculate_forwarding ( fib_node_index_t  fib_entry_index)

Definition at line 774 of file fib_entry.c.

+ Here is the call graph for this function:

int fib_entry_recursive_loop_detect ( fib_node_index_t  entry_index,
fib_node_index_t **  entry_indicies 
)

Definition at line 1358 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_set_flow_hash_config ( fib_node_index_t  fib_entry_index,
flow_hash_config_t  hash_config 
)

Definition at line 1474 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_set_source_data ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
const void *  data 
)

Definition at line 1837 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_special_add ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
fib_entry_flag_t  flags,
const dpo_id_t dpo 
)

Definition at line 840 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_src_flag_t fib_entry_special_remove ( fib_node_index_t  fib_entry_index,
fib_source_t  source 
)

Definition at line 1061 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_special_update ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
fib_entry_flag_t  flags,
const dpo_id_t dpo 
)

Definition at line 856 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_unlock ( fib_node_index_t  fib_entry_index)

Definition at line 1587 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_update ( fib_node_index_t  fib_entry_index,
fib_source_t  source,
fib_entry_flag_t  flags,
const fib_route_path_t paths 
)

fib_entry_update

The source has provided a new set of paths that will replace the old.

Definition at line 1186 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_fib_entry ( u8 s,
va_list *  args 
)

Definition at line 104 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_fib_source ( u8 s,
va_list *  args 
)

Definition at line 94 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

STATIC_ASSERT ( sizeof(fib_source_t = =1,
"FIB too many sources"   
)
STATIC_ASSERT ( sizeof(fib_entry_src_flag_t)<=  2,
"FIB entry flags field size too big"   
)