FD.io VPP  v17.01.1-3-gc6833f8
Vector Packet Processing
bfd_main.h File Reference

BFD global declarations. More...

+ Include dependency graph for bfd_main.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bfd_session_t
 
struct  event_subscriber_t
 
struct  bfd_main_t
 
struct  bfd_input_trace_t
 

Macros

#define foreach_bfd_transport(F)
 
#define F(t, n)   BFD_TRANSPORT_##t,
 
#define foreach_bfd_mode(F)
 
#define F(x)   BFD_MODE_##x,
 
#define foreach_bfd_error(F)
 
#define F(sym, str)   BFD_ERROR_##sym,
 
#define USEC_PER_MS   1000LL
 
#define USEC_PER_SECOND   (1000 * USEC_PER_MS)
 
#define BFD_DEFAULT_DESIRED_MIN_TX_US   USEC_PER_SECOND
 

Enumerations

enum  bfd_transport_t { foreach_bfd_transport =(F) }
 
enum  bfd_mode_e { foreach_bfd_mode =(F) }
 
enum  bfd_error_t { foreach_bfd_error }
 
enum  { BFD_EVENT_RESCHEDULE = 1, BFD_EVENT_NEW_SESSION }
 

Functions

u8bfd_input_format_trace (u8 *s, va_list *args)
 
bfd_session_tbfd_get_session (bfd_main_t *bm, bfd_transport_t t)
 
void bfd_put_session (bfd_main_t *bm, bfd_session_t *bs)
 
bfd_session_tbfd_find_session_by_idx (bfd_main_t *bm, uword bs_idx)
 
bfd_session_tbfd_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 (bfd_main_t *bm, const bfd_pkt_t *bfd, u32 bs_idx)
 
int bfd_verify_pkt_common (const bfd_pkt_t *pkt)
 verify bfd packet - common checks More...
 
int bfd_verify_pkt_session (const bfd_pkt_t *pkt, u16 pkt_size, const bfd_session_t *bs)
 verify bfd packet - authentication More...
 
void bfd_event (bfd_main_t *bm, bfd_session_t *bs)
 
void bfd_send_final (vlib_main_t *vm, vlib_buffer_t *b, bfd_session_t *bs)
 
u8format_bfd_session (u8 *s, va_list *args)
 

Variables

bfd_main_t bfd_main
 
enum { ... }  bfd_process_event_e
 

Detailed Description

BFD global declarations.

Definition in file bfd_main.h.

Macro Definition Documentation

#define BFD_DEFAULT_DESIRED_MIN_TX_US   USEC_PER_SECOND

Definition at line 210 of file bfd_main.h.

#define F (   t,
 
)    BFD_TRANSPORT_##t,

Definition at line 171 of file bfd_main.h.

#define F (   x)    BFD_MODE_##x,

Definition at line 171 of file bfd_main.h.

#define F (   sym,
  str 
)    BFD_ERROR_##sym,

Definition at line 171 of file bfd_main.h.

#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")
#define F(t, n)
Definition: bfd_main.h:171

Definition at line 164 of file bfd_main.h.

#define foreach_bfd_mode (   F)
Value:
F (asynchronous) \
F (demand)
#define F(t, n)
Definition: bfd_main.h:171

Definition at line 38 of file bfd_main.h.

#define foreach_bfd_transport (   F)
Value:
F (UDP4, "ip4-rewrite") \
F (UDP6, "ip6-rewrite")
#define F(t, n)
Definition: bfd_main.h:171

Definition at line 27 of file bfd_main.h.

#define USEC_PER_MS   1000LL

Definition at line 206 of file bfd_main.h.

#define USEC_PER_SECOND   (1000 * USEC_PER_MS)

Definition at line 207 of file bfd_main.h.

Enumeration Type Documentation

anonymous enum
Enumerator
BFD_EVENT_RESCHEDULE 
BFD_EVENT_NEW_SESSION 

Definition at line 184 of file bfd_main.h.

Enumerator
foreach_bfd_error 

Definition at line 169 of file bfd_main.h.

enum bfd_mode_e
Enumerator
foreach_bfd_mode 

Definition at line 42 of file bfd_main.h.

Enumerator
foreach_bfd_transport 

Definition at line 31 of file bfd_main.h.

Function Documentation

void bfd_consume_pkt ( bfd_main_t bm,
const bfd_pkt_t *  bfd,
u32  bs_idx 
)

Definition at line 875 of file bfd_main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bfd_event ( bfd_main_t bm,
bfd_session_t bs 
)

Definition at line 6889 of file api.c.

+ Here is the caller graph for this function:

bfd_session_t* bfd_find_session_by_disc ( bfd_main_t bm,
u32  disc 
)

Definition at line 774 of file bfd_main.c.

+ Here is the caller graph for this function:

bfd_session_t* bfd_find_session_by_idx ( bfd_main_t bm,
uword  bs_idx 
)

Definition at line 764 of file bfd_main.c.

+ Here is the caller graph for this function:

bfd_session_t* bfd_get_session ( bfd_main_t bm,
bfd_transport_t  t 
)

Definition at line 743 of file bfd_main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* bfd_input_format_trace ( u8 s,
va_list *  args 
)

Definition at line 354 of file bfd_main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bfd_put_session ( bfd_main_t bm,
bfd_session_t bs 
)

Definition at line 757 of file bfd_main.c.

+ Here is the caller graph for this function:

void bfd_send_final ( vlib_main_t vm,
vlib_buffer_t b,
bfd_session_t bs 
)

Definition at line 534 of file bfd_main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bfd_session_start ( bfd_main_t bm,
bfd_session_t bs 
)

Definition at line 279 of file bfd_main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int bfd_verify_pkt_common ( const bfd_pkt_t *  pkt)

verify bfd packet - common checks

Parameters
pkt
Returns
1 if bfd packet is valid

Definition at line 792 of file bfd_main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int bfd_verify_pkt_session ( const bfd_pkt_t *  pkt,
u16  pkt_size,
const bfd_session_t bs 
)

verify bfd packet - authentication

Parameters
pkt
Returns
1 if bfd packet is valid

Definition at line 848 of file bfd_main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_bfd_session ( u8 s,
va_list *  args 
)

Definition at line 939 of file bfd_main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

bfd_main_t bfd_main

Definition at line 961 of file bfd_main.c.

enum { ... } bfd_process_event_e