vr_conf.adv_interval = (u16) interval;
vr_conf.vr_addrs = addrs;
- rv = vrrp_vr_add_del (is_add, &vr_conf);
+ rv = vrrp_vr_add_del (is_add, &vr_conf, NULL);
switch (rv)
{
return vrrp_vr_add_del_command_fn (vm, input, cmd, 1 /* is_add */ );
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vrrp_vr_add_command, static) =
{
.path = "vrrp vr add",
"vrrp vr add <interface> [vr_id <n>] [ipv6] [priority <value>] [interval <value>] [no_preempt] [accept_mode] [unicast] [<ip_addr> ...]",
.function = vrrp_vr_add_command_fn,
};
-/* *INDENT-ON* */
static clib_error_t *
vrrp_vr_del_command_fn (vlib_main_t * vm, unformat_input_t * input,
return vrrp_vr_add_del_command_fn (vm, input, cmd, 0 /* is_add */ );
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vrrp_vr_del_command, static) =
{
.path = "vrrp vr del",
.short_help = "vrrp vr del <interface> [vr_id <n>] [ipv6]",
.function = vrrp_vr_del_command_fn,
};
-/* *INDENT-ON* */
static clib_error_t *
vrrp_show_vr_command_fn (vlib_main_t * vm,
break;
}
- pool_foreach (vr, vmp->vrs, (
- {
+ pool_foreach (vr, vmp->vrs)
+ {
- if (sw_if_index && (sw_if_index != ~0) &&
- (sw_if_index != vr->config.sw_if_index))
- continue;
- vlib_cli_output (vm, "%U", format_vrrp_vr,
- vr);}
- ));
+ if (sw_if_index && (sw_if_index != ~0) &&
+ (sw_if_index != vr->config.sw_if_index))
+ continue;
+ vlib_cli_output (vm, "%U", format_vrrp_vr, vr);
+ }
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vrrp_show_vr_command, static) =
{
.path = "show vrrp vr",
"show vrrp vr [(<intf_name>|sw_if_index <n>)]",
.function = vrrp_show_vr_command_fn,
};
-/* *INDENT-ON* */
static clib_error_t *
vrrp_proto_start_stop_command_fn (vlib_main_t * vm,
if (unformat (input, "%U", unformat_vnet_sw_interface, vmp->vnet_main,
&sw_if_index))
;
+ else if (unformat (input, "sw_if_index %u", &sw_if_index))
+ ;
else if (unformat (input, "vr_id %u", &vr_id))
;
else if (unformat (input, "ipv6"))
if (unformat (input, "%U", unformat_vnet_sw_interface, vmp->vnet_main,
&sw_if_index))
;
+ else if (unformat (input, "sw_if_index %u", &sw_if_index))
+ ;
else if (unformat (input, "vr_id %u", &vr_id))
;
else if (unformat (input, "ipv6"))
return ret;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vrrp_proto_start_stop_command, static) =
{
.path = "vrrp proto",
"vrrp proto (start|stop) (<intf_name>|sw_if_index <n>) vr_id <n> [ipv6]",
.function = vrrp_proto_start_stop_command_fn,
};
-/* *INDENT-ON* */
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vrrp_peers_command, static) =
{
.path = "vrrp peers",
"vrrp peers (<intf_name>|sw_if_index <n>) vr_id <n> [ipv6] <peer1_addr> [<peer2_addr> ...]",
.function = vrrp_peers_command_fn,
};
-/* *INDENT-ON* */
static clib_error_t *
vrrp_vr_track_if_command_fn (vlib_main_t * vm,
if (unformat (input, "%U", unformat_vnet_sw_interface, vmp->vnet_main,
&sw_if_index))
;
+ else if (unformat (input, "sw_if_index %u", &sw_if_index))
+ ;
else if (unformat (input, "add"))
is_add = 1;
else if (unformat (input, "del"))
return ret;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (vrrp_vr_track_if_command, static) =
{
.path = "vrrp vr track-if",
"vrrp vr track-if (add|del) (<intf_name>|sw_if_index <n>) vr_id <n> [ipv6] track-index <n> priority <n> [ track-index <n> priority <n> ...]",
.function = vrrp_vr_track_if_command_fn,
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON