16 #ifndef __FIB_ENTRY_H__ 17 #define __FIB_ENTRY_H__ 126 } __attribute__ ((packed)) fib_source_t;
129 "FIB too many sources");
134 #define FIB_SOURCE_MAX (FIB_SOURCE_LAST+1) 136 #define FIB_SOURCES { \ 137 [FIB_SOURCE_SPECIAL] = "special", \ 138 [FIB_SOURCE_INTERFACE] = "interface", \ 139 [FIB_SOURCE_API] = "API", \ 140 [FIB_SOURCE_CLI] = "CLI", \ 141 [FIB_SOURCE_ADJ] = "adjacency", \ 142 [FIB_SOURCE_MAP] = "MAP", \ 143 [FIB_SOURCE_SR] = "SR", \ 144 [FIB_SOURCE_SIXRD] = "SixRD", \ 145 [FIB_SOURCE_LISP] = "LISP", \ 146 [FIB_SOURCE_CLASSIFY] = "classify", \ 147 [FIB_SOURCE_DHCP] = "DHCP", \ 148 [FIB_SOURCE_IP6_ND_PROXY] = "IPv6-proxy-nd", \ 149 [FIB_SOURCE_RR] = "recursive-resolution", \ 150 [FIB_SOURCE_AE] = "attached_export", \ 151 [FIB_SOURCE_MPLS] = "mpls", \ 152 [FIB_SOURCE_URPF_EXEMPT] = "urpf-exempt", \ 153 [FIB_SOURCE_DEFAULT_ROUTE] = "default-route", \ 156 #define FOR_EACH_FIB_SOURCE(_item) \ 157 for (_item = FIB_SOURCE_FIRST; _item < FIB_SOURCE_MAX; _item++) 214 #define FIB_ENTRY_ATTRIBUTE_MAX (FIB_ENTRY_ATTRIBUTE_LAST+1) 216 #define FIB_ENTRY_ATTRIBUTES { \ 217 [FIB_ENTRY_ATTRIBUTE_CONNECTED] = "connected", \ 218 [FIB_ENTRY_ATTRIBUTE_ATTACHED] = "attached", \ 219 [FIB_ENTRY_ATTRIBUTE_IMPORT] = "import", \ 220 [FIB_ENTRY_ATTRIBUTE_DROP] = "drop", \ 221 [FIB_ENTRY_ATTRIBUTE_EXCLUSIVE] = "exclusive", \ 222 [FIB_ENTRY_ATTRIBUTE_LOCAL] = "local", \ 223 [FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT] = "uRPF-exempt", \ 224 [FIB_ENTRY_ATTRIBUTE_MULTICAST] = "multicast", \ 227 #define FOR_EACH_FIB_ATTRIBUTE(_item) \ 228 for (_item = FIB_ENTRY_ATTRIBUTE_FIRST; \ 229 _item < FIB_ENTRY_ATTRIBUTE_MAX; \ 266 #define FIB_ENTRY_SRC_ATTRIBUTE_MAX (FIB_ENTRY_SRC_ATTRIBUTE_LAST+1) 268 #define FIB_ENTRY_SRC_ATTRIBUTES { \ 269 [FIB_ENTRY_SRC_ATTRIBUTE_ADDED] = "added", \ 270 [FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE] = "active", \ 431 #define FOR_EACH_FIB_ENTRY_FLAG(_item) \ 432 for (_item = FIB_ENTRY_FLAG_FIRST; _item < FIB_ENTRY_FLAG_MAX; _item++) 434 #define FIB_ENTRY_FORMAT_BRIEF (0x0) 435 #define FIB_ENTRY_FORMAT_DETAIL (0x1) 436 #define FIB_ENTRY_FORMAT_DETAIL2 (0x2) 469 fib_source_t source);
475 fib_source_t source);
487 fib_source_t source);
513 fib_source_t source);
524 fib_source_t source);
529 fib_source_t source);
532 fib_source_t source);
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)
the source is active/best
Recursive resolution source.
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 childre...
u32 fib_entry_child_add(fib_node_index_t fib_entry_index, fib_node_type_t type, fib_node_index_t child_index)
A representation of a fib path for fib_path_encode to convey the information to the caller...
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
u32 fib_entry_get_resolving_interface_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
A representation of a path as described by a route producer.
The prefix/address exempted from loose uRPF check To be used with caution.
fib_entry_src_flag_t fib_entry_special_remove(fib_node_index_t fib_entry_index, fib_source_t source)
void fib_entry_cover_updated(fib_node_index_t fib_entry)
fib_source_t fib_entry_get_best_source(fib_node_index_t fib_entry_index)
Information related to the source of a FIB entry.
u32 mpls_label_t
A label value only, i.e.
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)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
The prefix/address is local to this device.
fib_source_t_
The different sources that can create a route.
u32 fe_fib_index
The index of the FIB table this entry is in.
mpls_label_t fesm_label
This MPLS local label associated with the prefix.
fib_entry_src_t * fe_srcs
Vector of source infos.
void fib_entry_set_flow_hash_config(fib_node_index_t fib_entry_index, flow_hash_config_t hash_config)
fib_node_index_t fe_parent
the path-list for which this entry is a child.
u32 fib_entry_get_resolving_interface(fib_node_index_t fib_entry_index)
u32 fesi_sibling
This source's index in the cover's list.
u32 fe_sibling
index of this entry in the parent's child list.
enum fib_entry_src_attribute_t_ fib_entry_src_attribute_t
Flags for the source data.
void fib_entry_child_remove(fib_node_index_t fib_entry_index, u32 sibling_index)
A high priority source a plugin can use.
u32 fib_entry_pool_size(void)
int fib_entry_cmp_for_sort(void *i1, void *i2)
The route is attached cross tables and thus imports covered prefixes from the other table...
Aggregrate type for a prefix.
void fib_entry_get_prefix(fib_node_index_t fib_entry_index, fib_prefix_t *pfx)
u32 fesa_sibling
This source's index in the cover's list.
const dpo_id_t * fib_entry_contribute_ip_forwarding(fib_node_index_t fib_entry_index)
void fib_entry_contribute_forwarding(fib_node_index_t fib_entry_index, fib_forward_chain_type_t type, dpo_id_t *dpo)
const int fib_entry_get_dpo_for_source(fib_node_index_t fib_entry_index, fib_source_t source, dpo_id_t *dpo)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
u32 fesr_sibling
This source's index in the cover's list.
struct fib_entry_src_t_ fib_entry_src_t
Information related to the source of a FIB entry.
void fib_entry_unlock(fib_node_index_t fib_entry_index)
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
fib_node_index_t fib_entry_get_index(const fib_entry_t *fib_entry)
int fib_entry_is_resolved(fib_node_index_t fib_entry_index)
Return !0 is the entry is reoslved, i.e.
fib_node_index_t fesl_fib_index
The source FIB index.
A list of path-extensions.
enum fib_entry_attribute_t_ fib_entry_attribute_t
The different sources that can create a route.
void fib_entry_cover_changed(fib_node_index_t fib_entry)
An node in the FIB graph.
struct fib_entry_t_ fib_entry_t
An entry in a FIB table.
adj_index_t fib_entry_get_adj(fib_node_index_t fib_entry_index)
void fib_entry_encode(fib_node_index_t fib_entry_index, fib_route_path_encode_t **api_rpaths)
fib_node_index_t fib_entry_get_path_list(fib_node_index_t fib_entry_index)
int fib_entry_is_sourced(fib_node_index_t fib_entry_index, fib_source_t source)
fib_entry_attribute_t_
The different sources that can create a route.
u32 fib_node_index_t
A typedef of a node index.
u32 adj_index_t
An index for adjacencies.
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)
enum fib_entry_flag_t_ fib_entry_flag_t
int fib_entry_recursive_loop_detect(fib_node_index_t entry_index, fib_node_index_t **entry_indicies)
fib_entry_flag_t fes_entry_flags
Flags the source contributes to the entry.
fib_source_t fes_src
Which source this info block is for.
fib_entry_src_flag_t fes_flags
Flags on the source.
const void * fib_entry_get_source_data(fib_node_index_t fib_entry_index, fib_source_t source)
adj_index_t fib_entry_get_adj_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
The default route source.
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_node_t fe_node
Base class.
fib_entry_src_flag_t fib_entry_delete(fib_node_index_t fib_entry_index, fib_source_t source)
fib_entry_delete
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
fib_node_index_t fesr_cover
the index of the FIB entry that is the covering entry
From the control plane API.
enum fib_entry_src_flag_t_ fib_entry_src_flag_t
Route added as a result of interface configuration.
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
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)
dpo_id_t fe_lb
The load-balance used for forwarding.
fib_entry_delegate_t * fe_delegates
A vector of delegates.
fib_node_index_t fes_pl
The path-list created by the source.
fib_entry_t * fib_entry_get(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)
void fib_entry_module_init(void)
fib_entry_src_attribute_t_
Flags for the source data.
the source has been added to the entry
STATIC_ASSERT(sizeof(fib_source_t)==1,"FIB too many sources")
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_lock(fib_node_index_t fib_entry_index)
u8 * format_fib_entry(u8 *s, va_list *args)
fib_node_index_t fesa_cover
the index of the FIB entry that is the covering entry
fib_node_index_t fesi_cover
the index of the FIB entry that is the covering entry
u8 fes_ref_count
1 bytes ref count.
fib_path_ext_list_t fes_path_exts
A vector of path extensions.
The route is an explicit drop.
A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functio...
fib_entry_flag_t fib_entry_get_flags(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 fib_prefix_t fe_prefix
The prefix of the route.
u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index)
The prefix/address is a multicast prefix.