FD.io VPP  v18.07.1-19-g511ce25
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 option version = "1.0.0";
17 
18 /** \brief Set BFD echo source
19  @param client_index - opaque cookie to identify the sender
20  @param context - sender context, to match reply w/ request
21  @param sw_if_index - interface to use as echo source
22 */
23 autoreply define bfd_udp_set_echo_source
24 {
28 };
29 
30 /** \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 */
34 autoreply define bfd_udp_del_echo_source
35 {
38 };
39 
40 /** \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)
46  @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
49  @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)
53 */
54 autoreply define bfd_udp_add
55 {
61  u8 local_addr[16];
62  u8 peer_addr[16];
68 };
69 
70 /** \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 */
81 autoreply define bfd_udp_mod
82 {
88  u8 local_addr[16];
89  u8 peer_addr[16];
92 };
93 
94 /** \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 */
102 autoreply define bfd_udp_del
103 {
107  u8 local_addr[16];
108  u8 peer_addr[16];
110 };
111 
112 /** \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 */
116 define bfd_udp_session_dump
117 {
120 };
121 
122 /** \brief BFD session details structure
123  @param context - sender context, to match reply w/ request
124  @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
129  @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
132  @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)
135 */
136 define bfd_udp_session_details
137 {
140  u8 local_addr[16];
141  u8 peer_addr[16];
150 };
151 
152 /** \brief Set flags of BFD UDP session
153  @param client_index - opaque cookie to identify the sender
154  @param context - sender context, to match reply w/ request
155  @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
159  @param admin_up_down - set the admin state, 1 = up, 0 = down
160 */
162 {
166  u8 local_addr[16];
167  u8 peer_addr[16];
170 };
171 
172 /** \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 */
178 autoreply define want_bfd_events
179 {
184 };
185 
186 /** \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 */
194 autoreply define bfd_auth_set_key
195 {
201  u8 key[20];
202 };
203 
204 /** \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 */
211 autoreply define bfd_auth_del_key
212 {
216 };
217 
218 /** \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 */
222 define bfd_auth_keys_dump
223 {
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 */
234 define bfd_auth_keys_details
235 {
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 */
253 autoreply define bfd_udp_auth_activate
254 {
258  u8 local_addr[16];
259  u8 peer_addr[16];
264 };
265 
266 /** \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 */
275 autoreply define bfd_udp_auth_deactivate
276 {
280  u8 local_addr[16];
281  u8 peer_addr[16];
284 };
285 
286 /*
287  * Local Variables:
288  * eval: (c-set-style "gnu")
289  * End:
290  */
vnet_api_error_t bfd_auth_del_key(u32 conf_key_id)
delete existing authentication key
Definition: bfd_main.c:2057
unsigned char u8
Definition: types.h:56
vnet_api_error_t bfd_udp_del_echo_source()
unset echo-source interface
unsigned int u32
Definition: types.h:88
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:2001
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:749
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:766
vnet_api_error_t bfd_udp_set_echo_source(u32 loopback_sw_if_index)
set echo-source interface
Definition: bfd_udp.c:74
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:789
option version
Definition: bfd.api:16