summaryrefslogtreecommitdiffstats
path: root/src/plugins/vrrp/vrrp.api
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2020-10-08 11:11:27 -0500
committerDamjan Marion <dmarion@me.com>2020-10-24 09:28:56 +0000
commit78f487e113fb0fbd1a06b90f3681d237f7edc495 (patch)
treea159c81a61fc16cd5a590bd6149f10e57abb3995 /src/plugins/vrrp/vrrp.api
parent4df9f737a24be94c2988f18337a4ad845b1b0186 (diff)
vrrp: asynchronous events on VR state change
Type: feature Add API message for an API client to subscribe/unsubscribe to receive an event when a VRRP VR changes state. Add code to build and send the events. Change-Id: Ie92cadd4850d4352c1aaa79c4b0a7daa0f3b04e7 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/plugins/vrrp/vrrp.api')
-rw-r--r--src/plugins/vrrp/vrrp.api35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/plugins/vrrp/vrrp.api b/src/plugins/vrrp/vrrp.api
index da485adf9b8..a34b06ffc57 100644
--- a/src/plugins/vrrp/vrrp.api
+++ b/src/plugins/vrrp/vrrp.api
@@ -242,3 +242,38 @@ define vrrp_vr_track_if_details {
u8 n_ifs;
vl_api_vrrp_vr_track_if_t ifs[n_ifs];
};
+
+/** \brief Notification about VRRP VR state change event
+ @param client_index - opaque cookie to identify the sender
+ @param pid - client pid registered to receive notification
+ @param vr - configuration parameters identifying the VR
+ @param old_state - old state of VR
+ @param new_state - new state of VR
+*/
+define vrrp_vr_event
+{
+ u32 client_index;
+ u32 pid;
+ vl_api_vrrp_vr_key_t vr;
+ vl_api_vrrp_vr_state_t old_state;
+ vl_api_vrrp_vr_state_t new_state;
+};
+
+service {
+ rpc want_vrrp_vr_events returns want_vrrp_vr_events_reply
+ events vrrp_vr_event;
+};
+
+/** \brief Register for VRRP VR state change events
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param enable_disable - 1 to register, 0 to cancel registration
+ @param pid - sender's pid
+*/
+autoreply define want_vrrp_vr_events
+{
+ u32 client_index;
+ u32 context;
+ bool enable_disable;
+ u32 pid;
+};