* limitations under the License.
*/
-option version = "1.0.0";
+option version = "2.0.0";
+
+import "vnet/interface_types.api";
+import "vnet/ip/ip_types.api";
+
+enum bfd_state {
+ BFD_STATE_API_ADMIN_DOWN = 0,
+ BFD_STATE_API_DOWN = 1,
+ BFD_STATE_API_INIT = 2,
+ BFD_STATE_API_UP = 3,
+};
/** \brief Set BFD echo source
@param client_index - opaque cookie to identify the sender
{
u32 client_index;
u32 context;
- u32 sw_if_index;
+ vl_api_interface_index_t sw_if_index;
};
/** \brief Delete BFD echo source
u32 context;
};
+/** \brief Get BFD echo source
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+*/
+define bfd_udp_get_echo_source
+{
+ u32 client_index;
+ u32 context;
+};
+
+/** \brief Get BFD echo source reply
+ @param context - sender context, to match reply w/ request
+ @param retval - return code
+ @param sw_if_index - interface to use as echo source
+ @param is_set - non-zero if set
+ @param have_usable_ip4 - non-zero if have usable IPv4 address
+ @param ip4_addr - IPv4 address
+ @param have_usable_ip6 - non-zero if have usable IPv6 address
+ @param ip6_addr - IPv6 address
+*/
+define bfd_udp_get_echo_source_reply
+{
+ u32 context;
+ i32 retval;
+ vl_api_interface_index_t sw_if_index;
+ bool is_set;
+ bool have_usable_ip4;
+ vl_api_ip4_address_t ip4_addr;
+ bool have_usable_ip6;
+ vl_api_ip6_address_t ip6_addr;
+};
+
/** \brief Add UDP BFD session on interface
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
{
u32 client_index;
u32 context;
- u32 sw_if_index;
+ vl_api_interface_index_t sw_if_index;
+ u32 desired_min_tx;
+ u32 required_min_rx;
+ vl_api_address_t local_addr;
+ vl_api_address_t peer_addr;
+ u8 detect_mult;
+ bool is_authenticated;
+ u8 bfd_key_id;
+ u32 conf_key_id;
+};
+define bfd_udp_upd
+{
+ u32 client_index;
+ u32 context;
+ vl_api_interface_index_t sw_if_index;
u32 desired_min_tx;
u32 required_min_rx;
- u8 local_addr[16];
- u8 peer_addr[16];
- u8 is_ipv6;
+ vl_api_address_t local_addr;
+ vl_api_address_t peer_addr;
u8 detect_mult;
- u8 is_authenticated;
+ bool is_authenticated;
u8 bfd_key_id;
u32 conf_key_id;
};
+define bfd_udp_upd_reply
+{
+ u32 context;
+ i32 retval;
+ u32 stats_index;
+};
/** \brief Modify UDP BFD session on interface
@param client_index - opaque cookie to identify the sender
{
u32 client_index;
u32 context;
- u32 sw_if_index;
+ vl_api_interface_index_t sw_if_index;
u32 desired_min_tx;
u32 required_min_rx;
- u8 local_addr[16];
- u8 peer_addr[16];
- u8 is_ipv6;
+ vl_api_address_t local_addr;
+ vl_api_address_t peer_addr;
u8 detect_mult;
};
{
u32 client_index;
u32 context;
- u32 sw_if_index;
- u8 local_addr[16];
- u8 peer_addr[16];
- u8 is_ipv6;
+ vl_api_interface_index_t sw_if_index;
+ vl_api_address_t local_addr;
+ vl_api_address_t peer_addr;
};
/** \brief Get all BFD sessions
define bfd_udp_session_details
{
u32 context;
- u32 sw_if_index;
- u8 local_addr[16];
- u8 peer_addr[16];
- u8 is_ipv6;
- u8 state;
- u8 is_authenticated;
+ vl_api_interface_index_t sw_if_index;
+ vl_api_address_t local_addr;
+ vl_api_address_t peer_addr;
+ vl_api_bfd_state_t state;
+ bool is_authenticated;
u8 bfd_key_id;
u32 conf_key_id;
u32 required_min_rx;
@param local_addr - local address
@param peer_addr - peer address
@param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
- @param admin_up_down - set the admin state, 1 = up, 0 = down
+ @param flags - set the admin state, 1 = up, 0 = down
*/
autoreply define bfd_udp_session_set_flags
{
u32 client_index;
u32 context;
- u32 sw_if_index;
- u8 local_addr[16];
- u8 peer_addr[16];
- u8 is_ipv6;
- u8 admin_up_down;
+ vl_api_interface_index_t sw_if_index;
+ vl_api_address_t local_addr;
+ vl_api_address_t peer_addr;
+ vl_api_if_status_flags_t flags;
+};
+
+service {
+ rpc want_bfd_events returns want_bfd_events_reply
+ events bfd_udp_session_event;
};
/** \brief Register for BFD events
{
u32 client_index;
u32 context;
- u32 enable_disable;
+ bool enable_disable;
u32 pid;
};
+define bfd_udp_session_event
+{
+ u32 client_index;
+ u32 pid;
+ vl_api_interface_index_t sw_if_index;
+ vl_api_address_t local_addr;
+ vl_api_address_t peer_addr;
+ vl_api_bfd_state_t state;
+ bool is_authenticated;
+ u8 bfd_key_id;
+ u32 conf_key_id;
+ u32 required_min_rx;
+ u32 desired_min_tx;
+ u8 detect_mult;
+};
+
/** \brief BFD UDP - add/replace key to configuration
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
{
u32 client_index;
u32 context;
- u32 sw_if_index;
- u8 local_addr[16];
- u8 peer_addr[16];
- u8 is_ipv6;
- u8 is_delayed;
+ vl_api_interface_index_t sw_if_index;
+ vl_api_address_t local_addr;
+ vl_api_address_t peer_addr;
+ bool is_delayed;
u8 bfd_key_id;
u32 conf_key_id;
};
{
u32 client_index;
u32 context;
- u32 sw_if_index;
- u8 local_addr[16];
- u8 peer_addr[16];
- u8 is_ipv6;
- u8 is_delayed;
+ vl_api_interface_index_t sw_if_index;
+ vl_api_address_t local_addr;
+ vl_api_address_t peer_addr;
+ bool is_delayed;
+};
+
+/* must be compatible with bfd_error_t */
+counters bfd_udp {
+ none {
+ severity info;
+ type counter64;
+ units "packets";
+ description "OK";
+ };
+ bad {
+ severity error;
+ type counter64;
+ units "packets";
+ description "bad packet";
+ };
+ disabled {
+ severity error;
+ type counter64;
+ units "packets";
+ description "bfd packets received on disabled interfaces";
+ };
+ version {
+ severity error;
+ type counter64;
+ units "packets";
+ description "version";
+ };
+ length {
+ severity error;
+ type counter64;
+ units "packets";
+ description "too short";
+ };
+ detect_multi {
+ severity error;
+ type counter64;
+ units "packets";
+ description "detect-multi";
+ };
+ multi_point {
+ severity error;
+ type counter64;
+ units "packets";
+ description "multi-point";
+ };
+ my_disc {
+ severity error;
+ type counter64;
+ units "packets";
+ description "my-disc";
+ };
+ your_disc {
+ severity error;
+ type counter64;
+ units "packets";
+ description "your-disc";
+ };
+ admin_down {
+ severity error;
+ type counter64;
+ units "packets";
+ description "session admin-down";
+ };
+ no_session {
+ severity error;
+ type counter64;
+ units "packets";
+ description "no-session";
+ };
+ failed_verification {
+ severity error;
+ type counter64;
+ units "packets";
+ description "failed-verification";
+ };
+ src_mismatch {
+ severity error;
+ type counter64;
+ units "packets";
+ description "src-mismatch";
+ };
+ dst_mismatch {
+ severity error;
+ type counter64;
+ units "packets";
+ description "dst-mismatch";
+ };
+ ttl {
+ severity error;
+ type counter64;
+ units "packets";
+ description "ttl";
+ };
+};
+
+paths {
+ "/err/bfd-udp4-input" "bfd";
+ "/err/bfd-udp6-input" "bfd";
+ "/err/bfd-udp4-echo-input" "bfd";
+ "/err/bfd-udp6-echo-input" "bfd";
};
/*