blob: 93bf0fb90e8a93fa689b0daa0bf14c22514caaf3 [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
Klement Sekera239790f2017-02-16 10:53:53 +010016/** \brief Set BFD echo source
Pavel Kotucek20d12322016-12-21 09:13:17 +010017 @param client_index - opaque cookie to identify the sender
18 @param context - sender context, to match reply w/ request
Klement Sekera239790f2017-02-16 10:53:53 +010019 @param sw_if_index - interface to use as echo source
Pavel Kotucek20d12322016-12-21 09:13:17 +010020*/
Klement Sekera239790f2017-02-16 10:53:53 +010021define bfd_udp_set_echo_source
Klement Sekerab17dd962017-01-09 07:43:48 +010022{
Pavel Kotucek20d12322016-12-21 09:13:17 +010023 u32 client_index;
24 u32 context;
Klement Sekera239790f2017-02-16 10:53:53 +010025 u32 sw_if_index;
Pavel Kotucek20d12322016-12-21 09:13:17 +010026};
27
Klement Sekera239790f2017-02-16 10:53:53 +010028/** \brief Set BFD feature response
Pavel Kotucek20d12322016-12-21 09:13:17 +010029 @param context - sender context, to match reply w/ request
30 @param retval - return code for the request
31*/
Klement Sekera239790f2017-02-16 10:53:53 +010032define bfd_udp_set_echo_source_reply
33{
34 u32 context;
35 i32 retval;
36};
37
38/** \brief Delete BFD echo source
39 @param client_index - opaque cookie to identify the sender
40 @param context - sender context, to match reply w/ request
41*/
42define bfd_udp_del_echo_source
43{
44 u32 client_index;
45 u32 context;
46};
47
48/** \brief Delete BFD feature response
49 @param context - sender context, to match reply w/ request
50 @param retval - return code for the request
51*/
52define bfd_udp_del_echo_source_reply
Klement Sekerab17dd962017-01-09 07:43:48 +010053{
Pavel Kotucek20d12322016-12-21 09:13:17 +010054 u32 context;
55 i32 retval;
56};
57
58/** \brief Get BFD configuration
59*/
Klement Sekerab17dd962017-01-09 07:43:48 +010060define bfd_get_config
61{
Pavel Kotucek20d12322016-12-21 09:13:17 +010062 u32 client_index;
63 u32 context;
64};
65
66/** \brief Get BFD configuration response
67 @param context - sender context, to match reply w/ request
68 @param retval - return code for the request
69 @param slow_timer - slow timer (seconds)
70 @param min_tx - desired min tx interval
71 @param min_rx - desired min rx interval
72 @param detect_mult - desired detection multiplier
73*/
Klement Sekerab17dd962017-01-09 07:43:48 +010074define bfd_get_config_reply
75{
Pavel Kotucek20d12322016-12-21 09:13:17 +010076 u32 client_index;
77 u32 context;
78 u32 slow_timer;
79 u32 min_tx;
80 u32 min_rx;
81 u8 detect_mult;
82};
83
84/** \brief Add UDP BFD session on interface
85 @param client_index - opaque cookie to identify the sender
86 @param context - sender context, to match reply w/ request
87 @param sw_if_index - sw index of the interface
88 @param desired_min_tx - desired min transmit interval (microseconds)
89 @param required_min_rx - required min receive interval (microseconds)
Pavel Kotucek20d12322016-12-21 09:13:17 +010090 @param local_addr - local address
91 @param peer_addr - peer address
92 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
Klement Sekerab17dd962017-01-09 07:43:48 +010093 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
94 @param is_authenticated - non-zero if authentication is required
95 @param bfd_key_id - key id sent out in BFD packets (if is_authenticated)
96 @param conf_key_id - id of already configured key (if is_authenticated)
Pavel Kotucek20d12322016-12-21 09:13:17 +010097*/
Klement Sekerab17dd962017-01-09 07:43:48 +010098define bfd_udp_add
99{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100100 u32 client_index;
101 u32 context;
102 u32 sw_if_index;
103 u32 desired_min_tx;
104 u32 required_min_rx;
105 u8 local_addr[16];
106 u8 peer_addr[16];
107 u8 is_ipv6;
108 u8 detect_mult;
Klement Sekerab17dd962017-01-09 07:43:48 +0100109 u8 is_authenticated;
110 u8 bfd_key_id;
111 u32 conf_key_id;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100112};
113
114/** \brief Add UDP BFD session response
115 @param context - sender context, to match reply w/ request
116 @param retval - return code for the request
Pavel Kotucek20d12322016-12-21 09:13:17 +0100117*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100118define bfd_udp_add_reply
119{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100120 u32 context;
121 i32 retval;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100122};
123
Klement Sekeraa57a9702017-02-02 06:58:07 +0100124/** \brief Modify UDP BFD session on interface
125 @param client_index - opaque cookie to identify the sender
126 @param context - sender context, to match reply w/ request
127 @param sw_if_index - sw index of the interface
128 @param desired_min_tx - desired min transmit interval (microseconds)
129 @param required_min_rx - required min receive interval (microseconds)
130 @param local_addr - local address
131 @param peer_addr - peer address
132 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
133 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
134*/
135define bfd_udp_mod
136{
137 u32 client_index;
138 u32 context;
139 u32 sw_if_index;
140 u32 desired_min_tx;
141 u32 required_min_rx;
142 u8 local_addr[16];
143 u8 peer_addr[16];
144 u8 is_ipv6;
145 u8 detect_mult;
146};
147
148/** \brief Modify UDP BFD session response
149 @param context - sender context, to match reply w/ request
150 @param retval - return code for the request
151*/
152define bfd_udp_mod_reply
153{
154 u32 context;
155 i32 retval;
156};
157
Pavel Kotucek20d12322016-12-21 09:13:17 +0100158/** \brief Delete UDP BFD session on interface
159 @param client_index - opaque cookie to identify the sender
160 @param context - sender context, to match reply w/ request
161 @param sw_if_index - sw index of the interface
162 @param local_addr - local address
163 @param peer_addr - peer address
164 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
165*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100166define bfd_udp_del
167{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100168 u32 client_index;
169 u32 context;
170 u32 sw_if_index;
171 u8 local_addr[16];
172 u8 peer_addr[16];
173 u8 is_ipv6;
174};
175
176/** \brief Delete UDP BFD session response
177 @param context - sender context, to match reply w/ request
178 @param retval - return code for the request
179*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100180define bfd_udp_del_reply
181{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100182 u32 context;
183 i32 retval;
184};
185
186/** \brief Get all BFD sessions
187 @param client_index - opaque cookie to identify the sender
188 @param context - sender context, to match reply w/ request
189*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100190define bfd_udp_session_dump
191{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100192 u32 client_index;
193 u32 context;
194};
195
196/** \brief BFD session details structure
197 @param context - sender context, to match reply w/ request
Pavel Kotucek20d12322016-12-21 09:13:17 +0100198 @param sw_if_index - sw index of the interface
199 @param local_addr - local address
200 @param peer_addr - peer address
201 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
202 @param state - session state
Klement Sekerab17dd962017-01-09 07:43:48 +0100203 @param is_authenticated - non-zero if authentication in-use, zero otherwise
204 @param bfd_key_id - ID of key currently in-use if auth is on
205 @param conf_key_id - configured key ID for this session
Klement Sekeraa57a9702017-02-02 06:58:07 +0100206 @param required_min_rx - required min receive interval (microseconds)
207 @param desired_min_tx - desired min transmit interval (microseconds)
208 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
Pavel Kotucek20d12322016-12-21 09:13:17 +0100209*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100210define bfd_udp_session_details
211{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100212 u32 context;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100213 u32 sw_if_index;
214 u8 local_addr[16];
215 u8 peer_addr[16];
216 u8 is_ipv6;
217 u8 state;
Klement Sekerab17dd962017-01-09 07:43:48 +0100218 u8 is_authenticated;
219 u8 bfd_key_id;
220 u32 conf_key_id;
Klement Sekeraa57a9702017-02-02 06:58:07 +0100221 u32 required_min_rx;
222 u32 desired_min_tx;
223 u8 detect_mult;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100224};
225
Klement Sekerab17dd962017-01-09 07:43:48 +0100226/** \brief Set flags of BFD UDP session
Pavel Kotucek20d12322016-12-21 09:13:17 +0100227 @param client_index - opaque cookie to identify the sender
228 @param context - sender context, to match reply w/ request
Klement Sekerab17dd962017-01-09 07:43:48 +0100229 @param sw_if_index - sw index of the interface
230 @param local_addr - local address
231 @param peer_addr - peer address
232 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
Pavel Kotucek20d12322016-12-21 09:13:17 +0100233 @param admin_up_down - set the admin state, 1 = up, 0 = down
234*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100235define bfd_udp_session_set_flags
236{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100237 u32 client_index;
238 u32 context;
Klement Sekerab17dd962017-01-09 07:43:48 +0100239 u32 sw_if_index;
240 u8 local_addr[16];
241 u8 peer_addr[16];
242 u8 is_ipv6;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100243 u8 admin_up_down;
244};
245
Klement Sekerab17dd962017-01-09 07:43:48 +0100246/** \brief Reply to bfd_udp_session_set_flags
Pavel Kotucek20d12322016-12-21 09:13:17 +0100247 @param context - sender context which was passed in the request
248 @param retval - return code of the set flags request
249*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100250define bfd_udp_session_set_flags_reply
Pavel Kotucek20d12322016-12-21 09:13:17 +0100251{
252 u32 context;
253 i32 retval;
254};
255
256/** \brief Register for BFD events
257 @param client_index - opaque cookie to identify the sender
258 @param context - sender context, to match reply w/ request
259 @param enable_disable - 1 => register for events, 0 => cancel registration
260 @param pid - sender's pid
261*/
262define want_bfd_events
263{
264 u32 client_index;
265 u32 context;
266 u32 enable_disable;
267 u32 pid;
268};
269
270/** \brief Reply for BFD events registration
271 @param context - returned sender context, to match reply w/ request
272 @param retval - return code
273*/
274define want_bfd_events_reply
275{
276 u32 context;
277 i32 retval;
278};
279
Klement Sekerab17dd962017-01-09 07:43:48 +0100280/** \brief BFD UDP - add/replace key to configuration
281 @param client_index - opaque cookie to identify the sender
282 @param context - sender context, to match reply w/ request
283 @param conf_key_id - key ID to add/replace/delete
284 @param key_len - length of key (must be non-zero)
285 @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
286 @param key - key data
287*/
288define bfd_auth_set_key
289{
290 u32 client_index;
291 u32 context;
292 u32 conf_key_id;
293 u8 key_len;
294 u8 auth_type;
295 u8 key[20];
296};
297
298/** \brief BFD UDP - add/replace key reply
299 @param context - returned sender context, to match reply w/ request
300 @param retval - return code
301*/
302define bfd_auth_set_key_reply
303{
304 u32 context;
305 i32 retval;
306};
307
308/** \brief BFD UDP - delete key from configuration
309 @param client_index - opaque cookie to identify the sender
310 @param context - sender context, to match reply w/ request
311 @param conf_key_id - key ID to add/replace/delete
312 @param key_len - length of key (must be non-zero)
313 @param key - key data
314*/
315define bfd_auth_del_key
316{
317 u32 client_index;
318 u32 context;
319 u32 conf_key_id;
320};
321
322/** \brief BFD UDP - delete key reply
323 @param context - returned sender context, to match reply w/ request
324 @param retval - return code
325*/
326define bfd_auth_del_key_reply
327{
328 u32 context;
329 i32 retval;
330};
331
332/** \brief Get a list of configured authentication keys
333 @param client_index - opaque cookie to identify the sender
334 @param context - sender context, to match reply w/ request
335*/
336define bfd_auth_keys_dump
337{
338 u32 client_index;
339 u32 context;
340};
341
342/** \brief BFD authentication key details
343 @param context - sender context, to match reply w/ request
344 @param conf_key_id - configured key ID
345 @param use_count - how many BFD sessions currently use this key
346 @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
347*/
348define bfd_auth_keys_details
349{
350 u32 context;
351 u32 conf_key_id;
352 u32 use_count;
353 u8 auth_type;
354};
355
356/** \brief BFD UDP - activate/change authentication
357 @param client_index - opaque cookie to identify the sender
358 @param context - sender context, to match reply w/ request
359 @param sw_if_index - sw index of the interface
360 @param local_addr - local address
361 @param peer_addr - peer address
362 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
363 @param is_delayed - change is applied once peer applies the change (on first received packet with this auth)
364 @param bfd_key_id - key id sent out in BFD packets
365 @param conf_key_id - id of already configured key
366*/
367define bfd_udp_auth_activate
368{
369 u32 client_index;
370 u32 context;
371 u32 sw_if_index;
372 u8 local_addr[16];
373 u8 peer_addr[16];
374 u8 is_ipv6;
375 u8 is_delayed;
376 u8 bfd_key_id;
377 u32 conf_key_id;
378};
379
380/** \brief BFD UDP - activate/change authentication reply
381 @param context - returned sender context, to match reply w/ request
382 @param retval - return code
383*/
384define bfd_udp_auth_activate_reply
385{
386 u32 context;
387 i32 retval;
388};
389
390/** \brief BFD UDP - deactivate authentication
391 @param client_index - opaque cookie to identify the sender
392 @param context - sender context, to match reply w/ request
393 @param sw_if_index - sw index of the interface
394 @param local_addr - local address
395 @param peer_addr - peer address
396 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
397 @param is_delayed - change is applied once peer applies the change (on first received non-authenticated packet)
398*/
399define bfd_udp_auth_deactivate
400{
401 u32 client_index;
402 u32 context;
403 u32 sw_if_index;
404 u8 local_addr[16];
405 u8 peer_addr[16];
406 u8 is_ipv6;
407 u8 is_delayed;
408};
409
410/** \brief BFD UDP - deactivate authentication reply
411 @param context - returned sender context, to match reply w/ request
412 @param retval - return code
413*/
414define bfd_udp_auth_deactivate_reply
415{
416 u32 context;
417 i32 retval;
418};
419
Pavel Kotucek20d12322016-12-21 09:13:17 +0100420/*
421 * Local Variables:
422 * eval: (c-set-style "gnu")
423 * End:
424 */