FD.io VPP  v17.04-9-g99c0734
Vector Packet Processing
bfd.api
Go to the documentation of this file.
1 /*
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 
16 /** \brief Set BFD echo source
17  @param client_index - opaque cookie to identify the sender
18  @param context - sender context, to match reply w/ request
19  @param sw_if_index - interface to use as echo source
20 */
22 {
26 };
27 
28 /** \brief Set BFD feature response
29  @param context - sender context, to match reply w/ request
30  @param retval - return code for the request
31 */
32 define bfd_udp_set_echo_source_reply
33 {
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 */
43 {
46 };
47 
48 /** \brief Delete BFD echo source response
49  @param context - sender context, to match reply w/ request
50  @param retval - return code for the request
51 */
52 define bfd_udp_del_echo_source_reply
53 {
56 };
57 
58 /** \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)
64  @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
67  @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)
71 */
72 define bfd_udp_add
73 {
79  u8 local_addr[16];
80  u8 peer_addr[16];
86 };
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
91 */
92 define bfd_udp_add_reply
93 {
96 };
97 
98 /** \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 */
109 define bfd_udp_mod
110 {
116  u8 local_addr[16];
117  u8 peer_addr[16];
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 */
126 define bfd_udp_mod_reply
127 {
130 };
131 
132 /** \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 */
140 define bfd_udp_del
141 {
145  u8 local_addr[16];
146  u8 peer_addr[16];
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 */
154 define bfd_udp_del_reply
155 {
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 */
164 define bfd_udp_session_dump
165 {
168 };
169 
170 /** \brief BFD session details structure
171  @param context - sender context, to match reply w/ request
172  @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
177  @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
180  @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)
183 */
184 define bfd_udp_session_details
185 {
188  u8 local_addr[16];
189  u8 peer_addr[16];
198 };
199 
200 /** \brief Set flags of BFD UDP session
201  @param client_index - opaque cookie to identify the sender
202  @param context - sender context, to match reply w/ request
203  @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
207  @param admin_up_down - set the admin state, 1 = up, 0 = down
208 */
210 {
214  u8 local_addr[16];
215  u8 peer_addr[16];
218 };
219 
220 /** \brief Reply to bfd_udp_session_set_flags
221  @param context - sender context which was passed in the request
222  @param retval - return code of the set flags request
223 */
224 define bfd_udp_session_set_flags_reply
225 {
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 */
236 define want_bfd_events
237 {
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 */
248 define want_bfd_events_reply
249 {
252 };
253 
254 /** \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 */
263 {
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 */
276 define bfd_auth_set_key_reply
277 {
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 */
290 {
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 */
300 define bfd_auth_del_key_reply
301 {
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 */
310 define bfd_auth_keys_dump
311 {
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 */
322 define bfd_auth_keys_details
323 {
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 */
342 {
346  u8 local_addr[16];
347  u8 peer_addr[16];
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 */
358 define bfd_udp_auth_activate_reply
359 {
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 */
374 {
378  u8 local_addr[16];
379  u8 peer_addr[16];
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 */
388 define bfd_udp_auth_deactivate_reply
389 {
392 };
393 
394 /*
395  * Local Variables:
396  * eval: (c-set-style "gnu")
397  * End:
398  */
vnet_api_error_t bfd_auth_del_key(u32 conf_key_id)
delete existing authentication key
Definition: bfd_main.c:1991
vnet_api_error_t bfd_udp_del_echo_source()
unset echo-source interface
int i32
Definition: types.h:81
vnet_api_error_t bfd_auth_set_key(u32 conf_key_id, u8 auth_type, u8 key_len, const u8 *key)
create or modify bfd authentication key
Definition: bfd_main.c:1937
vnet_api_error_t bfd_udp_session_set_flags(u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr, u8 admin_up_down)
set session admin down/up
Definition: bfd_udp.c:733
unsigned int u32
Definition: types.h:88
vnet_api_error_t bfd_udp_auth_activate(u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr, u32 conf_key_id, u8 bfd_key_id, u8 is_delayed)
activate authentication for existing session
Definition: bfd_udp.c:750
vnet_api_error_t bfd_udp_set_echo_source(u32 loopback_sw_if_index)
set echo-source interface
Definition: bfd_udp.c:72
unsigned char u8
Definition: types.h:56
vnet_api_error_t bfd_udp_auth_deactivate(u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr, u8 is_delayed)
deactivate authentication for existing session
Definition: bfd_udp.c:772