nat: documention fix
[vpp.git] / src / plugins / vrrp / vrrp.api
index 1894d1c..03193e9 100644 (file)
@@ -5,7 +5,7 @@
  *
  */
 
-option version = "1.0.0";
+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
@@ -167,7 +216,7 @@ define vrrp_vr_peer_dump {
     @param n_peer_addrs - number of peer addresses
     @param peer_addrs - peer addresses 
 */
-autoreply define vrrp_vr_peer_details {
+define vrrp_vr_peer_details {
   u32 client_index;
   u32 context;
   vl_api_interface_index_t sw_if_index;
@@ -233,7 +282,7 @@ define vrrp_vr_track_if_dump {
     @param n_ifs - number of tracked interfaces
     @param ifs - array of tracked interface data
 */
-autoreply define vrrp_vr_track_if_details {
+define vrrp_vr_track_if_details {
   u32 client_index;
   u32 context;
   vl_api_interface_index_t sw_if_index;
@@ -243,3 +292,37 @@ autoreply define vrrp_vr_track_if_details {
   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;
+};