36 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 52 return VNET_API_ERROR_NO_SUCH_FIB;
67 return VNET_API_ERROR_NO_SUCH_FIB;
78 clib_memcpy (&out->ip4, &in->nh.address.ip4, sizeof (out->ip4));
80 clib_memcpy (&out->ip6, &in->nh.address.ip6, sizeof (out->ip6));
83 static vl_api_fib_path_nh_proto_t
108 vl_api_fib_path_t *fp)
162 in->flags = ntohl (in->flags);
163 in->type = ntohl (in->type);
164 in->proto = ntohl (in->proto);
220 return VNET_API_ERROR_NO_SUCH_TABLE;
283 return VNET_API_ERROR_NO_MATCHING_INTERFACE;
322 return (VNET_API_ERROR_NO_SUCH_FIB);
342 ntohl(in->label_stack[ii].label);
344 in->label_stack[ii].ttl;
346 in->label_stack[ii].exp;
348 (in->label_stack[ii].is_uniform ?
359 vl_api_fib_path_t *out)
361 memset (out, 0,
sizeof (*out));
437 out->flags = htonl (out->flags);
438 out->type = htonl (out->type);
439 out->proto = htonl (out->proto);
447 out->label_stack[ii].label =
449 out->label_stack[ii].ttl =
451 out->label_stack[ii].exp =
469 return (VNET_API_ERROR_NO_PATHS_IN_ROUTE);
489 return (VNET_API_ERROR_NO_PATHS_IN_ROUTE);
511 const vl_api_fib_path_t *path = va_arg (*args, vl_api_fib_path_t*);
513 s =
format (s,
"sw_if_index %d", ntohl (path->sw_if_index));
514 switch (clib_net_to_host_u32(path->proto))
527 s =
format (s,
" weight %d", path->weight);
528 s =
format (s,
" preference %d", path->preference);
529 s =
format (s,
" type %d", ntohl(path->type));
530 s =
format (s,
" proto %d", ntohl(path->proto));
531 s =
format (s,
" flags %d", ntohl(path->flags));
532 s =
format (s,
" n_labels %d", ntohl(path->n_labels));
533 s =
format (s,
" table-id %d", ntohl(path->table_id));
534 s =
format (s,
" rpf-id %d", ntohl(path->rpf_id));
542 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)
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
vnet_classify_main_t vnet_classify_main
From the control plane API.
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.
#define ip46_address_is_zero(ip46)
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)