FD.io VPP  v20.05-21-gb1500e9ff
Vector Packet Processing
vrrp.api
Go to the documentation of this file.
1 /*
2  * Copyright 2019-2020 Rubicon Communications, LLC (Netgate)
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  */
7 
8 option version = "1.0.1";
9 
10 import "vnet/interface_types.api";
11 import "vnet/ip/ip_types.api";
12 import "vnet/ethernet/ethernet_types.api";
13 
14 typedef vrrp_vr_key
15 {
16  vl_api_interface_index_t sw_if_index;
19 };
20 
22 {
27 };
28 
29 typedef vrrp_vr_conf
30 {
31  vl_api_interface_index_t sw_if_index;
32  u8 vr_id;
35  vl_api_vrrp_vr_flags_t flags;
36 };
37 
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
49 */
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];
61 };
62 
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")
67 */
68 define vrrp_vr_dump {
71  vl_api_interface_index_t sw_if_index;
72 };
73 
75 {
80 };
81 
82 typedef vrrp_vr_tracking
83 {
84  u32 interfaces_dec;
85  u8 priority;
86 };
87 
88 typedef vrrp_vr_runtime
89 {
90  vl_api_vrrp_vr_state_t state;
94  vl_api_mac_address_t mac;
95  vl_api_vrrp_vr_tracking_t tracking;
96 };
97 
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
102 */
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];
109 };
110 
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
115  @param vr_id - VR ID
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
118 */
119 autoreply define vrrp_vr_start_stop {
122  vl_api_interface_index_t sw_if_index;
126 };
127 
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
132  @param vr_id - VR ID
133  @param is_ipv6 - 1 for IPv6, 0 for IPv4
134  @param n_addrs - number of peer addresses
135  @param addrs - peer addresses
136 */
137 autoreply define vrrp_vr_set_peers {
140  vl_api_interface_index_t sw_if_index;
144  vl_api_address_t addrs[n_addrs];
145 };
146 
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
153 */
154 define vrrp_vr_peer_dump {
157  vl_api_interface_index_t sw_if_index;
160 };
161 
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
169 */
170 define vrrp_vr_peer_details {
173  vl_api_interface_index_t sw_if_index;
177  vl_api_address_t peer_addrs[n_peer_addrs];
178 };
179 
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
183 */
184 typedef vrrp_vr_track_if
185 {
186  vl_api_interface_index_t sw_if_index;
187  u8 priority;
188 };
189 
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
198 */
199 autoreply define vrrp_vr_track_if_add_del
200 {
203  vl_api_interface_index_t sw_if_index;
208  vl_api_vrrp_vr_track_if_t ifs[n_ifs];
209 };
210 
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
218 */
219 define vrrp_vr_track_if_dump {
222  vl_api_interface_index_t sw_if_index;
226 };
227 
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
235 */
236 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];
244 };
u16 master_down_int
Definition: vrrp.api:93
u8 is_ipv6
Definition: vrrp.api:18
int vrrp_vr_start_stop(u8 is_start, vrrp_vr_key_t *vr_key)
Definition: vrrp.c:661
vl_api_interface_index_t sw_if_index
Definition: vrrp.api:54
u8 vr_id
Definition: vrrp.api:17
int vrrp_vr_set_peers(vrrp_vr_key_t *vr_key, ip46_address_t *peers)
Definition: vrrp.c:754
vl_api_mac_address_t mac
Definition: vrrp.api:94
vl_api_interface_index_t sw_if_index
Definition: vrrp.api:157
typedef vrrp_vr_track_if
VR interface tracking.
Definition: vrrp.api:185
unsigned char u8
Definition: types.h:56
vl_api_interface_index_t sw_if_index
Definition: vrrp.api:222
vl_api_interface_index_t sw_if_index
Definition: gre.api:53
unsigned int u32
Definition: types.h:88
u8 priority
Definition: vrrp.api:33
vl_api_interface_index_t sw_if_index
Definition: vrrp.api:239
vl_api_interface_index_t sw_if_index
Definition: vrrp.api:122
unsigned short u16
Definition: types.h:57
vl_api_vrrp_vr_conf_t config
Definition: vrrp.api:105
vl_api_interface_index_t sw_if_index
Definition: vrrp.api:140
int vrrp_vr_add_del(u8 is_add, vrrp_vr_config_t *vr_conf)
Definition: vrrp.c:573
u16 interval
Definition: vrrp.api:34
vl_api_vrrp_vr_flags_t flags
Definition: vrrp.api:58
vl_api_interface_index_t sw_if_index
Definition: vrrp.api:173
vl_api_interface_index_t sw_if_index
Definition: vrrp.api:203
vl_api_vrrp_vr_tracking_t tracking
Definition: vrrp.api:95
vrrp_vr_state
Definition: vrrp.api:74
vl_api_dhcp_client_state_t state
Definition: dhcp.api:201
u16 skew
Definition: vrrp.api:92
option version
Definition: vrrp.api:8
vl_api_vrrp_vr_flags_t flags
Definition: vrrp.api:35
vl_api_interface_index_t sw_if_index
Definition: vrrp.api:71
u16 master_adv_int
Definition: vrrp.api:91
vl_api_vrrp_vr_runtime_t runtime
Definition: vrrp.api:106
typedef vrrp_vr_conf
Definition: vrrp.api:30
vrrp_vr_flags
Definition: vrrp.api:21