blob: afbcc731e5adde7b8fe9293f0c47f8943863770d [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
Ole Troan9d420872017-10-12 13:06:35 +020016option version = "1.0.0";
Dave Barach0d056e52017-09-28 15:11:16 -040017
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
Matus Fabian2d3c7b92018-10-02 03:22:18 -070040/** \brief Get BFD echo source
41 @param client_index - opaque cookie to identify the sender
42 @param context - sender context, to match reply w/ request
43*/
44define bfd_udp_get_echo_source
45{
46 u32 client_index;
47 u32 context;
48};
49
50/** \brief Get BFD echo source reply
51 @param context - sender context, to match reply w/ request
52 @param retval - return code
53 @param sw_if_index - interface to use as echo source
54 @param is_set - non-zero if set
55 @param have_usable_ip4 - non-zero if have usable IPv4 address
56 @param ip4_addr - IPv4 address
57 @param have_usable_ip6 - non-zero if have usable IPv6 address
58 @param ip6_addr - IPv6 address
59*/
60define bfd_udp_get_echo_source_reply
61{
62 u32 context;
63 i32 retval;
64 u32 sw_if_index;
65 u8 is_set;
66 u8 have_usable_ip4;
67 u8 ip4_addr[4];
68 u8 have_usable_ip6;
69 u8 ip6_addr[16];
70};
71
Pavel Kotucek20d12322016-12-21 09:13:17 +010072/** \brief Add UDP BFD session on interface
73 @param client_index - opaque cookie to identify the sender
74 @param context - sender context, to match reply w/ request
75 @param sw_if_index - sw index of the interface
76 @param desired_min_tx - desired min transmit interval (microseconds)
77 @param required_min_rx - required min receive interval (microseconds)
Pavel Kotucek20d12322016-12-21 09:13:17 +010078 @param local_addr - local address
79 @param peer_addr - peer address
80 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
Klement Sekerab17dd962017-01-09 07:43:48 +010081 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
82 @param is_authenticated - non-zero if authentication is required
83 @param bfd_key_id - key id sent out in BFD packets (if is_authenticated)
84 @param conf_key_id - id of already configured key (if is_authenticated)
Pavel Kotucek20d12322016-12-21 09:13:17 +010085*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040086autoreply define bfd_udp_add
Klement Sekerab17dd962017-01-09 07:43:48 +010087{
Pavel Kotucek20d12322016-12-21 09:13:17 +010088 u32 client_index;
89 u32 context;
90 u32 sw_if_index;
91 u32 desired_min_tx;
92 u32 required_min_rx;
93 u8 local_addr[16];
94 u8 peer_addr[16];
95 u8 is_ipv6;
96 u8 detect_mult;
Klement Sekerab17dd962017-01-09 07:43:48 +010097 u8 is_authenticated;
98 u8 bfd_key_id;
99 u32 conf_key_id;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100100};
101
Klement Sekeraa57a9702017-02-02 06:58:07 +0100102/** \brief Modify UDP BFD session on interface
103 @param client_index - opaque cookie to identify the sender
104 @param context - sender context, to match reply w/ request
105 @param sw_if_index - sw index of the interface
106 @param desired_min_tx - desired min transmit interval (microseconds)
107 @param required_min_rx - required min receive interval (microseconds)
108 @param local_addr - local address
109 @param peer_addr - peer address
110 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
111 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
112*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400113autoreply define bfd_udp_mod
Klement Sekeraa57a9702017-02-02 06:58:07 +0100114{
115 u32 client_index;
116 u32 context;
117 u32 sw_if_index;
118 u32 desired_min_tx;
119 u32 required_min_rx;
120 u8 local_addr[16];
121 u8 peer_addr[16];
122 u8 is_ipv6;
123 u8 detect_mult;
124};
125
Pavel Kotucek20d12322016-12-21 09:13:17 +0100126/** \brief Delete UDP BFD session on interface
127 @param client_index - opaque cookie to identify the sender
128 @param context - sender context, to match reply w/ request
129 @param sw_if_index - sw index of the interface
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*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400134autoreply define bfd_udp_del
Klement Sekerab17dd962017-01-09 07:43:48 +0100135{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100136 u32 client_index;
137 u32 context;
138 u32 sw_if_index;
139 u8 local_addr[16];
140 u8 peer_addr[16];
141 u8 is_ipv6;
142};
143
Pavel Kotucek20d12322016-12-21 09:13:17 +0100144/** \brief Get all BFD sessions
145 @param client_index - opaque cookie to identify the sender
146 @param context - sender context, to match reply w/ request
147*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100148define bfd_udp_session_dump
149{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100150 u32 client_index;
151 u32 context;
152};
153
154/** \brief BFD session details structure
155 @param context - sender context, to match reply w/ request
Pavel Kotucek20d12322016-12-21 09:13:17 +0100156 @param sw_if_index - sw index of the interface
157 @param local_addr - local address
158 @param peer_addr - peer address
159 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
160 @param state - session state
Klement Sekerab17dd962017-01-09 07:43:48 +0100161 @param is_authenticated - non-zero if authentication in-use, zero otherwise
162 @param bfd_key_id - ID of key currently in-use if auth is on
163 @param conf_key_id - configured key ID for this session
Klement Sekeraa57a9702017-02-02 06:58:07 +0100164 @param required_min_rx - required min receive interval (microseconds)
165 @param desired_min_tx - desired min transmit interval (microseconds)
166 @param detect_mult - detect multiplier (# of packets missed before connection goes down)
Pavel Kotucek20d12322016-12-21 09:13:17 +0100167*/
Klement Sekerab17dd962017-01-09 07:43:48 +0100168define bfd_udp_session_details
169{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100170 u32 context;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100171 u32 sw_if_index;
172 u8 local_addr[16];
173 u8 peer_addr[16];
174 u8 is_ipv6;
175 u8 state;
Klement Sekerab17dd962017-01-09 07:43:48 +0100176 u8 is_authenticated;
177 u8 bfd_key_id;
178 u32 conf_key_id;
Klement Sekeraa57a9702017-02-02 06:58:07 +0100179 u32 required_min_rx;
180 u32 desired_min_tx;
181 u8 detect_mult;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100182};
183
Klement Sekerab17dd962017-01-09 07:43:48 +0100184/** \brief Set flags of BFD UDP session
Pavel Kotucek20d12322016-12-21 09:13:17 +0100185 @param client_index - opaque cookie to identify the sender
186 @param context - sender context, to match reply w/ request
Klement Sekerab17dd962017-01-09 07:43:48 +0100187 @param sw_if_index - sw index of the interface
188 @param local_addr - local address
189 @param peer_addr - peer address
190 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
Pavel Kotucek20d12322016-12-21 09:13:17 +0100191 @param admin_up_down - set the admin state, 1 = up, 0 = down
192*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400193autoreply define bfd_udp_session_set_flags
Klement Sekerab17dd962017-01-09 07:43:48 +0100194{
Pavel Kotucek20d12322016-12-21 09:13:17 +0100195 u32 client_index;
196 u32 context;
Klement Sekerab17dd962017-01-09 07:43:48 +0100197 u32 sw_if_index;
198 u8 local_addr[16];
199 u8 peer_addr[16];
200 u8 is_ipv6;
Pavel Kotucek20d12322016-12-21 09:13:17 +0100201 u8 admin_up_down;
202};
203
Pavel Kotucek20d12322016-12-21 09:13:17 +0100204/** \brief Register for BFD events
205 @param client_index - opaque cookie to identify the sender
206 @param context - sender context, to match reply w/ request
207 @param enable_disable - 1 => register for events, 0 => cancel registration
208 @param pid - sender's pid
209*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400210autoreply define want_bfd_events
Pavel Kotucek20d12322016-12-21 09:13:17 +0100211{
212 u32 client_index;
213 u32 context;
214 u32 enable_disable;
215 u32 pid;
216};
217
Klement Sekerab17dd962017-01-09 07:43:48 +0100218/** \brief BFD UDP - add/replace key to configuration
219 @param client_index - opaque cookie to identify the sender
220 @param context - sender context, to match reply w/ request
221 @param conf_key_id - key ID to add/replace/delete
222 @param key_len - length of key (must be non-zero)
223 @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
224 @param key - key data
225*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400226autoreply define bfd_auth_set_key
Klement Sekerab17dd962017-01-09 07:43:48 +0100227{
228 u32 client_index;
229 u32 context;
230 u32 conf_key_id;
231 u8 key_len;
232 u8 auth_type;
233 u8 key[20];
234};
235
Klement Sekerab17dd962017-01-09 07:43:48 +0100236/** \brief BFD UDP - delete key from configuration
237 @param client_index - opaque cookie to identify the sender
238 @param context - sender context, to match reply w/ request
239 @param conf_key_id - key ID to add/replace/delete
240 @param key_len - length of key (must be non-zero)
241 @param key - key data
242*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400243autoreply define bfd_auth_del_key
Klement Sekerab17dd962017-01-09 07:43:48 +0100244{
245 u32 client_index;
246 u32 context;
247 u32 conf_key_id;
248};
249
Klement Sekerab17dd962017-01-09 07:43:48 +0100250/** \brief Get a list of configured authentication keys
251 @param client_index - opaque cookie to identify the sender
252 @param context - sender context, to match reply w/ request
253*/
254define bfd_auth_keys_dump
255{
256 u32 client_index;
257 u32 context;
258};
259
260/** \brief BFD authentication key details
261 @param context - sender context, to match reply w/ request
262 @param conf_key_id - configured key ID
263 @param use_count - how many BFD sessions currently use this key
264 @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
265*/
266define bfd_auth_keys_details
267{
268 u32 context;
269 u32 conf_key_id;
270 u32 use_count;
271 u8 auth_type;
272};
273
274/** \brief BFD UDP - activate/change authentication
275 @param client_index - opaque cookie to identify the sender
276 @param context - sender context, to match reply w/ request
277 @param sw_if_index - sw index of the interface
278 @param local_addr - local address
279 @param peer_addr - peer address
280 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
281 @param is_delayed - change is applied once peer applies the change (on first received packet with this auth)
282 @param bfd_key_id - key id sent out in BFD packets
283 @param conf_key_id - id of already configured key
284*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400285autoreply define bfd_udp_auth_activate
Klement Sekerab17dd962017-01-09 07:43:48 +0100286{
287 u32 client_index;
288 u32 context;
289 u32 sw_if_index;
290 u8 local_addr[16];
291 u8 peer_addr[16];
292 u8 is_ipv6;
293 u8 is_delayed;
294 u8 bfd_key_id;
295 u32 conf_key_id;
296};
297
Klement Sekerab17dd962017-01-09 07:43:48 +0100298/** \brief BFD UDP - deactivate authentication
299 @param client_index - opaque cookie to identify the sender
300 @param context - sender context, to match reply w/ request
301 @param sw_if_index - sw index of the interface
302 @param local_addr - local address
303 @param peer_addr - peer address
304 @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
305 @param is_delayed - change is applied once peer applies the change (on first received non-authenticated packet)
306*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400307autoreply define bfd_udp_auth_deactivate
Klement Sekerab17dd962017-01-09 07:43:48 +0100308{
309 u32 client_index;
310 u32 context;
311 u32 sw_if_index;
312 u8 local_addr[16];
313 u8 peer_addr[16];
314 u8 is_ipv6;
315 u8 is_delayed;
316};
317
Pavel Kotucek20d12322016-12-21 09:13:17 +0100318/*
319 * Local Variables:
320 * eval: (c-set-style "gnu")
321 * End:
322 */