FD.io VPP  v17.10-9-gd594711
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 */
21 autoreply define bfd_udp_set_echo_source
22 {
26 };
27 
28 /** \brief Delete BFD echo source
29  @param client_index - opaque cookie to identify the sender
30  @param context - sender context, to match reply w/ request
31 */
32 autoreply define bfd_udp_del_echo_source
33 {
36 };
37 
38 /** \brief Add UDP BFD session on interface
39  @param client_index - opaque cookie to identify the sender
40  @param context - sender context, to match reply w/ request
41  @param sw_if_index - sw index of the interface
42  @param desired_min_tx - desired min transmit interval (microseconds)
43  @param required_min_rx - required min receive interval (microseconds)
44  @param local_addr - local address
45  @param peer_addr - peer address
46  @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
47  @param detect_mult - detect multiplier (# of packets missed before connection goes down)
48  @param is_authenticated - non-zero if authentication is required
49  @param bfd_key_id - key id sent out in BFD packets (if is_authenticated)
50  @param conf_key_id - id of already configured key (if is_authenticated)
51 */
52 autoreply define bfd_udp_add
53 {
59  u8 local_addr[16];
60  u8 peer_addr[16];
66 };
67 
68 /** \brief Modify UDP BFD session on interface
69  @param client_index - opaque cookie to identify the sender
70  @param context - sender context, to match reply w/ request
71  @param sw_if_index - sw index of the interface
72  @param desired_min_tx - desired min transmit interval (microseconds)
73  @param required_min_rx - required min receive interval (microseconds)
74  @param local_addr - local address
75  @param peer_addr - peer address
76  @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
77  @param detect_mult - detect multiplier (# of packets missed before connection goes down)
78 */
79 autoreply define bfd_udp_mod
80 {
86  u8 local_addr[16];
87  u8 peer_addr[16];
90 };
91 
92 /** \brief Delete UDP BFD session on interface
93  @param client_index - opaque cookie to identify the sender
94  @param context - sender context, to match reply w/ request
95  @param sw_if_index - sw index of the interface
96  @param local_addr - local address
97  @param peer_addr - peer address
98  @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
99 */
100 autoreply define bfd_udp_del
101 {
105  u8 local_addr[16];
106  u8 peer_addr[16];
108 };
109 
110 /** \brief Get all BFD sessions
111  @param client_index - opaque cookie to identify the sender
112  @param context - sender context, to match reply w/ request
113 */
114 define bfd_udp_session_dump
115 {
118 };
119 
120 /** \brief BFD session details structure
121  @param context - sender context, to match reply w/ request
122  @param sw_if_index - sw index of the interface
123  @param local_addr - local address
124  @param peer_addr - peer address
125  @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
126  @param state - session state
127  @param is_authenticated - non-zero if authentication in-use, zero otherwise
128  @param bfd_key_id - ID of key currently in-use if auth is on
129  @param conf_key_id - configured key ID for this session
130  @param required_min_rx - required min receive interval (microseconds)
131  @param desired_min_tx - desired min transmit interval (microseconds)
132  @param detect_mult - detect multiplier (# of packets missed before connection goes down)
133 */
134 define bfd_udp_session_details
135 {
138  u8 local_addr[16];
139  u8 peer_addr[16];
148 };
149 
150 /** \brief Set flags of BFD UDP session
151  @param client_index - opaque cookie to identify the sender
152  @param context - sender context, to match reply w/ request
153  @param sw_if_index - sw index of the interface
154  @param local_addr - local address
155  @param peer_addr - peer address
156  @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
157  @param admin_up_down - set the admin state, 1 = up, 0 = down
158 */
160 {
164  u8 local_addr[16];
165  u8 peer_addr[16];
168 };
169 
170 /** \brief Register for BFD events
171  @param client_index - opaque cookie to identify the sender
172  @param context - sender context, to match reply w/ request
173  @param enable_disable - 1 => register for events, 0 => cancel registration
174  @param pid - sender's pid
175 */
176 autoreply define want_bfd_events
177 {
182 };
183 
184 /** \brief BFD UDP - add/replace key to configuration
185  @param client_index - opaque cookie to identify the sender
186  @param context - sender context, to match reply w/ request
187  @param conf_key_id - key ID to add/replace/delete
188  @param key_len - length of key (must be non-zero)
189  @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
190  @param key - key data
191 */
192 autoreply define bfd_auth_set_key
193 {
199  u8 key[20];
200 };
201 
202 /** \brief BFD UDP - delete key from configuration
203  @param client_index - opaque cookie to identify the sender
204  @param context - sender context, to match reply w/ request
205  @param conf_key_id - key ID to add/replace/delete
206  @param key_len - length of key (must be non-zero)
207  @param key - key data
208 */
209 autoreply define bfd_auth_del_key
210 {
214 };
215 
216 /** \brief Get a list of configured authentication keys
217  @param client_index - opaque cookie to identify the sender
218  @param context - sender context, to match reply w/ request
219 */
220 define bfd_auth_keys_dump
221 {
224 };
225 
226 /** \brief BFD authentication key details
227  @param context - sender context, to match reply w/ request
228  @param conf_key_id - configured key ID
229  @param use_count - how many BFD sessions currently use this key
230  @param auth_type - authentication type (RFC 5880/4.1/Auth Type)
231 */
232 define bfd_auth_keys_details
233 {
238 };
239 
240 /** \brief BFD UDP - activate/change authentication
241  @param client_index - opaque cookie to identify the sender
242  @param context - sender context, to match reply w/ request
243  @param sw_if_index - sw index of the interface
244  @param local_addr - local address
245  @param peer_addr - peer address
246  @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
247  @param is_delayed - change is applied once peer applies the change (on first received packet with this auth)
248  @param bfd_key_id - key id sent out in BFD packets
249  @param conf_key_id - id of already configured key
250 */
251 autoreply define bfd_udp_auth_activate
252 {
256  u8 local_addr[16];
257  u8 peer_addr[16];
262 };
263 
264 /** \brief BFD UDP - deactivate authentication
265  @param client_index - opaque cookie to identify the sender
266  @param context - sender context, to match reply w/ request
267  @param sw_if_index - sw index of the interface
268  @param local_addr - local address
269  @param peer_addr - peer address
270  @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
271  @param is_delayed - change is applied once peer applies the change (on first received non-authenticated packet)
272 */
273 autoreply define bfd_udp_auth_deactivate
274 {
278  u8 local_addr[16];
279  u8 peer_addr[16];
282 };
283 
284 /*
285  * Local Variables:
286  * eval: (c-set-style "gnu")
287  * End:
288  */
vnet_api_error_t bfd_auth_del_key(u32 conf_key_id)
delete existing authentication key
Definition: bfd_main.c:2014
vnet_api_error_t bfd_udp_del_echo_source()
unset echo-source interface
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:1960
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