The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Enumerations | Functions
session.h File Reference
#include "proto_bfd.h"
+ Include dependency graph for session.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  bfd_wrapper_t
 

Enumerations

enum  bfd_state_change_t {
  BFD_STATE_CHANGE_INVALID = 0 ,
  BFD_STATE_CHANGE_NONE ,
  BFD_STATE_CHANGE_ADMIN_DOWN ,
  BFD_STATE_CHANGE_PEER_DOWN ,
  BFD_STATE_CHANGE_INIT ,
  BFD_STATE_CHANGE_UP ,
  BFD_STATE_CHANGE_TIMEOUT_DOWN
}
 
enum  bfd_wrapper_type_t {
  BFD_WRAPPER_INVALID = 0 ,
  BFD_WRAPPER_RECV_PACKET ,
  BFD_WRAPPER_SEND_PACKET ,
  BFD_WRAPPER_STATE_CHANGE
}
 

Functions

void bfd_session_admin_down (bfd_session_t *session)
 
int bfd_session_init (bfd_session_t *session)
 
bfd_state_change_t bfd_session_process (bfd_session_t *session, bfd_packet_t *bfd)
 
void bfd_session_start (bfd_session_t *session)
 

Data Structure Documentation

◆ bfd_session_t

struct bfd_session_t

Definition at line 28 of file session.h.

+ Collaboration diagram for bfd_session_t:
Data Fields
bool auth_seq_known do we know the authentication sequence number?
bfd_auth_type_t auth_type what kind of authentication is used
fr_client_t client might as well reuse this, others need it
bool demand_mode demand is "once session is up, stop sending packets"
fr_time_delta_t desired_min_tx_interval intervals between transmits
uint32_t detect_multi
fr_time_delta_t detection_time used to set ev_timeout
int detection_timeouts too many timeouts means !auth_seq_known
bool doing_poll
fr_event_list_t * el event list
fr_event_timer_t const * ev_packet for when we next send a packet
fr_event_timer_t const * ev_timeout when we time out for not receiving a packet
void * inst proto_bfd_udp instance using this session
fr_time_t last_recv last received packet
fr_time_t last_sent the last time we sent a packet
fr_listen_t * listen associated listener
bfd_diag_t local_diag diagnostics for errors
uint32_t local_disc our session ID, which is unique to this session
socklen_t local_salen
struct sockaddr_storage local_sockaddr cached for laziness
fr_time_delta_t my_min_echo_rx_interval what we send for echo_rx_interval
fr_time_delta_t next_min_tx_interval how to update this when we're polling
fr_time_t next_recv when we next expect to receive a packet
fr_network_t * nr network side of things
bool only_state_changes copied from proto_bfd_udp.c
bool passive active or passive role from RFC 5880 - unused
uint16_t port peer port where packets are sent to
uint32_t recv_auth_seq their auth_seq number
bool remote_demand_mode their demand mode
uint32_t remote_disc their session ID
fr_time_delta_t remote_min_rx_interval their min_rx_interval
socklen_t remote_salen
bfd_session_state_t remote_session_state their view of the session state
struct sockaddr_storage remote_sockaddr cached for laziness
fr_time_delta_t required_min_rx_interval intervals between receives
size_t secret_len doesn't change while we're running
char const * server_name our name
bfd_session_state_t session_state our view of the session state
int sockfd cached for laziness
uint32_t xmit_auth_seq our auth_seq number

◆ bfd_wrapper_t

struct bfd_wrapper_t

Definition at line 141 of file session.h.

+ Collaboration diagram for bfd_wrapper_t:
Data Fields
uint8_t packet[]
bfd_session_t * session
bfd_state_change_t state_change
uint32_t type

Enumeration Type Documentation

◆ bfd_state_change_t

Enumerator
BFD_STATE_CHANGE_INVALID 
BFD_STATE_CHANGE_NONE 

no state change

BFD_STATE_CHANGE_ADMIN_DOWN 

we are admin-down

BFD_STATE_CHANGE_PEER_DOWN 

the peer has signalled us that he's Down.

BFD_STATE_CHANGE_INIT 

we are going to INIT

BFD_STATE_CHANGE_UP 

we are going to UP

BFD_STATE_CHANGE_TIMEOUT_DOWN 

Definition at line 131 of file session.h.

◆ bfd_wrapper_type_t

Enumerator
BFD_WRAPPER_INVALID 
BFD_WRAPPER_RECV_PACKET 
BFD_WRAPPER_SEND_PACKET 
BFD_WRAPPER_STATE_CHANGE 

Definition at line 124 of file session.h.

Function Documentation

◆ bfd_session_admin_down()

void bfd_session_admin_down ( bfd_session_t session)

Definition at line 75 of file session.c.

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

◆ bfd_session_init()

int bfd_session_init ( bfd_session_t session)

Definition at line 1063 of file session.c.

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

◆ bfd_session_process()

bfd_state_change_t bfd_session_process ( bfd_session_t session,
bfd_packet_t *  bfd 
)

Definition at line 150 of file session.c.

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

◆ bfd_session_start()

void bfd_session_start ( bfd_session_t session)

Definition at line 1087 of file session.c.

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