FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
bfd_api.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-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  * @file
17  * @brief BFD API declarations
18  */
19 #ifndef __included_bfd_api_h__
20 #define __included_bfd_api_h__
21 
22 #include <vnet/api_errno.h>
23 #include <vnet/vnet.h>
24 #include <vnet/ip/ip6_packet.h>
25 
26 #define foreach_bfd_transport(F) \
27  F (UDP4, "ip4-rewrite") \
28  F (UDP6, "ip6-rewrite")
29 
30 typedef enum
31 {
32 #define F(t, n) BFD_TRANSPORT_##t,
34 #undef F
36 
37 /**
38  * @brief create a new bfd session
39  */
41 bfd_udp_add_session (u32 sw_if_index, const ip46_address_t * local_addr,
42  const ip46_address_t * peer_addr,
43  u32 desired_min_tx_usec, u32 required_min_rx_usec,
44  u8 detect_mult, u8 is_authenticated, u32 conf_key_id,
45  u8 bfd_key_id);
46 
47 /**
48  * @brief modify existing session
49  */
51 bfd_udp_mod_session (u32 sw_if_index, const ip46_address_t * local_addr,
52  const ip46_address_t * peer_addr,
53  u32 desired_min_tx_usec, u32 required_min_rx_usec,
54  u8 detect_mult);
55 
56 /**
57  * @brief delete existing session
58  */
60  const ip46_address_t * local_addr,
61  const ip46_address_t * peer_addr);
62 
63 /**
64  * @brief set session admin down/up
65  */
67  const ip46_address_t * local_addr,
68  const ip46_address_t * peer_addr,
69  u8 admin_up_down);
70 
71 /**
72  * @brief create or modify bfd authentication key
73  */
74 vnet_api_error_t bfd_auth_set_key (u32 conf_key_id, u8 auth_type, u8 key_len,
75  const u8 * key);
76 
77 /**
78  * @brief delete existing authentication key
79  */
81 
82 /**
83  * @brief activate authentication for existing session
84  */
86  const ip46_address_t * local_addr,
87  const ip46_address_t * peer_addr,
88  u32 conf_key_id, u8 bfd_key_id,
89  u8 is_delayed);
90 
91 /**
92  * @brief deactivate authentication for existing session
93  */
95  const ip46_address_t * local_addr,
96  const ip46_address_t * peer_addr,
97  u8 is_delayed);
98 
99 /**
100  * @brief set echo-source interface
101  */
102 vnet_api_error_t bfd_udp_set_echo_source (u32 loopback_sw_if_index);
103 
104 /**
105  * @brief unset echo-source interface
106  */
108 
109 #endif /* __included_bfd_api_h__ */
110 
111 /*
112  * fd.io coding-style-patch-verification: ON
113  *
114  * Local Variables:
115  * eval: (c-set-style "gnu")
116  * End:
117  */
vnet_api_error_t
Definition: api_errno.h:154
vnet_api_error_t bfd_udp_mod_session(u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr, u32 desired_min_tx_usec, u32 required_min_rx_usec, u8 detect_mult)
modify existing session
Definition: bfd_udp.c:789
vnet_api_error_t bfd_udp_add_session(u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr, u32 desired_min_tx_usec, u32 required_min_rx_usec, u8 detect_mult, u8 is_authenticated, u32 conf_key_id, u8 bfd_key_id)
create a new bfd session
Definition: bfd_udp.c:742
vnet_api_error_t bfd_auth_del_key(u32 conf_key_id)
delete existing authentication key
Definition: bfd_main.c:2232
unsigned char u8
Definition: types.h:56
vnet_api_error_t bfd_udp_del_echo_source()
unset echo-source interface
vnet_api_error_t bfd_udp_del_session(u32 sw_if_index, const ip46_address_t *local_addr, const ip46_address_t *peer_addr)
delete existing session
Definition: bfd_udp.c:816
vl_api_interface_index_t sw_if_index
Definition: gre.api:50
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:2176
#define F(t, n)
Definition: bfd_api.h:32
#define foreach_bfd_transport(F)
Definition: bfd_api.h:26
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:837
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:858
vnet_api_error_t bfd_udp_set_echo_source(u32 loopback_sw_if_index)
set echo-source interface
Definition: bfd_udp.c:83
typedef key
Definition: ipsec.api:247
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:889
bfd_transport_e
Definition: bfd_api.h:30