16 #ifndef __FIB_TYPES_H__ 17 #define __FIB_TYPES_H__ 30 #define FIB_NODE_INDEX_INVALID ((fib_node_index_t)(~0)) 39 } __attribute__ ((packed)) fib_protocol_t;
41 #define FIB_PROTOCOLS { \ 42 [FIB_PROTOCOL_IP4] = "ipv4", \ 43 [FIB_PROTOCOL_IP6] = "ipv6", \ 44 [FIB_PROTOCOL_MPLS] = "MPLS", \ 51 #define FIB_PROTOCOL_MAX (FIB_PROTOCOL_MPLS + 1) 57 #define FIB_PROTOCOL_IP_MAX (FIB_PROTOCOL_IP6 + 1) 62 #define FIB_PROTOCOL_NONE (FIB_PROTOCOL_MAX+1) 64 #define FOR_EACH_FIB_PROTOCOL(_item) \ 65 for (_item = FIB_PROTOCOL_IP4; \ 66 _item <= FIB_PROTOCOL_MPLS; \ 69 #define FOR_EACH_FIB_IP_PROTOCOL(_item) \ 70 for (_item = FIB_PROTOCOL_IP4; \ 71 _item <= FIB_PROTOCOL_IP6; \ 127 } __attribute__ ((packed)) fib_forward_chain_type_t;
129 #define FIB_FORW_CHAINS { \ 130 [FIB_FORW_CHAIN_TYPE_ETHERNET] = "ethernet", \ 131 [FIB_FORW_CHAIN_TYPE_BIER] = "bier", \ 132 [FIB_FORW_CHAIN_TYPE_UNICAST_IP4] = "unicast-ip4", \ 133 [FIB_FORW_CHAIN_TYPE_UNICAST_IP6] = "unicast-ip6", \ 134 [FIB_FORW_CHAIN_TYPE_MCAST_IP4] = "multicast-ip4", \ 135 [FIB_FORW_CHAIN_TYPE_MCAST_IP6] = "multicast-ip6", \ 136 [FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS] = "mpls-neos", \ 137 [FIB_FORW_CHAIN_TYPE_MPLS_EOS] = "mpls-eos", \ 138 [FIB_FORW_CHAIN_TYPE_NSH] = "nsh", \ 141 #define FIB_FORW_CHAIN_NUM (FIB_FORW_CHAIN_TYPE_NSH+1) 142 #define FIB_FORW_CHAIN_MPLS_NUM (FIB_FORW_CHAIN_TYPE_MPLS_EOS+1) 144 #define FOR_EACH_FIB_FORW_CHAIN(_item) \ 145 for (_item = FIB_FORW_CHAIN_TYPE_UNICAST_IP4; \ 146 _item <= FIB_FORW_CHAIN_TYPE_NSH; \ 149 #define FOR_EACH_FIB_FORW_MPLS_CHAIN(_item) \ 150 for (_item = FIB_FORW_CHAIN_TYPE_UNICAST_IP4; \ 151 _item <= FIB_FORW_CHAIN_TYPE_MPLS_EOS; \ 211 "FIB Prefix's address is 4 byte aligned.");
270 } __attribute__ ((packed)) fib_special_type_t;
275 #define FIB_SPEICAL_TYPE_MAX (FIB_SPEICAL_TYPE_LAST + 1) 277 #define FOR_EACH_FIB_SPEICAL_TYPE(_item) \ 278 for (_item = FIB_TYPE_SPEICAL_FIRST; \ 279 _item <= FIB_SPEICAL_TYPE_LAST; _item++) 358 #define MFIB_RPF_ID_NONE (0) 480 #define FIB_ROUTE_PATH_HELP "[next-hop-address] [next-hop-interface] [next-hop-table <value>] [weight <value>] [preference <value>] [udp-encap-id <value>] [ip4-lookup-in-table <value>] [ip6-lookup-in-table <value>] [mpls-lookup-in-table <value>] [resolve-via-host] [resolve-via-connected] [rx-ip4 <interface>] [out-labels <value value value>]" fib_protocol_t fp_proto
protocol type
Contribute an object that is to be used to forward BIER packets.
Contribute an object that is to be used to forward IP6 packets.
ip46_address_t frp_addr
The next-hop address.
Contribute an object that is to be used to forward IP6 packets.
A representation of a fib path for fib_path_encode to convey the information to the caller...
mpls_eos_bit_t frp_eos
EOS bit for the resolving label.
A representation of a path as described by a route producer.
A Drop path - resolve the path on the drop DPO.
dpo_proto_t fib_forw_chain_type_to_dpo_proto(fib_forward_chain_type_t fct)
Convert from a chain type to the DPO proto it will install.
u8 * format_vnet_link(u8 *s, va_list *ap)
A path that resolves via a BIER impostion object.
index_t frp_bier_imp
A path via a BIER imposition object.
vnet_link_t fib_forw_chain_type_to_link_type(fib_forward_chain_type_t fct)
Convert from a chain type to the adjacencies link type.
u32 mpls_label_t
A label value only, i.e.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
A path that resolves via a BIER [ECMP] Table.
struct fib_path_ext_t_ * fpel_exts
Contribute an object that is to be used to forward IP4 packets.
#define STRUCT_OFFSET_OF(t, f)
dpo_proto_t frp_proto
The protocol of the address below.
bier_table_id_t frp_bier_tbl
A path that resolves via a BIER Table.
A path that result in received traffic being recieved/recirculated so that it appears to have arrived...
fib_rpf_id_t frp_rpf_id
The RPF-ID.
A local path with a RPF-ID => multicast traffic.
dpo_proto_t fp_payload_proto
This protocol determines the payload protocol of packets that will be forwarded by this entry once th...
u32 frp_sw_if_index
The interface.
fib_special_type_t_
Enurmeration of special path/entry types.
mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
Recursion constraint of via a host prefix.
Aggregrate type for a prefix.
A path via a UDP encap object.
enum fib_route_path_flags_t_ fib_route_path_flags_t
Path flags from the control plane.
Contribute an object that is to be used to forward Ethernet packets.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
u16 fp_len
The mask length.
STATIC_ASSERT(STRUCT_OFFSET_OF(fib_prefix_t, fp_addr)==4,"FIB Prefix's address is 4 byte aligned.")
index_t frp_bier_fmask
Resolving via a BIER Fmask.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Contribute an object that is to be used to forward end-of-stack MPLS packets.
fib_protocol_t_
Protocol Type.
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
u8 * format_fib_prefix(u8 *s, va_list *args)
int fib_prefix_is_cover(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for covering relationship.
Recursion constraint of via an attahced prefix.
struct fib_route_path_t_ fib_route_path_t
A representation of a path as described by a route producer.
A list of path-extensions.
fib_protocol_t dpo_proto_to_fib(dpo_proto_t dpo_proto)
fib_path_list_walk_rc_t_
return code to control pat-hlist walk
uword unformat_fib_route_path(unformat_input_t *input, va_list *args)
Unformat a fib_route_path_t from CLI input.
struct fib_path_ext_list_t_ fib_path_ext_list_t
A list of path-extensions.
fib_forward_chain_type_t fib_forw_chain_type_from_dpo_proto(dpo_proto_t proto)
Convert from a payload-protocol to a chain type.
struct fib_route_path_encode_t_ fib_route_path_encode_t
A representation of a fib path for fib_path_encode to convey the information to the caller...
struct fib_prefix_t_ fib_prefix_t
Aggregrate type for a prefix.
Contribute an object that is to be used to forward NSH packets.
u32 fib_node_index_t
A typedef of a node index.
Don't resolve the path, use the DPO the client provides.
enum bier_hdr_proto_id_t_ bier_hdr_proto_id_t
BIER header protocol payload types.
u32 fib_rpf_id_t
An RPF-ID is numerical value that is used RPF validate.
u8 * format_fib_protocol(u8 *s, va_list *ap)
vnet_link_t fib_proto_to_link(fib_protocol_t proto)
Convert from a protocol to a link type.
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
u8 frp_preference
A path preference.
A deag path using the packet's source not destination address.
fib_route_path_flags_t frp_flags
flags on the path
A path that resolves via a BIER F-Mask.
int fib_prefix_cmp(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for equality.
A path that resolves via another table.
void fib_prefix_from_ip46_addr(const ip46_address_t *addr, fib_prefix_t *pfx)
Host prefix from ip.
u8 * format_fib_forw_chain_type(u8 *s, va_list *args)
mpls_label_t frp_local_label
The MPLS local Label to reursively resolve through.
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
enum fib_path_list_walk_rc_t_ fib_path_list_walk_rc_t
return code to control pat-hlist walk
u32 frp_bier_fib_index
The BIER table to resolve the fmask in.
fib_protocol_t bier_hdr_proto_to_fib(bier_hdr_proto_id_t bproto)
Convert from BIER next-hop proto to FIB proto.
A path extension is a per-entry addition to the forwarding information when packets are sent for that...
int fib_prefix_is_host(const fib_prefix_t *p)
Return true is the prefix is a host prefix.
Contribute an object that is to be used to forward non-end-of-stack MPLS packets. ...
fib_route_path_flags_t_
Path flags from the control plane.
u8 frp_weight
[un]equal cost path weight
u32 frp_udp_encap_id
UDP encap ID.
Contribute an object that is to be used to forward IP4 packets.
u32 frp_fib_index
The FIB index to lookup the nexthop Only valid for recursive paths.
fib_forward_chain_type_t_
FIB output chain type.
enum mpls_eos_bit_t_ mpls_eos_bit_t