16 #ifndef __FIB_ENTRY_H__ 17 #define __FIB_ENTRY_H__ 92 #define FIB_ENTRY_ATTRIBUTES { \ 93 [FIB_ENTRY_ATTRIBUTE_CONNECTED] = "connected", \ 94 [FIB_ENTRY_ATTRIBUTE_ATTACHED] = "attached", \ 95 [FIB_ENTRY_ATTRIBUTE_IMPORT] = "import", \ 96 [FIB_ENTRY_ATTRIBUTE_DROP] = "drop", \ 97 [FIB_ENTRY_ATTRIBUTE_EXCLUSIVE] = "exclusive", \ 98 [FIB_ENTRY_ATTRIBUTE_LOCAL] = "local", \ 99 [FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT] = "uRPF-exempt", \ 100 [FIB_ENTRY_ATTRIBUTE_MULTICAST] = "multicast", \ 101 [FIB_ENTRY_ATTRIBUTE_NO_ATTACHED_EXPORT] = "no-attached-export", \ 102 [FIB_ENTRY_ATTRIBUTE_COVERED_INHERIT] = "covered-inherit", \ 103 [FIB_ENTRY_ATTRIBUTE_INTERPOSE] = "interpose", \ 106 #define FOR_EACH_FIB_ATTRIBUTE(_item) \ 107 for (_item = FIB_ENTRY_ATTRIBUTE_FIRST; \ 108 _item <= FIB_ENTRY_ATTRIBUTE_LAST; \ 163 #define FIB_ENTRY_SRC_ATTRIBUTES { \ 164 [FIB_ENTRY_SRC_ATTRIBUTE_ADDED] = "added", \ 165 [FIB_ENTRY_SRC_ATTRIBUTE_CONTRIBUTING] = "contributing", \ 166 [FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE] = "active", \ 167 [FIB_ENTRY_SRC_ATTRIBUTE_STALE] = "stale", \ 168 [FIB_ENTRY_SRC_ATTRIBUTE_INHERITED] = "inherited", \ 171 #define FOR_EACH_FIB_SRC_ATTRIBUTE(_item) \ 172 for (_item = FIB_ENTRY_SRC_ATTRIBUTE_FIRST; \ 173 _item <= FIB_ENTRY_SRC_ATTRIBUTE_LAST; \ 192 "FIB entry flags field size too big");
356 #define FOR_EACH_FIB_ENTRY_FLAG(_item) \ 357 for (_item = FIB_ENTRY_FLAG_FIRST; _item < FIB_ENTRY_FLAG_MAX; _item++) 359 #define FIB_ENTRY_FORMAT_BRIEF (0x0) 360 #define FIB_ENTRY_FORMAT_DETAIL (0x1) 361 #define FIB_ENTRY_FORMAT_DETAIL2 (0x2) 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)
enum fib_source_t_ fib_source_t
The different sources that can create a route.
the source is active/best
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)
const fib_prefix_t * fib_entry_get_prefix(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)
vl_api_wireguard_peer_flags_t flags
A representation of a path as described by a route producer.
The prefix/address exempted from loose uRPF check To be used with caution.
int fib_entry_is_host(fib_node_index_t fib_entry_index)
Return !0 is the entry represents a host prefix.
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 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
struct fib_entry_src_t_::@301::@307 lisp
The prefix/address is local to this device.
struct fib_entry_src_t_::@301::@306 mpls
STATIC_ASSERT(sizeof(fib_entry_src_flag_t)<=2, "FIB entry flags field size too big")
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.
u32 mpls_label_t
A label value only, i.e.
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 *rpaths)
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.
struct fib_entry_src_t_::@301::@302 rr
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)
u32 fib_entry_pool_size(void)
int fib_entry_cmp_for_sort(void *i1, void *i2)
This FIB entry imposes its source information on all prefixes that is covers.
The route is attached cross tables and thus imports covered prefixes from the other table...
Aggregate type for a prefix.
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)
vl_api_fib_path_type_t type
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
int fib_entry_is_marked(fib_node_index_t fib_entry_index, fib_source_t source)
index_t * fe_delegates
A vector of delegate indices.
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 resolved, i.e.
fib_node_index_t fesl_fib_index
The source FIB index.
union fib_entry_src_t_::@301 u
Source specific info.
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.
The prefix/address exempted from attached export.
adj_index_t fib_entry_get_adj(fib_node_index_t fib_entry_index)
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_route_path_t * fib_entry_encode(fib_node_index_t fib_entry_index)
fib_entry_attribute_t_
The different sources that can create a route.
the source is contributing forwarding
u32 fib_entry_get_stats_index(fib_node_index_t fib_entry_index)
u32 fib_node_index_t
A typedef of a node index.
struct fib_entry_src_t_::@301::@303 interpose
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)
void fib_entry_inherit(fib_node_index_t cover, fib_node_index_t covered)
fib_entry_inherit
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)
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.
the source is inherited from its cover
fib_node_index_t fesr_cover
the index of the FIB entry that is the covering entry
dpo_id_t fesi_dpo
DPO type to interpose.
enum fib_entry_src_flag_t_ fib_entry_src_flag_t
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)
fib_node_index_t fesm_lfes[2]
the indicies of the LFIB entries created
dpo_id_t fe_lb
The load-balance used for forwarding.
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)
struct fib_entry_src_t_::@301::@305 interface
void fib_entry_module_init(void)
u8 * format_fib_entry_src_flags(u8 *s, va_list *args)
fib_entry_src_attribute_t_
Flags for the source data.
the source has been added to the entry
void fib_entry_recalculate_forwarding(fib_node_index_t fib_entry_index)
u8 * format_fib_entry_flags(u8 *s, va_list *args)
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
u32 fib_entry_get_any_resolving_interface(fib_node_index_t fib_entry_index)
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
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
void fib_entry_mark(fib_node_index_t fib_entry_index, fib_source_t source)
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.
struct fib_entry_src_t_::@301::@304 adj
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 *rpaths)
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.