67 s =
format(s,
"%U %U ttl:%d exp:%d",
166 return (prefix->
fp_len == 32);
168 return (prefix->
fp_len == 128);
221 if (0 != res)
return (res);
225 if (0 != res)
return (res);
386 u32 *payload_proto = va_arg (*args,
u32*);
387 u32 weight, preference, udp_encap_id;
392 memset(rpath, 0,
sizeof(*rpath));
414 else if (
unformat (input,
"weight %u", &weight))
418 else if (
unformat (input,
"preference %u", &preference))
422 else if (
unformat (input,
"%U next-hop-table %d",
430 else if (
unformat (input,
"%U next-hop-table %d",
457 else if (
unformat (input,
"udp-encap %d", &udp_encap_id))
469 else if (
unformat (input,
"resolve-via-host"))
473 else if (
unformat (input,
"resolve-via-attached"))
478 "ip4-lookup-in-table %d",
485 "ip6-lookup-in-table %d",
492 "mpls-lookup-in-table %d",
506 else if (
unformat (input,
"via-label %U",
514 else if (
unformat (input,
"rx-ip4 %U",
521 else if (
unformat (input,
"out-labels"))
static const char * vnet_link_names[]
static void ip6_address_mask(ip6_address_t *a, ip6_address_t *mask)
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.
fib_forward_chain_type_t fib_forw_chain_type_from_link_type(vnet_link_t link_type)
Convert from a adjacency's link type to chain type.
static const char * fib_protocol_names[]
mpls_eos_bit_t frp_eos
EOS bit for the resolving label.
int fib_route_path_cmp(const fib_route_path_t *rpath1, const fib_route_path_t *rpath2)
A representation of a path as described by a route producer.
vnet_main_t * vnet_get_main(void)
uword unformat_fib_route_path(unformat_input_t *input, va_list *args)
Unformat a fib_route_path_t from CLI input.
u32 mpls_label_t
A label value only, i.e.
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.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Contribute an object that is to be used to forward IP4 packets.
static uword ip4_destination_matches_route(const ip4_main_t *im, const ip4_address_t *key, const ip4_address_t *dest, uword dest_length)
dpo_proto_t frp_proto
The protocol of the address below.
unformat_function_t unformat_vnet_sw_interface
A path that result in received traffic being recieved/recirculated so that it appears to have arrived...
#define ip46_address_cmp(ip46_1, ip46_2)
int fib_prefix_is_host(const fib_prefix_t *prefix)
Return true is the prefix is a host prefix.
u8 * format_fib_protocol(u8 *s, va_list *ap)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
unformat_function_t unformat_mpls_unicast_label
u32 frp_sw_if_index
The interface.
static const char * fib_mpls_lsp_mode_names[]
u8 * format_fib_mpls_lsp_mode(u8 *s, va_list *ap)
Format an LSP mode type.
static uword ip6_destination_matches_route(const ip6_main_t *im, const ip6_address_t *key, const ip6_address_t *dest, uword dest_length)
Recursion constraint of via a host prefix.
u8 * format_fib_prefix(u8 *s, va_list *args)
Aggregrate type for a prefix.
int fib_prefix_is_cover(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for covering relationship.
A path via a UDP encap object.
Contribute an object that is to be used to forward Ethernet packets.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
fib_protocol_t dpo_proto_to_fib(dpo_proto_t dpo_proto)
u16 fp_len
The mask length.
Contribute an object that is to be used to forward end-of-stack MPLS packets.
format_function_t format_mpls_eos_bit
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
enum fib_mpls_lsp_mode_t_ fib_mpls_lsp_mode_t
MPLS LSP mode - only valid at the head and tail.
static const char * fib_forw_chain_names[]
Configuration for each label value in the output-stack.
fib_mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
Recursion constraint of via an attahced prefix.
fib_mpls_lsp_mode_t fml_mode
The LSP mode.
#define ip46_address_is_ip4(ip46)
ip6_address_t fib_masks[129]
vnet_link_t fib_forw_chain_type_to_link_type(fib_forward_chain_type_t fct)
Convert from a chain type to the adjacency's link type.
Contribute an object that is to be used to forward NSH packets.
void fib_prefix_from_mpls_label(mpls_label_t label, mpls_eos_bit_t eos, fib_prefix_t *pfx)
Big train switch; FIB debugs on or off.
mpls_label_t fml_value
The label value.
void fib_prefix_from_ip46_addr(const ip46_address_t *addr, fib_prefix_t *pfx)
Host prefix from ip.
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.
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
fib_route_path_flags_t frp_flags
flags on the path
u8 * format_fib_forw_chain_type(u8 *s, va_list *args)
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
A path that resolves via another table.
format_function_t format_mpls_unicast_label
mpls_label_t frp_local_label
The MPLS local Label to reursively resolve through.
#define FIB_MPLS_LSP_MODES
int fib_prefix_cmp(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for equality.
u8 * format_fib_mpls_label(u8 *s, va_list *ap)
Format an MPLS label.
ip4_main_t ip4_main
Global ip4 main structure.
vnet_link_t fib_proto_to_link(fib_protocol_t proto)
Convert from a protocol to a link type.
u8 fml_exp
EXP bits; valid only at imposition.
u8 * format_vnet_link(u8 *s, va_list *ap)
Contribute an object that is to be used to forward non-end-of-stack MPLS packets. ...
u8 frp_weight
[un]equal cost path weight
u32 frp_udp_encap_id
UDP encap ID.
#define ip46_address_is_zero(ip46)
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_forw_chain_type_from_dpo_proto(dpo_proto_t proto)
Convert from a payload-protocol to a chain type.
enum mpls_eos_bit_t_ mpls_eos_bit_t