/* *INDENT-OFF* */
/** identifier of BFD session based on UDP transport only */
typedef CLIB_PACKED (struct {
- /** interface to which the session is tied */
- u32 sw_if_index;
+ union {
+ /** interface to which the session is tied - single-hop */
+ u32 sw_if_index;
+ /** the FIB index the peer is in - multi-hop*/
+ u32 fib_index;
+ };
/** local address */
ip46_address_t local_addr;
/** peer address */
/**
* @brief add the necessary transport layer by prepending it to existing data
*
+ *
* @param is_echo 1 if this is echo packet, 0 if control frame
*
* @return 1 on success, 0 on failure
*/
-int bfd_add_udp4_transport (vlib_main_t * vm, vlib_buffer_t * b,
+int bfd_add_udp4_transport (vlib_main_t * vm, u32 bi,
const struct bfd_session_s *bs, int is_echo);
/**
*
* @return 1 on success, 0 on failure
*/
-int bfd_add_udp6_transport (vlib_main_t * vm, vlib_buffer_t * b,
+int bfd_add_udp6_transport (vlib_main_t * vm, u32 bi,
const struct bfd_session_s *bs, int is_echo);
+/**
+ * @brief transport packet over udpv4
+ *
+ * @param is_echo 1 if this is echo packet, 0 if control frame
+ *
+ * @return 1 on success, 0 on failure
+ */
+int bfd_transport_udp4 (vlib_main_t * vm, u32 bi,
+ const struct bfd_session_s *bs);
+
+/**
+ * @brief transport packet over udpv6
+ *
+ * @param is_echo 1 if this is echo packet, 0 if control frame
+ *
+ * @return 1 on success, 0 on failure
+ */
+int bfd_transport_udp6 (vlib_main_t * vm, u32 bi,
+ const struct bfd_session_s *bs);
+
/**
* @brief check if the bfd udp layer is echo-capable at this time
*