The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
bfd.h File Reference
#include <freeradius-devel/util/rand.h>
#include <freeradius-devel/util/log.h>
#include <freeradius-devel/util/pair.h>
#include <freeradius-devel/util/md5.h>
#include <freeradius-devel/util/sha1.h>
#include <freeradius-devel/util/dbuff.h>
+ Include dependency graph for bfd.h:

Go to the source code of this file.

Data Structures

struct  __attribute__
 
union  bfd_auth_t
 
union  bfd_auth_t.__unnamed180__
 
struct  fr_bfd_ctx_t
 

Macros

#define BFD_AUTH_INVALID   (BFD_AUTH_MET_KEYED_SHA1 + 1)
 
#define FR_BFD_CODE_MAX   (4)
 
#define FR_BFD_HEADER_LENGTH   (24)
 
#define FR_BFD_PACKET_CODE_VALID(_code)   (_code < FR_BFD_CODE_MAX)
 

Typedefs

typedef enum bfd_auth_type_t bfd_auth_type_t
 
typedef enum bfd_diag_t bfd_diag_t
 
typedef enum bfd_session_state_t bfd_session_state_t
 

Enumerations

enum  bfd_auth_type_t {
  BFD_AUTH_RESERVED = 0 ,
  BFD_AUTH_SIMPLE ,
  BFD_AUTH_KEYED_MD5 ,
  BFD_AUTH_MET_KEYED_MD5 ,
  BFD_AUTH_KEYED_SHA1 ,
  BFD_AUTH_MET_KEYED_SHA1
}
 
enum  bfd_diag_t {
  BFD_DIAG_NONE = 0 ,
  BFD_CTRL_EXPIRED ,
  BFD_ECHO_FAILED ,
  BFD_NEIGHBOR_DOWN ,
  BFD_FORWARD_PLANE_RESET ,
  BFD_PATH_DOWN ,
  BFD_CONCATENATED_PATH_DOWN ,
  BFD_ADMIN_DOWN ,
  BFD_REVERSE_CONCAT_PATH_DOWN
}
 
enum  bfd_session_state_t {
  BFD_STATE_ADMIN_DOWN = 0 ,
  BFD_STATE_DOWN ,
  BFD_STATE_INIT ,
  BFD_STATE_UP
}
 
enum  fr_bfd_packet_code_t {
  FR_BFD_ADMIN_DOWN ,
  FR_BFD_DOWN ,
  FR_BFD_INIT ,
  FR_BFD_UP
}
 

Functions

union bfd_auth_t __attribute__ ((packed)) bfd_auth_t
 
ssize_t fr_bfd_decode (TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *packet, size_t packet_len, char const *secret, size_t secret_len)
 
ssize_t fr_bfd_encode (uint8_t *packet, size_t packet_len, uint8_t const *original, char const *secret, size_t secret_len, fr_pair_list_t *vps)
 
void fr_bfd_global_free (void)
 
int fr_bfd_global_init (void)
 
bool fr_bfd_packet_ok (char const **err, uint8_t const *packet, size_t packet_len)
 

Variables

union {
bfd_auth_basic_t basic
 
bfd_auth_md5_t md5
 
bfd_auth_simple_t password
 
bfd_auth_sha1_t sha1
 
}; 
 
typedef __attribute__
 
fr_table_num_ordered_t const bfd_auth_type_table []
 
size_t const bfd_auth_type_table_len
 
char const * fr_bfd_packet_names [FR_BFD_CODE_MAX]
 

Data Structure Documentation

◆ __attribute__

struct __attribute__

Definition at line 63 of file bfd.h.

+ Collaboration diagram for __attribute__:
Data Fields
bfd_auth_t auth
uint8_t auth_len
unsigned int auth_present: 1
uint8_t auth_type
unsigned int control_plane_independent: 1
unsigned int demand: 1
uint32_t desired_min_tx_interval
uint8_t detect_multi
unsigned int diag: 5
uint8_t digest[MD5_DIGEST_LENGTH]
unsigned int final: 1
uint8_t key_id
uint8_t length
uint32_t min_echo_rx_interval
unsigned int multipoint: 1
uint32_t my_disc
uint8_t password[16]
unsigned int poll: 1
uint32_t required_min_rx_interval
uint8_t reserved
uint32_t sequence_no
unsigned int state: 2
unsigned int version: 3
uint32_t your_disc

◆ bfd_auth_t

union bfd_auth_t

Definition at line 95 of file bfd.h.

