FD.io VPP  v18.10-34-gcce845e
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 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 */
45 {
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 */
60 define bfd_udp_get_echo_source_reply
61 {
67  u8 ip4_addr[4];
69  u8 ip6_addr[16];
70 };
71 
72 /** \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)
78  @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
81  @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)
85 */
86 autoreply define bfd_udp_add
87 {
93  u8 local_addr[16];
94  u8 peer_addr[16];
100 };
101 
102 /** \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 */
113 autoreply define bfd_udp_mod
114 {
120  u8 local_addr[16];
121  u8 peer_addr[16];
124 };
125 
126 /** \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 */
134 autoreply define bfd_udp_del
135 {
139  u8 local_addr[16];
140  u8 peer_addr[16];
142 };
143 
144 /** \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 */
148 define bfd_udp_session_dump
149 {
152 };
153 
154 /** \brief BFD session details structure
155  @param context - sender context, to match reply w/ request
156  @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
161  @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
164  @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)
167 */
168 define bfd_udp_session_details
169 {
172  u8 local_addr[16];
173  u8 peer_addr[16];
182 };
183 
184 /** \brief Set flags of BFD UDP session
185  @param client_index - opaque cookie to identify the sender
186  @param context - sender context, to match reply w/ request
187  @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
191  @param admin_up_down - set the admin state, 1 = up, 0 = down
192 */
194 {
198  u8 local_addr[16];
199  u8 peer_addr[16];
202 };
203 
204 /** \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 */
210 autoreply define want_bfd_events
211 {
216 };
217 
218 /** \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 */
226 autoreply define bfd_auth_set_key
227 {
233  u8 key[20];
234 };
235 
236 /** \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 */
243 autoreply define bfd_auth_del_key
244 {
248 };
249 
250 /** \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 */
254 define bfd_auth_keys_dump
255 {
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 */
266 define bfd_auth_keys_details
267 {
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 */
285 autoreply define bfd_udp_auth_activate
286 {
290  u8 local_addr[16];
291  u8 peer_addr[16];
296 };
297 
298 /** \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 */
307 autoreply define bfd_udp_auth_deactivate
308 {
312  u8 local_addr[16];
313  u8 peer_addr[16];
316 };
317 
318 /*
319  * Local Variables:
320  * eval: (c-set-style "gnu")
321  * End:
322  */
vnet_api_error_t bfd_auth_del_key(u32 conf_key_id)
delete existing authentication key
Definition: bfd_main.c:2221
unsigned char u8
Definition: types.h:56
vnet_api_error_t bfd_udp_del_echo_source()
unset echo-source interface
void bfd_udp_get_echo_source(int *is_set, u32 *sw_if_index, int *have_usable_ip4, ip4_address_t *ip4, int *have_usable_ip6, ip6_address_t *ip6)
get echo source information - used by CLI
Definition: bfd_udp.c:226
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:2165
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:762
signed int i32
Definition: types.h:77
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:783
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:814
option version
Definition: bfd.api:16