blob: 2cdcfad3fc82a4812effb8da2e33d6fef222289e [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
Klement Sekera73884482017-02-23 09:26:30 +010048/** \brief Delete BFD echo source response
Klement Sekera239790f2017-02-16 10:53:53 +010049 @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
Pavel Kotucek20d12322016-12-21 09:13:17 +010058/** \brief Add UDP BFD session on interface
59 @param client_index - opaque cookie to identify the sender
60 @param context - sender context, to match reply w/ request
61 @param sw_if_index - sw index of the interface
62 @param desired_min_tx - desired min transmit interval (microseconds)
63 @param required_min_rx - required min receive interval (microseconds)
Pavel Kotucek20d12322016-12-21 09:13:17 +010064 @param local_addr - local address
65 @param peer_addr - peer address
66 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
Klement Sekerab17dd962017-01-09 07:43:48 +010067 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
68 @param is_authenticated - non-zero if authentication is required
69 @param bfd_key_id - key id sent out in BFD packets (if is_authenticated)
70 @param conf_key_id - id of already configured key (if is_authenticated)
Pavel Kotucek20d12322016-12-21 09:13:17 +010071*/
Klement Sekerab17dd962017-01-09 07:43:48 +010072define bfd_udp_add
73{
Pavel Kotucek20d12322016-12-21 09:13:17 +010074 u32 client_index;
75 u32 context;
76 u32 sw_if_index;
77 u32 desired_min_tx;
78 u32 required_min_rx;
79 u8 local_addr[16];
80 u8 peer_addr[16];
81 u8 is_ipv6;
82 u8 detect_mult;
Klement Sekerab17dd962017-01-09 07:43:48 +010083 u8 is_authenticated;
84 u8 bfd_key_id;
85 u32 conf_key_id;
Pavel Kotucek20d12322016-12-21 09:13:17 +010086};
87
88/** \brief Add UDP BFD session response
89 @param context - sender context, to match reply w/ request
90 @param retval - return code for the request
Pavel Kotucek20d12322016-12-21 09:13:17 +010091*/
Klement Sekerab17dd962017-01-09 07:43:48 +010092define bfd_udp_add_reply
93{
Pavel Kotucek20d12322016-12-21 09:13:17 +010094 u32 context;
95 i32 retval;
Pavel Kotucek20d12322016-12-21 09:13:17 +010096};
97
Klement Sekeraa57a9702017-02-02 06:58:07 +010098/** \brief Modify UDP BFD session on interface
99 @param client_index - opaque cookie to identify the sender
100 @param context - sender context, to match reply w/ request
101 @param sw_if_index - sw index of the interface
102 @param desired_min_tx - desired min transmit interval (microseconds)
103 @param required_min_rx - required min receive interval (microseconds)
104 @param local_addr - local address
105 @param peer_addr - peer address
106 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
107 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
108*/
109define bfd_udp_mod
110{
111 u32 client_index;
112 u32 context;
113 u32 sw_if_index;
114 u32 desired_min_tx;
115 u32 required_min_rx;
116 u8 local_addr[16];
117 u8 peer_addr[16];
118 u8 is_ipv6;
119 u8 detect_mult;
120};
121
122/** \brief Modify UDP BFD session response
123 @param context - sender context, to match reply w/ request
124 @param retval - return code for the request
125*/
126define bfd_udp_mod_reply
127{
128 u32 context;
129 i32 retval;
130};
131
Pavel Kotucek20d12322016-12-21 09:13:17 +0100132/** \brief Delete UDP BFD session on interface
133 @param client_index - opaque cookie to identify the sender
134 @param context - sender context, to match reply w/ request
135 @param sw_if_index - sw index of the interface
136 @param local_addr - local address
137 @param peer_addr - peer address
138 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
139*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100140define bfd_udp_del
141{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100142 u32 client_index;
143 u32 context;
144 u32 sw_if_index;
145 u8 local_addr[16];
146 u8 peer_addr[16];
147 u8 is_ipv6;
148};
149
150/** \brief Delete UDP BFD session response
151 @param context - sender context, to match reply w/ request
152 @param retval - return code for the request
153*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100154define bfd_udp_del_reply
155{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100156 u32 context;
157 i32 retval;
158};
159
160/** \brief Get all BFD sessions
161 @param client_index - opaque cookie to identify the sender
162 @param context - sender context, to match reply w/ request
163*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100164define bfd_udp_session_dump
165{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100166 u32 client_index;
167 u32 context;
168};
169
170/** \brief BFD session details structure
171 @param context - sender context, to match reply w/ request
Pavel Kotucek20d12322016-12-21 09:13:17 +0100172 @param sw_if_index - sw index of the interface
173 @param local_addr - local address
174 @param peer_addr - peer address
175 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
176 @param state - session state
Klement Sekerab17dd962017-01-09 07:43:48 +0100177 @param is_authenticated - non-zero if authentication in-use, zero otherwise
178 @param bfd_key_id - ID of key currently in-use if auth is on
179 @param conf_key_id - configured key ID for this session
Klement Sekeraa57a9702017-02-02 06:58:07 +0100180 @param required_min_rx - required min receive interval (microseconds)
181 @param desired_min_tx - desired min transmit interval (microseconds)
182 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
Pavel Kotucek20d12322016-12-21 09:13:17 +0100183*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100184define bfd_udp_session_details
185{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100186 u32 context;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100187 u32 sw_if_index;
188 u8 local_addr[16];
189 u8 peer_addr[16];
190 u8 is_ipv6;
191 u8 state;
Klement Sekerab17dd962017-01-09 07:43:48 +0100192 u8 is_authenticated;
193 u8 bfd_key_id;
194 u32 conf_key_id;
Klement Sekeraa57a9702017-02-02 06:58:07 +0100195 u32 required_min_rx;
196 u32 desired_min_tx;
197 u8 detect_mult;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100198};
199
Klement Sekerab17dd962017-01-09 07:43:48 +0100200/** \brief Set flags of BFD UDP session
Pavel Kotucek20d12322016-12-21 09:13:17 +0100201 @param client_index - opaque cookie to identify the sender
202 @param context - sender context, to match reply w/ request
Klement Sekerab17dd962017-01-09 07:43:48 +0100203 @param sw_if_index - sw index of the interface
204 @param local_addr - local address
205 @param peer_addr - peer address
206 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
Pavel Kotucek20d12322016-12-21 09:13:17 +0100207 @param admin_up_down - set the admin state, 1 = up, 0 = down
208*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100209define bfd_udp_session_set_flags
210{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100211 u32 client_index;
212 u32 context;
Klement Sekerab17dd962017-01-09 07:43:48 +0100213 u32 sw_if_index;
214 u8 local_addr[16];
215 u8 peer_addr[16];
216 u8 is_ipv6;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100217 u8 admin_up_down;
218};
219
Klement Sekerab17dd962017-01-09 07:43:48 +0100220/** \brief Reply to bfd_udp_session_set_flags
Pavel Kotucek20d12322016-12-21 09:13:17 +0100221 @param context - sender context which was passed in the request
222 @param retval - return code of the set flags request
223*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100224define bfd_udp_session_set_flags_reply
Pavel Kotucek20d12322016-12-21 09:13:17 +0100225{
226 u32 context;
227 i32 retval;
228};
229
230/** \brief Register for BFD events
231 @param client_index - opaque cookie to identify the sender
232 @param context - sender context, to match reply w/ request
233 @param enable_disable - 1 => register for events, 0 => cancel registration
234 @param pid - sender's pid
235*/
236define want_bfd_events
237{
238 u32 client_index;
239 u32 context;
240 u32 enable_disable;
241 u32 pid;
242};
243
244/** \brief Reply for BFD events registration
245 @param context - returned sender context, to match reply w/ request
246 @param retval - return code
247*/
248define want_bfd_events_reply
249{
250 u32 context;
251 i32 retval;
252};
253
Klement Sekerab17dd962017-01-09 07:43:48 +0100254/** \brief BFD UDP - add/replace key to configuration
255 @param client_index - opaque cookie to identify the sender
256 @param context - sender context, to match reply w/ request
257 @param conf_key_id - key ID to add/replace/delete
258 @param key_len - length of key (must be non-zero)
259 @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
260 @param key - key data
261*/
262define bfd_auth_set_key
263{
264 u32 client_index;
265 u32 context;
266 u32 conf_key_id;
267 u8 key_len;
268 u8 auth_type;
269 u8 key[20];
270};
271
272/** \brief BFD UDP - add/replace key reply
273 @param context - returned sender context, to match reply w/ request
274 @param retval - return code
275*/
276define bfd_auth_set_key_reply
277{
278 u32 context;
279 i32 retval;
280};
281
282/** \brief BFD UDP - delete key from configuration
283 @param client_index - opaque cookie to identify the sender
284 @param context - sender context, to match reply w/ request
285 @param conf_key_id - key ID to add/replace/delete
286 @param key_len - length of key (must be non-zero)
287 @param key - key data
288*/
289define bfd_auth_del_key
290{
291 u32 client_index;
292 u32 context;
293 u32 conf_key_id;
294};
295
296/** \brief BFD UDP - delete key reply
297 @param context - returned sender context, to match reply w/ request
298 @param retval - return code
299*/
300define bfd_auth_del_key_reply
301{
302 u32 context;
303 i32 retval;
304};
305
306/** \brief Get a list of configured authentication keys
307 @param client_index - opaque cookie to identify the sender
308 @param context - sender context, to match reply w/ request
309*/
310define bfd_auth_keys_dump
311{
312 u32 client_index;
313 u32 context;
314};
315
316/** \brief BFD authentication key details
317 @param context - sender context, to match reply w/ request
318 @param conf_key_id - configured key ID
319 @param use_count - how many BFD sessions currently use this key
320 @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
321*/
322define bfd_auth_keys_details
323{
324 u32 context;
325 u32 conf_key_id;
326 u32 use_count;
327 u8 auth_type;
328};
329
330/** \brief BFD UDP - activate/change authentication
331 @param client_index - opaque cookie to identify the sender
332 @param context - sender context, to match reply w/ request
333 @param sw_if_index - sw index of the interface
334 @param local_addr - local address
335 @param peer_addr - peer address
336 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
337 @param is_delayed - change is applied once peer applies the change (on first received packet with this auth)
338 @param bfd_key_id - key id sent out in BFD packets
339 @param conf_key_id - id of already configured key
340*/
341define bfd_udp_auth_activate
342{
343 u32 client_index;
344 u32 context;
345 u32 sw_if_index;
346 u8 local_addr[16];
347 u8 peer_addr[16];
348 u8 is_ipv6;
349 u8 is_delayed;
350 u8 bfd_key_id;
351 u32 conf_key_id;
352};
353
354/** \brief BFD UDP - activate/change authentication reply
355 @param context - returned sender context, to match reply w/ request
356 @param retval - return code
357*/
358define bfd_udp_auth_activate_reply
359{
360 u32 context;
361 i32 retval;
362};
363
364/** \brief BFD UDP - deactivate authentication
365 @param client_index - opaque cookie to identify the sender
366 @param context - sender context, to match reply w/ request
367 @param sw_if_index - sw index of the interface
368 @param local_addr - local address
369 @param peer_addr - peer address
370 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
371 @param is_delayed - change is applied once peer applies the change (on first received non-authenticated packet)
372*/
373define bfd_udp_auth_deactivate
374{
375 u32 client_index;
376 u32 context;
377 u32 sw_if_index;
378 u8 local_addr[16];
379 u8 peer_addr[16];
380 u8 is_ipv6;
381 u8 is_delayed;
382};
383
384/** \brief BFD UDP - deactivate authentication reply
385 @param context - returned sender context, to match reply w/ request
386 @param retval - return code
387*/
388define bfd_udp_auth_deactivate_reply
389{
390 u32 context;
391 i32 retval;
392};
393
Pavel Kotucek20d12322016-12-21 09:13:17 +0100394/*
395 * Local Variables:
396 * eval: (c-set-style "gnu")
397 * End:
398 */