32 ip46_address_t next_hop, *next_hops;
68 else if (
unformat (line_input,
"next-hop %U",
90 for (i = 0; i <
vec_len (mac_addrs); i++)
97 sw_if_index, mac_addrs[i].mac_addr);
124 .path =
"ip virtual",
125 .short_help =
"ip virtual <addr> <interface> [mac <Mi>]+ [next-hop <ip4_address>]+",
fib_protocol_t fp_proto
protocol type
ip46_address_t frp_addr
The next-hop address.
A representation of a path as described by a route producer.
vnet_main_t * vnet_get_main(void)
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.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
dpo_proto_t frp_proto
The protocol of the address below.
unformat_function_t unformat_vnet_sw_interface
adj_index_t adj_nbr_add_or_lock_w_rewrite(fib_protocol_t nh_proto, vnet_link_t link_type, const ip46_address_t *nh_addr, u32 sw_if_index, u8 *rewrite)
Add (and lock) a new or lock an existing neighbour adjacency.
#define clib_memcpy(d, s, n)
u32 frp_sw_if_index
The interface.
Aggregate type for a prefix.
#define clib_error_return(e, args...)
u16 fp_len
The mask length.
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
fib_mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
#define VLIB_CLI_COMMAND(x,...)
uword unformat_ethernet_address(unformat_input_t *input, va_list *args)
static clib_error_t * virtual_ip_cmd_fn_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vl_api_mac_address_t mac_addr
u8 frp_weight
[un]equal cost path weight
u32 frp_fib_index
The FIB index to lookup the nexthop Only valid for recursive paths.
vl_api_interface_index_t sw_if_index