BFD global declarations.
More...
Go to the source code of this file.
|
#define | foreach_bfd_mode(F) |
|
#define | F(x) BFD_MODE_##x, |
|
#define | foreach_bfd_poll_state(F) |
|
#define | F(x) BFD_POLL_##x, |
|
#define | foreach_bfd_hop(F) |
| hop types More...
|
|
#define | F(sym, str) BFD_HOP_TYPE_##sym, |
|
#define | foreach_bfd_listen_event(F) |
| listener events More...
|
|
#define | F(sym, str) BFD_LISTEN_EVENT_##sym, |
|
#define | foreach_bfd_error(F) |
| Packet counters. More...
|
|
#define | F(sym, str) BFD_ERROR_##sym, |
|
#define | USEC_PER_MS (1000LL) |
|
#define | MSEC_PER_SEC (1000LL) |
|
#define | NSEC_PER_USEC (1000LL) |
|
#define | USEC_PER_SEC (MSEC_PER_SEC * USEC_PER_MS) |
|
#define | NSEC_PER_SEC (NSEC_PER_USEC * USEC_PER_SEC) |
|
#define | SEC_PER_NSEC ((f64)1/NSEC_PER_SEC) |
|
#define | BFD_TW_TPS (MSEC_PER_SEC) |
| timing wheel tick-rate, 1ms should be good enough More...
|
|
#define | BFD_DEFAULT_DESIRED_MIN_TX_USEC USEC_PER_SEC |
| default, slow transmission interval for BFD packets, per spec at least 1s More...
|
|
#define | BFD_REQUIRED_MIN_RX_USEC_WHILE_ECHO USEC_PER_SEC |
| minimum required min rx set locally when echo function is used, per spec should be set to at least 1s More...
|
|
|
typedef | CLIB_PACKED (struct { u32 discriminator;u64 expire_time_nsec;u64 checksum;}) bfd_echo_pkt_t |
| echo packet structure More...
|
|
static void | bfd_lock (bfd_main_t *bm) |
|
static void | bfd_unlock (bfd_main_t *bm) |
|
static void | bfd_lock_check (bfd_main_t *bm) |
|
u8 * | bfd_input_format_trace (u8 *s, va_list *args) |
|
bfd_session_t * | bfd_get_session (bfd_main_t *bm, bfd_transport_e t) |
|
void | bfd_put_session (bfd_main_t *bm, bfd_session_t *bs) |
|
bfd_session_t * | bfd_find_session_by_idx (bfd_main_t *bm, uword bs_idx) |
|
bfd_session_t * | bfd_find_session_by_disc (bfd_main_t *bm, u32 disc) |
|
void | bfd_session_start (bfd_main_t *bm, bfd_session_t *bs) |
|
void | bfd_consume_pkt (vlib_main_t *vm, bfd_main_t *bm, const bfd_pkt_t *bfd, u32 bs_idx) |
|
int | bfd_consume_echo_pkt (vlib_main_t *vm, bfd_main_t *bm, vlib_buffer_t *b) |
|
int | bfd_verify_pkt_common (const bfd_pkt_t *pkt) |
| verify bfd packet - common checks More...
|
|
int | bfd_verify_pkt_auth (vlib_main_t *vm, const bfd_pkt_t *pkt, u16 pkt_size, bfd_session_t *bs) |
| verify bfd packet - authentication More...
|
|
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, int is_local) |
|
u8 * | format_bfd_session (u8 *s, va_list *args) |
|
u8 * | format_bfd_session_brief (u8 *s, va_list *args) |
|
u8 * | format_bfd_auth_key (u8 *s, va_list *args) |
|
void | bfd_session_set_flags (vlib_main_t *vm, 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, u8 bfd_key_id, u8 is_delayed) |
|
vnet_api_error_t | bfd_auth_deactivate (bfd_session_t *bs, u8 is_delayed) |
|
vnet_api_error_t | bfd_session_set_params (bfd_main_t *bm, bfd_session_t *bs, u32 desired_min_tx_usec, u32 required_min_rx_usec, u8 detect_mult) |
|
u32 | bfd_nsec_to_usec (u64 nsec) |
|
const char * | bfd_poll_state_string (bfd_poll_state_e state) |
|
void | bfd_register_listener (bfd_notify_fn_t fn) |
| Register a callback function to receive session notifications. More...
|
|
BFD global declarations.
Definition in file bfd_main.h.
◆ BFD_DEFAULT_DESIRED_MIN_TX_USEC
default, slow transmission interval for BFD packets, per spec at least 1s
Definition at line 452 of file bfd_main.h.
◆ BFD_REQUIRED_MIN_RX_USEC_WHILE_ECHO
minimum required min rx set locally when echo function is used, per spec should be set to at least 1s
Definition at line 458 of file bfd_main.h.
◆ BFD_TW_TPS
timing wheel tick-rate, 1ms should be good enough
Definition at line 449 of file bfd_main.h.
◆ F [1/5]
#define F |
( |
|
sym, |
|
|
|
str |
|
) |
| BFD_HOP_TYPE_##sym, |
◆ F [2/5]
#define F |
( |
|
sym, |
|
|
|
str |
|
) |
| BFD_LISTEN_EVENT_##sym, |
◆ F [3/5]
#define F |
( |
|
sym, |
|
|
|
str |
|
) |
| BFD_ERROR_##sym, |
◆ F [4/5]
#define F |
( |
|
x | ) |
BFD_MODE_##x, |
◆ F [5/5]
#define F |
( |
|
x | ) |
BFD_POLL_##x, |
◆ foreach_bfd_error
#define foreach_bfd_error |
( |
|
F | ) |
|
Value: F (NONE,
"good bfd packets (processed)") \
F (BAD, "invalid bfd packets") \
F (DISABLED, "bfd packets received on disabled interfaces")
Packet counters.
Definition at line 328 of file bfd_main.h.
◆ foreach_bfd_hop
#define foreach_bfd_hop |
( |
|
F | ) |
|
◆ foreach_bfd_listen_event
#define foreach_bfd_listen_event |
( |
|
F | ) |
|
Value: F (CREATE,
"sesion-created") \
F (UPDATE, "session-updated") \
F (DELETE, "session-deleted")
listener events
Definition at line 248 of file bfd_main.h.
◆ foreach_bfd_mode
#define foreach_bfd_mode |
( |
|
F | ) |
|
◆ foreach_bfd_poll_state
#define foreach_bfd_poll_state |
( |
|
F | ) |
|
Value:
F (NEEDED) \
F (IN_PROGRESS) \
F (IN_PROGRESS_AND_QUEUED)
Definition at line 58 of file bfd_main.h.
◆ MSEC_PER_SEC
#define MSEC_PER_SEC (1000LL) |
◆ NSEC_PER_SEC
◆ NSEC_PER_USEC
#define NSEC_PER_USEC (1000LL) |
◆ SEC_PER_NSEC
◆ USEC_PER_MS
#define USEC_PER_MS (1000LL) |
◆ USEC_PER_SEC
◆ bfd_notify_fn_t
session nitification call back function type
Definition at line 263 of file bfd_main.h.
◆ bfd_session_t
◆ bfd_error_t
Enumerator |
---|
foreach_bfd_error | |
Definition at line 333 of file bfd_main.h.
◆ bfd_hop_type_e
Enumerator |
---|
foreach_bfd_hop | |
Definition at line 78 of file bfd_main.h.
◆ bfd_listen_event_e
Enumerator |
---|
foreach_bfd_listen_event | |
Definition at line 253 of file bfd_main.h.
◆ bfd_mode_e
Enumerator |
---|
foreach_bfd_mode | |
Definition at line 33 of file bfd_main.h.
◆ bfd_poll_state_e
Enumerator |
---|
foreach_bfd_poll_state | |
Definition at line 64 of file bfd_main.h.
◆ bfd_process_event_e
Enumerator |
---|
BFD_EVENT_RESCHEDULE | |
BFD_EVENT_NEW_SESSION | |
BFD_EVENT_CONFIG_CHANGED | |
Definition at line 348 of file bfd_main.h.
◆ bfd_auth_activate()
◆ bfd_auth_deactivate()
◆ bfd_auth_type_supported()
◆ bfd_consume_echo_pkt()
◆ bfd_consume_pkt()
◆ bfd_event()
◆ bfd_find_session_by_disc()
◆ bfd_find_session_by_idx()
◆ bfd_get_session()
◆ bfd_init_final_control_frame()
◆ bfd_input_format_trace()
u8* bfd_input_format_trace |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
◆ bfd_lock()
◆ bfd_lock_check()
◆ bfd_nsec_to_usec()
u32 bfd_nsec_to_usec |
( |
u64 |
nsec | ) |
|
◆ bfd_poll_state_string()
◆ bfd_put_session()
◆ bfd_register_listener()
Register a callback function to receive session notifications.
Definition at line 1313 of file bfd_main.c.
◆ bfd_session_set_flags()
◆ bfd_session_set_params()
◆ bfd_session_start()
◆ bfd_unlock()
◆ bfd_verify_pkt_auth()
verify bfd packet - authentication
- Parameters
-
- Returns
- 1 if bfd packet is valid
Definition at line 1705 of file bfd_main.c.
◆ bfd_verify_pkt_common()
int bfd_verify_pkt_common |
( |
const bfd_pkt_t * |
pkt | ) |
|
verify bfd packet - common checks
- Parameters
-
- Returns
- 1 if bfd packet is valid
Definition at line 1440 of file bfd_main.c.
◆ CLIB_PACKED()
typedef CLIB_PACKED |
( |
struct { u32 discriminator;u64 expire_time_nsec;u64 checksum;} |
| ) |
|
◆ format_bfd_auth_key()
u8* format_bfd_auth_key |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
◆ format_bfd_session()
u8* format_bfd_session |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
◆ format_bfd_session_brief()
u8* format_bfd_session_brief |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
◆ bfd_main