blob: 1c5c578619e30b840c845bfd4330a680e2508743 [file] [log] [blame]
Pavel Kotucek20d12322016-12-21 09:13:17 +01001/*
2 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
Dave Barach0d056e52017-09-28 15:11:16 -040016vl_api_version 1.0.0
17
Klement Sekera239790f2017-02-16 10:53:53 +010018/** \brief Set BFD echo source
Pavel Kotucek20d12322016-12-21 09:13:17 +010019 @param client_index - opaque cookie to identify the sender
20 @param context - sender context, to match reply w/ request
Klement Sekera239790f2017-02-16 10:53:53 +010021 @param sw_if_index - interface to use as echo source
Pavel Kotucek20d12322016-12-21 09:13:17 +010022*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040023autoreply define bfd_udp_set_echo_source
Klement Sekerab17dd962017-01-09 07:43:48 +010024{
Pavel Kotucek20d12322016-12-21 09:13:17 +010025 u32 client_index;
26 u32 context;
Klement Sekera239790f2017-02-16 10:53:53 +010027 u32 sw_if_index;
Pavel Kotucek20d12322016-12-21 09:13:17 +010028};
29
Klement Sekera239790f2017-02-16 10:53:53 +010030/** \brief Delete BFD echo source
31 @param client_index - opaque cookie to identify the sender
32 @param context - sender context, to match reply w/ request
33*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040034autoreply define bfd_udp_del_echo_source
Klement Sekera239790f2017-02-16 10:53:53 +010035{
36 u32 client_index;
37 u32 context;
38};
39
Pavel Kotucek20d12322016-12-21 09:13:17 +010040/** \brief Add UDP BFD session on interface
41 @param client_index - opaque cookie to identify the sender
42 @param context - sender context, to match reply w/ request
43 @param sw_if_index - sw index of the interface
44 @param desired_min_tx - desired min transmit interval (microseconds)
45 @param required_min_rx - required min receive interval (microseconds)
Pavel Kotucek20d12322016-12-21 09:13:17 +010046 @param local_addr - local address
47 @param peer_addr - peer address
48 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
Klement Sekerab17dd962017-01-09 07:43:48 +010049 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
50 @param is_authenticated - non-zero if authentication is required
51 @param bfd_key_id - key id sent out in BFD packets (if is_authenticated)
52 @param conf_key_id - id of already configured key (if is_authenticated)
Pavel Kotucek20d12322016-12-21 09:13:17 +010053*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040054autoreply define bfd_udp_add
Klement Sekerab17dd962017-01-09 07:43:48 +010055{
Pavel Kotucek20d12322016-12-21 09:13:17 +010056 u32 client_index;
57 u32 context;
58 u32 sw_if_index;
59 u32 desired_min_tx;
60 u32 required_min_rx;
61 u8 local_addr[16];
62 u8 peer_addr[16];
63 u8 is_ipv6;
64 u8 detect_mult;
Klement Sekerab17dd962017-01-09 07:43:48 +010065 u8 is_authenticated;
66 u8 bfd_key_id;
67 u32 conf_key_id;
Pavel Kotucek20d12322016-12-21 09:13:17 +010068};
69
Klement Sekeraa57a9702017-02-02 06:58:07 +010070/** \brief Modify UDP BFD session on interface
71 @param client_index - opaque cookie to identify the sender
72 @param context - sender context, to match reply w/ request
73 @param sw_if_index - sw index of the interface
74 @param desired_min_tx - desired min transmit interval (microseconds)
75 @param required_min_rx - required min receive interval (microseconds)
76 @param local_addr - local address
77 @param peer_addr - peer address
78 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
79 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
80*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040081autoreply define bfd_udp_mod
Klement Sekeraa57a9702017-02-02 06:58:07 +010082{
83 u32 client_index;
84 u32 context;
85 u32 sw_if_index;
86 u32 desired_min_tx;
87 u32 required_min_rx;
88 u8 local_addr[16];
89 u8 peer_addr[16];
90 u8 is_ipv6;
91 u8 detect_mult;
92};
93
Pavel Kotucek20d12322016-12-21 09:13:17 +010094/** \brief Delete UDP BFD session on interface
95 @param client_index - opaque cookie to identify the sender
96 @param context - sender context, to match reply w/ request
97 @param sw_if_index - sw index of the interface
98 @param local_addr - local address
99 @param peer_addr - peer address
100 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
101*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400102autoreply define bfd_udp_del
Klement Sekerab17dd962017-01-09 07:43:48 +0100103{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100104 u32 client_index;
105 u32 context;
106 u32 sw_if_index;
107 u8 local_addr[16];
108 u8 peer_addr[16];
109 u8 is_ipv6;
110};
111
Pavel Kotucek20d12322016-12-21 09:13:17 +0100112/** \brief Get all BFD sessions
113 @param client_index - opaque cookie to identify the sender
114 @param context - sender context, to match reply w/ request
115*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100116define bfd_udp_session_dump
117{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100118 u32 client_index;
119 u32 context;
120};
121
122/** \brief BFD session details structure
123 @param context - sender context, to match reply w/ request
Pavel Kotucek20d12322016-12-21 09:13:17 +0100124 @param sw_if_index - sw index of the interface
125 @param local_addr - local address
126 @param peer_addr - peer address
127 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
128 @param state - session state
Klement Sekerab17dd962017-01-09 07:43:48 +0100129 @param is_authenticated - non-zero if authentication in-use, zero otherwise
130 @param bfd_key_id - ID of key currently in-use if auth is on
131 @param conf_key_id - configured key ID for this session
Klement Sekeraa57a9702017-02-02 06:58:07 +0100132 @param required_min_rx - required min receive interval (microseconds)
133 @param desired_min_tx - desired min transmit interval (microseconds)
134 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
Pavel Kotucek20d12322016-12-21 09:13:17 +0100135*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100136define bfd_udp_session_details
137{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100138 u32 context;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100139 u32 sw_if_index;
140 u8 local_addr[16];
141 u8 peer_addr[16];
142 u8 is_ipv6;
143 u8 state;
Klement Sekerab17dd962017-01-09 07:43:48 +0100144 u8 is_authenticated;
145 u8 bfd_key_id;
146 u32 conf_key_id;
Klement Sekeraa57a9702017-02-02 06:58:07 +0100147 u32 required_min_rx;
148 u32 desired_min_tx;
149 u8 detect_mult;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100150};
151
Klement Sekerab17dd962017-01-09 07:43:48 +0100152/** \brief Set flags of BFD UDP session
Pavel Kotucek20d12322016-12-21 09:13:17 +0100153 @param client_index - opaque cookie to identify the sender
154 @param context - sender context, to match reply w/ request
Klement Sekerab17dd962017-01-09 07:43:48 +0100155 @param sw_if_index - sw index of the interface
156 @param local_addr - local address
157 @param peer_addr - peer address
158 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
Pavel Kotucek20d12322016-12-21 09:13:17 +0100159 @param admin_up_down - set the admin state, 1 = up, 0 = down
160*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400161autoreply define bfd_udp_session_set_flags
Klement Sekerab17dd962017-01-09 07:43:48 +0100162{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100163 u32 client_index;
164 u32 context;
Klement Sekerab17dd962017-01-09 07:43:48 +0100165 u32 sw_if_index;
166 u8 local_addr[16];
167 u8 peer_addr[16];
168 u8 is_ipv6;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100169 u8 admin_up_down;
170};
171
Pavel Kotucek20d12322016-12-21 09:13:17 +0100172/** \brief Register for BFD events
173 @param client_index - opaque cookie to identify the sender
174 @param context - sender context, to match reply w/ request
175 @param enable_disable - 1 => register for events, 0 => cancel registration
176 @param pid - sender's pid
177*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400178autoreply define want_bfd_events
Pavel Kotucek20d12322016-12-21 09:13:17 +0100179{
180 u32 client_index;
181 u32 context;
182 u32 enable_disable;
183 u32 pid;
184};
185
Klement Sekerab17dd962017-01-09 07:43:48 +0100186/** \brief BFD UDP - add/replace key to configuration
187 @param client_index - opaque cookie to identify the sender
188 @param context - sender context, to match reply w/ request
189 @param conf_key_id - key ID to add/replace/delete
190 @param key_len - length of key (must be non-zero)
191 @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
192 @param key - key data
193*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400194autoreply define bfd_auth_set_key
Klement Sekerab17dd962017-01-09 07:43:48 +0100195{
196 u32 client_index;
197 u32 context;
198 u32 conf_key_id;
199 u8 key_len;
200 u8 auth_type;
201 u8 key[20];
202};
203
Klement Sekerab17dd962017-01-09 07:43:48 +0100204/** \brief BFD UDP - delete key from configuration
205 @param client_index - opaque cookie to identify the sender
206 @param context - sender context, to match reply w/ request
207 @param conf_key_id - key ID to add/replace/delete
208 @param key_len - length of key (must be non-zero)
209 @param key - key data
210*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400211autoreply define bfd_auth_del_key
Klement Sekerab17dd962017-01-09 07:43:48 +0100212{
213 u32 client_index;
214 u32 context;
215 u32 conf_key_id;
216};
217
Klement Sekerab17dd962017-01-09 07:43:48 +0100218/** \brief Get a list of configured authentication keys
219 @param client_index - opaque cookie to identify the sender
220 @param context - sender context, to match reply w/ request
221*/
222define bfd_auth_keys_dump
223{
224 u32 client_index;
225 u32 context;
226};
227
228/** \brief BFD authentication key details
229 @param context - sender context, to match reply w/ request
230 @param conf_key_id - configured key ID
231 @param use_count - how many BFD sessions currently use this key
232 @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
233*/
234define bfd_auth_keys_details
235{
236 u32 context;
237 u32 conf_key_id;
238 u32 use_count;
239 u8 auth_type;
240};
241
242/** \brief BFD UDP - activate/change authentication
243 @param client_index - opaque cookie to identify the sender
244 @param context - sender context, to match reply w/ request
245 @param sw_if_index - sw index of the interface
246 @param local_addr - local address
247 @param peer_addr - peer address
248 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
249 @param is_delayed - change is applied once peer applies the change (on first received packet with this auth)
250 @param bfd_key_id - key id sent out in BFD packets
251 @param conf_key_id - id of already configured key
252*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400253autoreply define bfd_udp_auth_activate
Klement Sekerab17dd962017-01-09 07:43:48 +0100254{
255 u32 client_index;
256 u32 context;
257 u32 sw_if_index;
258 u8 local_addr[16];
259 u8 peer_addr[16];
260 u8 is_ipv6;
261 u8 is_delayed;
262 u8 bfd_key_id;
263 u32 conf_key_id;
264};
265
Klement Sekerab17dd962017-01-09 07:43:48 +0100266/** \brief BFD UDP - deactivate authentication
267 @param client_index - opaque cookie to identify the sender
268 @param context - sender context, to match reply w/ request
269 @param sw_if_index - sw index of the interface
270 @param local_addr - local address
271 @param peer_addr - peer address
272 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
273 @param is_delayed - change is applied once peer applies the change (on first received non-authenticated packet)
274*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400275autoreply define bfd_udp_auth_deactivate
Klement Sekerab17dd962017-01-09 07:43:48 +0100276{
277 u32 client_index;
278 u32 context;
279 u32 sw_if_index;
280 u8 local_addr[16];
281 u8 peer_addr[16];
282 u8 is_ipv6;
283 u8 is_delayed;
284};
285
Pavel Kotucek20d12322016-12-21 09:13:17 +0100286/*
287 * Local Variables:
288 * eval: (c-set-style "gnu")
289 * End:
290 */