summaryrefslogtreecommitdiffstats
path: root/src/plugins/vrrp/vrrp.api
diff options
context:
space:
mode:
authorEmanuele Di Pascale <lele84@gmail.com>2022-03-29 12:29:23 +0200
committerEmanuele Di Pascale <lele84@gmail.com>2022-04-01 18:10:35 +0200
commit7539e4b5522b015a715ba49eed4477b8cece1b86 (patch)
tree9f181557091c4125d1561f606fa40f4d0f5d2ef5 /src/plugins/vrrp/vrrp.api
parent2518dca440f1ef41500d73067fe44318b782b98d (diff)
vrrp: add stats support and update API
Add simple counter statistics to VRRP, based on a subset of those defined in RFC8347. Add an update API that allows in-place modification of an existing instance. The method returns a vrrp_index which can be used both for retrieving statistics and to modify non-key parameters. Also add a delete method which will take that vrrp_index as parameter. Type: improvement Signed-off-by: Emanuele Di Pascale <lele84@gmail.com> Change-Id: I2cd11467b4dbd9dfdb5aa748783144b4883dba57
Diffstat (limited to 'src/plugins/vrrp/vrrp.api')
-rw-r--r--src/plugins/vrrp/vrrp.api51
1 files changed, 50 insertions, 1 deletions
diff --git a/src/plugins/vrrp/vrrp.api b/src/plugins/vrrp/vrrp.api
index a34b06ffc57..03193e99a2c 100644
--- a/src/plugins/vrrp/vrrp.api
+++ b/src/plugins/vrrp/vrrp.api
@@ -5,7 +5,7 @@
*
*/
-option version = "1.0.1";
+option version = "1.1.1";
import "vnet/interface_types.api";
import "vnet/ip/ip_types.api";
@@ -60,6 +60,55 @@ autoreply define vrrp_vr_add_del {
vl_api_address_t addrs[n_addrs];
};
+/** @brief Replace an existing VRRP virtual router in-place or create a new one
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param vrrp_index - an existing VRRP entry to replace, or 0xffffffff to crate a new one
+ @param sw_if_index - interface backed up by this vr
+ @param vr_id - the VR ID advertised by this vr
+ @param priority - the priority advertised for this vr
+ @param interval - interval between advertisements in centiseconds
+ @param flags - bit flags for booleans - preempt, accept, unicast, ipv6
+ @param n_addrs - number of addresses being backed up by this vr
+ @param addrs - the addresses backed up by this vr
+*/
+define vrrp_vr_update {
+ u32 client_index;
+ u32 context;
+ u32 vrrp_index;
+ vl_api_interface_index_t sw_if_index;
+ u8 vr_id;
+ u8 priority;
+ u16 interval;
+ vl_api_vrrp_vr_flags_t flags;
+ u8 n_addrs;
+ vl_api_address_t addrs[n_addrs];
+};
+
+/**
+ * @brief Reply to a VRRP add/replace
+ * @param context - returned sender context, to match reply w/ request
+ * @param vrrp_index - index of the updated or newly created VRRP instance
+ * @param retval 0 - no error
+ */
+define vrrp_vr_update_reply {
+ u32 context;
+ i32 retval;
+ u32 vrrp_index;
+};
+
+/**
+ * @brief Delete an existing VRRP instance
+ * @param client_index - opaque cookie to identify the sender
+ * @param context - returned sender context, to match reply w/ request
+ * @param vrrp_index - index of the VRRP instance to delete
+ */
+autoreply define vrrp_vr_del {
+ u32 client_index;
+ u32 context;
+ u32 vrrp_index;
+};
+
/** \brief VRRP: dump virtual router data
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request