2 * Copyright 2019-2020 Rubicon Communications, LLC (Netgate)
4 * SPDX-License-Identifier: Apache-2.0
8 option version = "1.0.0";
10 import "vnet/interface_types.api";
11 import "vnet/ip/ip_types.api";
12 import "vnet/ethernet/ethernet_types.api";
16 vl_api_interface_index_t sw_if_index;
23 VRRP_API_VR_PREEMPT = 0x1,
24 VRRP_API_VR_ACCEPT = 0x2,
25 VRRP_API_VR_UNICAST = 0x4,
26 VRRP_API_VR_IPV6 = 0x8,
31 vl_api_interface_index_t sw_if_index;
35 vl_api_vrrp_vr_flags_t flags;
38 /** \brief VRRP: Add or delete a VRRP virtual router
39 @param client_index - opaque cookie to identify the sender
40 @param context - sender context, to match reply w/ request
41 @param is_add - 0 if deleting, != 0 if adding
42 @param sw_if_index - interface backed up by this vr
43 @param vr_id - the VR ID advertised by this vr
44 @param priority - the priority advertised for this vr
45 @param interval - interval between advertisements in centiseconds
46 @param flags - bit flags for booleans - preempt, accept, unicast, ipv6
47 @param n_addrs - number of addresses being backed up by this vr
48 @param addrs - the addresses backed up by this vr
50 autoreply define vrrp_vr_add_del {
54 vl_api_interface_index_t sw_if_index;
58 vl_api_vrrp_vr_flags_t flags;
60 vl_api_address_t addrs[n_addrs];
63 /** \brief VRRP: dump virtual router data
64 @param client_index - opaque cookie to identify the sender
65 @param context - sender context, to match reply w/ request
66 @param sw_if_index - interface to use as filter (0,~0 == "all")
71 vl_api_interface_index_t sw_if_index;
76 VRRP_API_VR_STATE_INIT = 0,
77 VRRP_API_VR_STATE_BACKUP,
78 VRRP_API_VR_STATE_MASTER,
79 VRRP_API_VR_STATE_INTF_DOWN,
82 typedef vrrp_vr_tracking
88 typedef vrrp_vr_runtime
90 vl_api_vrrp_vr_state_t state;
94 vl_api_mac_address_t mac;
95 vl_api_vrrp_vr_tracking_t tracking;
98 /** \brief VRRP: VR dump response
99 @param context - sender context which was passed in the request
100 @param conf - configuration parameters for the VR
101 @param runtime - runtime state for the VR
103 define vrrp_vr_details {
105 vl_api_vrrp_vr_conf_t config;
106 vl_api_vrrp_vr_runtime_t runtime;
108 vl_api_address_t addrs[n_addrs];
111 /** \brief VRRP: start or shutdown the VRRP protocol for a virtual router
112 @param client_index - opaque cookie to identify the sender
113 @param context - sender context, to match reply w/ request
114 @param sw_if_index - interface ID that VR is backing up
116 @param is_ipv6 - 1 for IPv6, 0 for IPv4
117 @param is_start - 1 to start VRRP proto on this VR, 0 to shutdown
119 autoreply define vrrp_vr_start_stop {
122 vl_api_interface_index_t sw_if_index;
128 /** \brief VRRP: set unicast peers for a VR
129 @param client_index - opaque cookie to identify the sender
130 @param context - sender context, to match reply w/ request
131 @param sw_if_index - interface ID that VR is backing up
133 @param is_ipv6 - 1 for IPv6, 0 for IPv4
134 @param n_addrs - number of peer addresses
135 @param addrs - peer addresses
137 autoreply define vrrp_vr_set_peers {
140 vl_api_interface_index_t sw_if_index;
144 vl_api_address_t addrs[n_addrs];
147 /** \brief VRRP: dump virtual router peer address data
148 @param client_index - opaque cookie to identify the sender
149 @param context - sender context, to match reply w/ request
150 @param sw_if_index - interface (0,~0 == "all" -> ignore is_ipv6 & vr_id))
151 @param is_ipv6 - 0 -> IPv4, 1 -> IPv6
152 @param vr_id - ID of VR to dump
154 define vrrp_vr_peer_dump {
157 vl_api_interface_index_t sw_if_index;
162 /** \brief VRRP: VR peer dump response
163 @param context - sender context which was passed in the request
164 @param sw_if_index - interface index
165 @param is_ipv6 - 0 -> IPv4, 1 -> IPv6
166 @param vr_id - ID of VR
167 @param n_peer_addrs - number of peer addresses
168 @param peer_addrs - peer addresses
170 autoreply define vrrp_vr_peer_details {
173 vl_api_interface_index_t sw_if_index;
177 vl_api_address_t peer_addrs[n_peer_addrs];
180 /** \brief VR interface tracking
181 @param sw_if_index - the interface index to track (not the VR sw_if_index)
182 @param priority - the adjustment to VR priority if intf is down
184 typedef vrrp_vr_track_if
186 vl_api_interface_index_t sw_if_index;
190 /** \brief VRRP: Add/delete VR priority tracking of interface status
191 @param context - sender context which was passed in the request
192 @param sw_if_index - interface index
193 @param is_ipv6 - 0 -> IPv4, 1 -> IPv6
194 @param vr_id - ID of VR
195 @param is_add - 0 -> delete, 1 -> add
196 @param n_ifs - number of interface tracking records
197 @param ifs - array of interface tracking records
199 autoreply define vrrp_vr_track_if_add_del
203 vl_api_interface_index_t sw_if_index;
208 vl_api_vrrp_vr_track_if_t ifs[n_ifs];
211 /** \brief VRRP: dump virtual router interface tracking data
212 @param client_index - opaque cookie to identify the sender
213 @param context - sender context, to match reply w/ request
214 @param sw_if_index - interface
215 @param is_ipv6 - 0 -> IPv4, 1 -> IPv6
216 @param vr_id - ID of VR to dump
217 @param dump_all - dump all VR interface tracking, ignore other fields
219 define vrrp_vr_track_if_dump {
222 vl_api_interface_index_t sw_if_index;
228 /** \brief VRRP: VR interface tracking dump response
229 @param context - sender context which was passed in the request
230 @param sw_if_index - interface index
231 @param is_ipv6 - 0 -> IPv4, 1 -> IPv6
232 @param vr_id - ID of VR
233 @param n_ifs - number of tracked interfaces
234 @param ifs - array of tracked interface data
236 autoreply define vrrp_vr_track_if_details {
239 vl_api_interface_index_t sw_if_index;
243 vl_api_vrrp_vr_track_if_t ifs[n_ifs];