|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
69 s =
format(s,
"%U %U ttl:%d exp:%d",
101 s =
format (s,
"via-host");
103 s =
format (s,
"via-attached,");
107 s =
format (s,
"attached,");
111 s =
format (s,
"exclusive,");
113 s =
format (s,
"intf-rx,");
115 s =
format (s,
"rpf-id,");
117 s =
format (s,
"src-lkup,");
119 s =
format (s,
"udp-encap,");
121 s =
format (s,
"bier-fmask,");
123 s =
format (s,
"bier-table,");
125 s =
format (s,
"bier-imp,");
131 s =
format (s,
"imcp-unreach,");
133 s =
format (s,
"icmp-prohibit,");
135 s =
format (s,
"classify,");
137 s =
format (s,
"pop-pw-cw,");
147 s =
format (s,
"%U %U, %U, [%U]",
166 pfx->___fp___pad = 0;
254 return (
prefix->fp_len == 32);
256 return (
prefix->fp_len == 128);
294 ip6_address_t p6 = fp->
fp_addr.ip6;
328 if (0 != res)
return (res);
332 if (0 != res)
return (res);
543 dpo_proto_t *payload_proto = va_arg (*args,
void*);
579 else if (
unformat (input,
"%U next-hop-table %d",
595 else if (
unformat (input,
"%U next-hop-table %d",
626 else if (
unformat (input,
"udp-encap %d", &udp_encap_id))
638 else if (
unformat (input,
"resolve-via-host"))
642 else if (
unformat (input,
"resolve-via-attached"))
646 else if (
unformat (input,
"pop-pw-cw"))
651 "ip4-lookup-in-table %d",
662 "ip6-lookup-in-table %d",
673 "mpls-lookup-in-table %d",
683 else if (
unformat (input,
"src-lookup"))
696 else if (
unformat (input,
"via-label %U",
704 else if (
unformat (input,
"rx-ip4 %U",
718 else if (
unformat (input,
"out-labels"))
fib_protocol_t fib_proto_from_ip46(ip46_type_t iproto)
Convert from ip46_type to fib_protocol.
u32 frp_fib_index
The FIB index to lookup the nexthop Only valid for recursive paths.
u32 frp_mitf_flags
MFIB interface flags.
u8 * format_vnet_link(u8 *s, va_list *ap)
int fib_prefix_cmp(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for equality.
#define clib_memcpy(d, s, n)
u8 frp_weight
[un]equal cost path weight
ip4_main_t ip4_main
Global ip4 main structure.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
u8 * format_fib_forw_chain_type(u8 *s, va_list *args)
@ FIB_ROUTE_PATH_ICMP_PROHIBIT
void fib_prefix_copy(fib_prefix_t *dst, const fib_prefix_t *src)
Copy a prefix.
u8 * format_fib_mpls_label(u8 *s, va_list *ap)
Format an MPLS label.
@ FIB_FORW_CHAIN_TYPE_MPLS_EOS
Contribute an object that is to be used to forward end-of-stack MPLS packets.
static const char * vnet_link_names[]
static int ip46_address_cmp(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
static u8 ip46_address_is_ip4(const ip46_address_t *ip46)
uword unformat_mfib_itf_flags(unformat_input_t *input, va_list *args)
ip46_address_t frp_addr
The next-hop address.
@ FIB_FORW_CHAIN_TYPE_MCAST_IP4
Contribute an object that is to be used to forward IP4 packets.
vl_api_tunnel_mode_t mode
@ FIB_FORW_CHAIN_TYPE_ETHERNET
Contribute an object that is to be used to forward Ethernet packets.
u16 fp_len
The mask length.
int fib_route_path_is_attached(const fib_route_path_t *rpath)
mpls_eos_bit_t frp_eos
EOS bit for the resolving label.
u32 frp_sw_if_index
The interface.
void fib_prefix_from_ip46_addr(const ip46_address_t *addr, fib_prefix_t *pfx)
Host prefix from ip.
format_function_t format_mpls_eos_bit
dpo_proto_t frp_proto
The protocol of the address below.
@ FIB_ROUTE_PATH_DVR
A path that resolves via a DVR DPO.
fib_mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
@ FIB_FORW_CHAIN_TYPE_NSH
Contribute an object that is to be used to forward NSH packets.
static uword ip6_destination_matches_route(const ip6_main_t *im, const ip6_address_t *key, const ip6_address_t *dest, uword dest_length)
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP4
Contribute an object that is to be used to forward IP4 packets.
@ FIB_ROUTE_PATH_INTF_RX
A path that result in received traffic being recieved/recirculated so that it appears to have arrived...
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
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.
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.
vnet_main_t * vnet_get_main(void)
@ FIB_ROUTE_PATH_BIER_TABLE
A path that resolves via a BIER [ECMP] Table.
static const char * fib_protocol_names[]
@ FIB_ROUTE_PATH_SOURCE_LOOKUP
A deag path using the packet's source not destination address.
@ FIB_ROUTE_PATH_RESOLVE_VIA_HOST
Recursion constraint of via a host prefix.
@ FIB_ROUTE_PATH_DEAG
A path that resolves via another table.
#define FIB_MPLS_LSP_MODES
enum fib_mpls_lsp_mode_t_ fib_mpls_lsp_mode_t
MPLS LSP mode - only valid at the head and tail.
void ip6_address_normalize(ip6_address_t *ip6, u8 preflen)
vnet_link_t fib_proto_to_link(fib_protocol_t proto)
Convert from a protocol to a link type.
unformat_function_t unformat_mpls_unicast_label
@ FIB_ROUTE_PATH_UDP_ENCAP
A path via a UDP encap object.
@ FIB_ROUTE_PATH_RPF_ID
A local path with a RPF-ID => multicast traffic.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
void fib_prefix_normalize(const fib_prefix_t *p, fib_prefix_t *out)
normalise a prefix (i.e.
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
static u8 ip46_address_is_zero(const ip46_address_t *ip46)
mpls_label_t fml_value
The label value.
static void ip6_address_mask(ip6_address_t *a, const ip6_address_t *mask)
static uword ip4_destination_matches_route(const ip4_main_t *im, const ip4_address_t *key, const ip4_address_t *dest, uword dest_length)
u8 * format_fib_route_path(u8 *s, va_list *ap)
Format route path flags.
u8 * format_fib_protocol(u8 *s, va_list *ap)
@ FIB_ROUTE_PATH_RESOLVE_VIA_ATTACHED
Recursion constraint of via an attahced prefix.
@ FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS
Contribute an object that is to be used to forward non-end-of-stack MPLS 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.
fib_route_path_flags_t frp_flags
flags on the path
fib_protocol_t dpo_proto_to_fib(dpo_proto_t dpo_proto)
format_function_t format_vnet_sw_if_index_name
u8 * format_fib_route_path_flags(u8 *s, va_list *ap)
Format route path flags.
@ FIB_ROUTE_PATH_POP_PW_CW
Pop a Psuedo Wire Control Word.
unformat_function_t unformat_vnet_sw_interface
fib_forward_chain_type_t fib_forw_chain_type_from_fib_proto(fib_protocol_t proto)
Convert from a fib-protocol to a chain type.
description fragment has unexpected format
format_function_t format_ip46_address
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.
ip6_address_t fib_masks[129]
A representation of a path as described by a route producer.
u8 * format_fib_prefix(u8 *s, va_list *args)
@ FIB_ROUTE_PATH_ICMP_UNREACH
int fib_prefix_is_cover(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for covering relationship.
@ FIB_ROUTE_PATH_ATTACHED
Attached path.
@ FIB_FORW_CHAIN_TYPE_BIER
Contribute an object that is to be used to forward BIER packets.
fib_protocol_t fp_proto
protocol type
@ FIB_FORW_CHAIN_TYPE_MCAST_IP6
Contribute an object that is to be used to forward IP6 packets.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
Configuration for each label value in the output-stack.
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
u8 * format_dpo_proto(u8 *s, va_list *args)
format a DPO protocol
@ FIB_ROUTE_PATH_GLEAN
A path that resolves via a glean adjacency.
u8 fib_prefix_get_host_length(fib_protocol_t proto)
enum fib_route_path_flags_t_ fib_route_path_flags_t
Path flags from the control plane.
@ FIB_ROUTE_PATH_DROP
A Drop path - resolve the path on the drop DPO.
int fib_prefix_is_host(const fib_prefix_t *prefix)
Return true is the prefix is a host prefix.
u32 mpls_label_t
A label value only, i.e.
u8 frp_preference
A path preference.
static const char * fib_forw_chain_names[]
u32 frp_udp_encap_id
UDP encap ID.
@ FIB_ROUTE_PATH_EXCLUSIVE
Don't resolve the path, use the DPO the client provides.
@ FIB_ROUTE_PATH_BIER_IMP
A path that resolves via a BIER impostion object.
void fib_prefix_from_mpls_label(mpls_label_t label, mpls_eos_bit_t eos, fib_prefix_t *pfx)
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP6
Contribute an object that is to be used to forward IP6 packets.
@ FIB_ROUTE_PATH_BIER_FMASK
A path that resolves via a BIER F-Mask.
enum mpls_eos_bit_t_ mpls_eos_bit_t
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
static const char * fib_mpls_lsp_mode_names[]
format_function_t format_mpls_unicast_label
void ip4_address_normalize(ip4_address_t *ip4, u8 preflen)
u8 * format_fib_mpls_lsp_mode(u8 *s, va_list *ap)
Format an LSP mode type.
int fib_route_path_cmp(const fib_route_path_t *rpath1, const fib_route_path_t *rpath2)
mpls_label_t frp_local_label
The MPLS local Label to reursively resolve through.
@ FIB_ROUTE_PATH_CLASSIFY
ip46_type_t fib_proto_to_ip46(fib_protocol_t fproto)
Convert from fib_protocol to ip46_type.
uword unformat_fib_route_path(unformat_input_t *input, va_list *args)
Unformat a fib_route_path_t from CLI input.
Aggregate type for a prefix.
@ FIB_ROUTE_PATH_LOCAL
A for-us/local path.
vl_api_wireguard_peer_flags_t flags