37 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 53 return VNET_API_ERROR_NO_SUCH_FIB;
68 return VNET_API_ERROR_NO_SUCH_FIB;
79 clib_memcpy (&out->ip4, &in->nh.address.ip4, sizeof (out->ip4));
81 clib_memcpy (&out->ip6, &in->nh.address.ip6, sizeof (out->ip6));
84 static vl_api_fib_path_nh_proto_t
109 vl_api_fib_path_t *fp)
163 in->flags = ntohl (in->flags);
164 in->type = ntohl (in->type);
165 in->proto = ntohl (in->proto);
221 return VNET_API_ERROR_NO_SUCH_TABLE;
284 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
323 return (VNET_API_ERROR_NO_SUCH_FIB);
343 ntohl(in->label_stack[ii].label);
345 in->label_stack[ii].ttl;
347 in->label_stack[ii].exp;
349 (in->label_stack[ii].is_uniform ?
360 vl_api_fib_path_t *out)
362 memset (out, 0,
sizeof (*out));
434 out->flags = htonl (out->flags);
435 out->type = htonl (out->type);
436 out->proto = htonl (out->proto);
444 out->label_stack[ii].label =
446 out->label_stack[ii].ttl =
448 out->label_stack[ii].exp =
466 return (VNET_API_ERROR_NO_PATHS_IN_ROUTE);
486 return (VNET_API_ERROR_NO_PATHS_IN_ROUTE);
508 const vl_api_fib_path_t *
path = va_arg (*args, vl_api_fib_path_t*);
510 s =
format (s,
"sw_if_index %d", ntohl (path->sw_if_index));
511 switch (clib_net_to_host_u32(path->proto))
524 s =
format (s,
" weight %d", path->weight);
525 s =
format (s,
" preference %d", path->preference);
526 s =
format (s,
" type %d", ntohl(path->type));
527 s =
format (s,
" proto %d", ntohl(path->proto));
528 s =
format (s,
" flags %d", ntohl(path->flags));
529 s =
format (s,
" n_labels %d", ntohl(path->n_labels));
530 s =
format (s,
" table-id %d", ntohl(path->table_id));
531 s =
format (s,
" rpf-id %d", ntohl(path->rpf_id));
539 switch (clib_net_to_host_u32 (af))
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
dpo_id_t frp_dpo
The DPO for use with exclusive paths.
ip46_address_t frp_addr
The next-hop address.
static void fib_api_next_hop_encode(const fib_route_path_t *rpath, vl_api_fib_path_t *fp)
A path that resolves via a DVR DPO.
mpls_eos_bit_t frp_eos
EOS bit for the resolving label.
u8 * format_vl_api_fib_path(u8 *s, va_list *args)
A representation of a path as described by a route producer.
int fib_api_route_add_del(u8 is_add, u8 is_multipath, u32 fib_index, const fib_prefix_t *prefix, fib_entry_flag_t entry_flags, fib_route_path_t *rpaths)
Adding routes from the API.
vnet_main_t * vnet_get_main(void)
A Drop path - resolve the path on the drop DPO.
vnet_interface_main_t interface_main
fib_node_index_t fib_table_entry_update(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, fib_route_path_t *paths)
Update an entry to have a new set of paths.
void fib_api_path_encode(const fib_route_path_t *rpath, vl_api_fib_path_t *out)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
A path that resolves via a BIER impostion object.
index_t frp_bier_imp
A path via a BIER imposition object.
fib_node_index_t fib_table_entry_path_add2(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, fib_route_path_t *rpaths)
Add n paths to an entry (aka route) in the FIB.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
dpo_proto_t frp_proto
The protocol of the address below.
A path that result in received traffic being recieved/recirculated so that it appears to have arrived...
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
#define clib_memcpy(d, s, n)
fib_rpf_id_t frp_rpf_id
The RPF-ID.
A local path with a RPF-ID => multicast traffic.
u32 frp_sw_if_index
The interface.
static void fib_api_next_hop_decode(const vl_api_fib_path_t *in, ip46_address_t *out)
fib_protocol_t fib_proto_from_api_address_family(int af)
Recursion constraint of via a host prefix.
Aggregate type for a prefix.
static vl_api_fib_path_nh_proto_t fib_api_path_dpo_proto_to_nh(dpo_proto_t dproto)
A path via a UDP encap object.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
fib_protocol_t dpo_proto_to_fib(dpo_proto_t dpo_proto)
static int fib_api_path_nh_proto_to_dpo(vl_api_fib_path_nh_proto_t pp, dpo_proto_t *dproto)
static u8 ip46_address_is_zero(const ip46_address_t *ip46)
fib_mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
Recursion constraint of via an attahced prefix.
int fib_proto_to_api_address_family(fib_protocol_t fproto)
fib_mpls_lsp_mode_t fml_mode
The LSP mode.
Pop a Psuedo Wire Control Word.
void fib_table_entry_path_remove2(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_route_path_t *rpaths)
Remove n paths to an entry (aka route) in the FIB.
u32 frp_classify_table_id
Classify table ID.
void fib_table_entry_delete(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Delete a FIB entry.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
mpls_label_t fml_value
The label value.
index_t bier_disp_table_find(u32 table_id)
enum fib_entry_flag_t_ fib_entry_flag_t
struct _vnet_classify_main vnet_classify_main_t
int fib_api_mtable_id_decode(fib_protocol_t fproto, u32 table_id, u32 *fib_index)
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
u8 frp_preference
A path preference.
int fib_api_path_decode(vl_api_fib_path_t *in, fib_route_path_t *out)
A deag path using the packet's source not destination address.
fib_route_path_flags_t frp_flags
flags on the path
From the control plane API.
vnet_classify_main_t vnet_classify_main
u32 mfib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
A path that resolves via another table.
mpls_label_t frp_local_label
The MPLS local Label to reursively resolve through.
int fib_api_table_id_decode(fib_protocol_t fproto, u32 table_id, u32 *fib_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
u32 mfib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
vnet_sw_interface_t * sw_interfaces
u8 fml_exp
EXP bits; valid only at imposition.
u8 frp_weight
[un]equal cost path weight
u32 frp_udp_encap_id
UDP encap ID.
u32 frp_fib_index
The FIB index to lookup the nexthop Only valid for recursive paths.
u8 * format_vl_api_address_union(u8 *s, va_list *args)