16 #ifndef __FIB_ENTRY_H__ 17 #define __FIB_ENTRY_H__ 134 } __attribute__ ((packed)) fib_source_t;
137 "FIB too many sources");
142 #define FIB_SOURCE_MAX (FIB_SOURCE_LAST+1) 144 #define FIB_SOURCES { \ 145 [FIB_SOURCE_SPECIAL] = "special", \ 146 [FIB_SOURCE_INTERFACE] = "interface", \ 147 [FIB_SOURCE_PROXY] = "proxy", \ 148 [FIB_SOURCE_BIER] = "BIER", \ 149 [FIB_SOURCE_API] = "API", \ 150 [FIB_SOURCE_CLI] = "CLI", \ 151 [FIB_SOURCE_ADJ] = "adjacency", \ 152 [FIB_SOURCE_MAP] = "MAP", \ 153 [FIB_SOURCE_SR] = "SR", \ 154 [FIB_SOURCE_SIXRD] = "SixRD", \ 155 [FIB_SOURCE_LISP] = "LISP", \ 156 [FIB_SOURCE_CLASSIFY] = "classify", \ 157 [FIB_SOURCE_DHCP] = "DHCP", \ 158 [FIB_SOURCE_IP6_ND_PROXY] = "IPv6-proxy-nd", \ 159 [FIB_SOURCE_RR] = "recursive-resolution", \ 160 [FIB_SOURCE_AE] = "attached_export", \ 161 [FIB_SOURCE_MPLS] = "mpls", \ 162 [FIB_SOURCE_URPF_EXEMPT] = "urpf-exempt", \ 163 [FIB_SOURCE_DEFAULT_ROUTE] = "default-route", \ 166 #define FOR_EACH_FIB_SOURCE(_item) \ 167 for (_item = FIB_SOURCE_FIRST; _item < FIB_SOURCE_MAX; _item++) 221 #define FIB_ENTRY_ATTRIBUTES { \ 222 [FIB_ENTRY_ATTRIBUTE_CONNECTED] = "connected", \ 223 [FIB_ENTRY_ATTRIBUTE_ATTACHED] = "attached", \ 224 [FIB_ENTRY_ATTRIBUTE_IMPORT] = "import", \ 225 [FIB_ENTRY_ATTRIBUTE_DROP] = "drop", \ 226 [FIB_ENTRY_ATTRIBUTE_EXCLUSIVE] = "exclusive", \ 227 [FIB_ENTRY_ATTRIBUTE_LOCAL] = "local", \ 228 [FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT] = "uRPF-exempt", \ 229 [FIB_ENTRY_ATTRIBUTE_MULTICAST] = "multicast", \ 232 #define FOR_EACH_FIB_ATTRIBUTE(_item) \ 233 for (_item = FIB_ENTRY_ATTRIBUTE_FIRST; \ 234 _item <= FIB_ENTRY_ATTRIBUTE_LAST; \ 271 #define FIB_ENTRY_SRC_ATTRIBUTE_MAX (FIB_ENTRY_SRC_ATTRIBUTE_LAST+1) 273 #define FIB_ENTRY_SRC_ATTRIBUTES { \ 274 [FIB_ENTRY_SRC_ATTRIBUTE_ADDED] = "added", \ 275 [FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE] = "active", \ 436 #define FOR_EACH_FIB_ENTRY_FLAG(_item) \ 437 for (_item = FIB_ENTRY_FLAG_FIRST; _item < FIB_ENTRY_FLAG_MAX; _item++) 439 #define FIB_ENTRY_FORMAT_BRIEF (0x0) 440 #define FIB_ENTRY_FORMAT_DETAIL (0x1) 441 #define FIB_ENTRY_FORMAT_DETAIL2 (0x2) 475 fib_source_t source);
481 fib_source_t source);
493 fib_source_t source);
519 fib_source_t source);
530 fib_source_t source);
535 fib_source_t source);
538 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...
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.
u8 * format_fib_source(u8 *s, va_list *args)
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
A route the is being 'proxied' on behalf of another device.
STATIC_ASSERT(sizeof(fib_source_t)==1,"FIB too many sources")
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
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.