summaryrefslogtreecommitdiffstats
path: root/src/vnet/bfd/bfd_main.h
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-02-23 09:26:30 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-02 11:56:47 +0000
commit738844871220f853629504f61c248f0c9402dc77 (patch)
tree63892d6c317c1d1067f9ecd2a913d2ac7c671fcb /src/vnet/bfd/bfd_main.h
parentc3a814be9dc769be942ff8029c7b6eccd4b3af05 (diff)
BFD: command line interface
Implement command line interface to the BFD binary APIs. Add corresponding unit tests. Change-Id: Ia0542d0bc4c8d78e6f7b777a08fd94ebfe4d524f Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vnet/bfd/bfd_main.h')
-rw-r--r--src/vnet/bfd/bfd_main.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vnet/bfd/bfd_main.h b/src/vnet/bfd/bfd_main.h
index d8063f9de33..3be3694c0f5 100644
--- a/src/vnet/bfd/bfd_main.h
+++ b/src/vnet/bfd/bfd_main.h
@@ -74,11 +74,14 @@ typedef struct bfd_session_s
/* session state */
bfd_state_e local_state;
+ /* remote session state */
+ bfd_state_e remote_state;
+
/* local diagnostics */
bfd_diag_code_e local_diag;
- /* remote session state */
- bfd_state_e remote_state;
+ /* remote diagnostics */
+ bfd_diag_code_e remote_diag;
/* local discriminator */
u32 local_discr;
@@ -315,6 +318,7 @@ void bfd_event (bfd_main_t * bm, bfd_session_t * bs);
void bfd_init_final_control_frame (vlib_main_t * vm, vlib_buffer_t * b,
bfd_main_t * bm, bfd_session_t * bs);
u8 *format_bfd_session (u8 * s, va_list * args);
+u8 *format_bfd_auth_key (u8 * s, va_list * args);
void bfd_session_set_flags (bfd_session_t * bs, u8 admin_up_down);
unsigned bfd_auth_type_supported (bfd_auth_type_e auth_type);
vnet_api_error_t bfd_auth_activate (bfd_session_t * bs, u32 conf_key_id,
@@ -325,6 +329,9 @@ vnet_api_error_t bfd_session_set_params (bfd_main_t * bm, bfd_session_t * bs,
u32 required_min_rx_usec,
u8 detect_mult);
+u32 bfd_clocks_to_usec (const bfd_main_t * bm, u64 clocks);
+const char *bfd_poll_state_string (bfd_poll_state_e state);
+
#define USEC_PER_MS 1000LL
#define USEC_PER_SECOND (1000 * USEC_PER_MS)