48 struct sockaddr_storage remote_sockaddr;
49 socklen_t remote_salen;
51 struct sockaddr_storage local_sockaddr;
Describes a host allowed to send packets to the server.
Stores all information relating to an event list.
uint32_t recv_auth_seq
their auth_seq number
int sockfd
cached for laziness
fr_time_delta_t my_min_echo_rx_interval
what we send for echo_rx_interval
@ BFD_STATE_CHANGE_UP
we are going to UP
@ BFD_STATE_CHANGE_TIMEOUT_DOWN
@ BFD_STATE_CHANGE_INIT
we are going to INIT
@ BFD_STATE_CHANGE_PEER_DOWN
the peer has signalled us that he's Down.
@ BFD_STATE_CHANGE_INVALID
@ BFD_STATE_CHANGE_ADMIN_DOWN
we are admin-down
@ BFD_STATE_CHANGE_NONE
no state change
void bfd_session_start(bfd_session_t *session)
size_t secret_len
doesn't change while we're running
bool demand_mode
demand is "once session is up, stop sending packets"
fr_listen_t * listen
associated listener
bfd_session_state_t remote_session_state
their view of the session state
fr_time_t last_recv
last received packet
fr_time_delta_t required_min_rx_interval
intervals between receives
bfd_session_state_t session_state
our view of the session state
uint32_t local_disc
our session ID, which is unique to this session
@ BFD_WRAPPER_STATE_CHANGE
@ BFD_WRAPPER_SEND_PACKET
@ BFD_WRAPPER_RECV_PACKET
fr_time_t last_sent
the last time we sent a packet
fr_client_t client
might as well reuse this, others need it
uint32_t remote_disc
their session ID
char const * server_name
our name
bool only_state_changes
copied from proto_bfd_udp.c
uint16_t port
peer port where packets are sent to
bfd_auth_type_t auth_type
what kind of authentication is used
int bfd_session_init(bfd_session_t *session)
bfd_state_change_t bfd_session_process(bfd_session_t *session, bfd_packet_t *bfd)
fr_event_timer_t const * ev_timeout
when we time out for not receiving a packet
uint32_t xmit_auth_seq
our auth_seq number
bool passive
active or passive role from RFC 5880 - unused
fr_time_delta_t desired_min_tx_interval
intervals between transmits
bool remote_demand_mode
their demand mode
void * inst
proto_bfd_udp instance using this session
fr_network_t * nr
network side of things
bfd_state_change_t state_change
int detection_timeouts
too many timeouts means !auth_seq_known
fr_event_list_t * el
event list
fr_time_delta_t next_min_tx_interval
how to update this when we're polling
bool auth_seq_known
do we know the authentication sequence number?
fr_time_t next_recv
when we next expect to receive a packet
fr_time_delta_t detection_time
used to set ev_timeout
bfd_diag_t local_diag
diagnostics for errors
fr_event_timer_t const * ev_packet
for when we next send a packet
void bfd_session_admin_down(bfd_session_t *session)
fr_time_delta_t remote_min_rx_interval
their min_rx_interval
A time delta, a difference in time measured in nanoseconds.