Data Fields
union bfd_auth_t __unnamed__

◆ bfd_auth_t.__unnamed180__

union bfd_auth_t.__unnamed180__

Definition at line 96 of file bfd.h.

Data Fields
bfd_auth_basic_t basic
bfd_auth_md5_t md5
bfd_auth_simple_t password
bfd_auth_sha1_t sha1

◆ fr_bfd_ctx_t

struct fr_bfd_ctx_t

Definition at line 154 of file bfd.h.

Data Fields
char const * secret shared secret. MUST be talloc'd
TALLOC_CTX * tmp_ctx for temporary things cleaned up during decoding

Macro Definition Documentation

◆ BFD_AUTH_INVALID

#define BFD_AUTH_INVALID   (BFD_AUTH_MET_KEYED_SHA1 + 1)

Definition at line 61 of file bfd.h.

◆ FR_BFD_CODE_MAX

#define FR_BFD_CODE_MAX   (4)

Definition at line 149 of file bfd.h.

◆ FR_BFD_HEADER_LENGTH

#define FR_BFD_HEADER_LENGTH   (24)

Definition at line 141 of file bfd.h.

◆ FR_BFD_PACKET_CODE_VALID

#define FR_BFD_PACKET_CODE_VALID (   _code)    (_code < FR_BFD_CODE_MAX)

Definition at line 152 of file bfd.h.

Typedef Documentation

◆ bfd_auth_type_t

◆ bfd_diag_t

typedef enum bfd_diag_t bfd_diag_t

◆ bfd_session_state_t

Enumeration Type Documentation

◆ bfd_auth_type_t

Enumerator
BFD_AUTH_RESERVED 
BFD_AUTH_SIMPLE 
BFD_AUTH_KEYED_MD5 
BFD_AUTH_MET_KEYED_MD5 
BFD_AUTH_KEYED_SHA1 
BFD_AUTH_MET_KEYED_SHA1 

Definition at line 52 of file bfd.h.

◆ bfd_diag_t

enum bfd_diag_t
Enumerator
BFD_DIAG_NONE 
BFD_CTRL_EXPIRED 
BFD_ECHO_FAILED 
BFD_NEIGHBOR_DOWN 
BFD_FORWARD_PLANE_RESET 
BFD_PATH_DOWN 
BFD_CONCATENATED_PATH_DOWN 
BFD_ADMIN_DOWN 
BFD_REVERSE_CONCAT_PATH_DOWN 

Definition at line 40 of file bfd.h.

◆ bfd_session_state_t

Enumerator
BFD_STATE_ADMIN_DOWN 
BFD_STATE_DOWN 
BFD_STATE_INIT 
BFD_STATE_UP 

Definition at line 33 of file bfd.h.

◆ fr_bfd_packet_code_t

Enumerator
FR_BFD_ADMIN_DOWN 
FR_BFD_DOWN 
FR_BFD_INIT 
FR_BFD_UP 

Definition at line 143 of file bfd.h.

Function Documentation

◆ __attribute__()

union bfd_auth_t __attribute__ ( (packed)  )

◆ fr_bfd_decode()

ssize_t fr_bfd_decode ( TALLOC_CTX *  ctx,
fr_pair_list_t out,
uint8_t const *  packet,
size_t  packet_len,
char const *  secret,
size_t  secret_len 
)
+ Here is the caller graph for this function:

◆ fr_bfd_encode()

ssize_t fr_bfd_encode ( uint8_t packet,
size_t  packet_len,
uint8_t const *  original,
char const *  secret,
size_t  secret_len,
fr_pair_list_t vps 
)

◆ fr_bfd_global_free()

void fr_bfd_global_free ( void  )

Definition at line 244 of file base.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bfd_global_init()

int fr_bfd_global_init ( void  )

Definition at line 221 of file base.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_bfd_packet_ok()

bool fr_bfd_packet_ok ( char const **  err,
uint8_t const *  packet,
size_t  packet_len 
)

Definition at line 83 of file base.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ 

union { ... }

◆ __attribute__

typedef __attribute__

◆ bfd_auth_type_table

fr_table_num_ordered_t const bfd_auth_type_table[]
extern

Definition at line 70 of file base.c.

◆ bfd_auth_type_table_len

size_t const bfd_auth_type_table_len
extern

Definition at line 78 of file base.c.

◆ fr_bfd_packet_names

char const* fr_bfd_packet_names[FR_BFD_CODE_MAX]
extern

Definition at line 63 of file base.c.