The bfd module manages BFD sessions
Bi-directional Forwarding Detection (BFD) is a low-latency protocol designed to detect faults between two forwarding planes. The protocol itself is independent from media, link and routing protocols. In EOS, BFD is implemented on top of IP encapuslations, conforming to RFC5881.
This module provides APIs to provision BFD. APIs include
An iterator is also provided to iterate through all BFD sessions that are configured via EosSdk in the system.
The BFD handler.
This class provides handler APIs to react to a BFD’s session state change.
Public Functions
Registers this class to receive change updates on all BFD sessions.
Expects a boolean signifying whether notifications should be generated for all BFD sessions created by EosSdk or not.
This controls notifications on:
Registers this class to receive change updates on the given BFD session.
Expects the session key of the corresponding BFD session and a boolean signifying whether notifications should be propagated to this BFD session or not.
Handler called when the status of a BFD session status changes.
Possible status are: BFD_SESSION_STATUS_NULL BFD_SESSION_STATUS_DOWN BFD_SESSION_STATUS_INIT BFD_SESSION_STATUS_UP BFD_SESSION_STATUS_ADMIN_DOWN
Handler called when a BFD session is created
Handler called when a BFD session is deleted
An iterator that yields an bfd_session_key_t for each configured BFD session
Private Functions
Friends
A manager of BFD session configurations for EosSdk client
Create one of these via an sdk object prior to starting the agent main loop. When your eos::agent_handler::on_initialized virtual function is called, the manager is valid for use.
Public Functions
Returns an iterator over all BFD sessions configured through EosSdk on the system.
Return true if the BFD session is configured.
Creates a BFD session. If an existing session has already been created by other client (i.e. BGP, OSPF), no new BFD session will be created. Instead, EsoSdk will be added to the list of clients that will receive BFD session status change notifications.
Returns the BFD session with the specified key. Will return an empty bfd_session_t if the BFD session does not exist already.
Remove a BFD session if it exists. It is a no-op if the specified BFD session does not exist.
Set BFD default interval value. It will be applied to all interface unless overridden by per-interface interval configuration.
Get global BFD interval configuration.
Set BFD interval on an interface.
Get BFD interval configuration on an interface.
Reset BFD interval configuration on an interface back to value configured by bfd_default_interval_is(). If bfd_default_interval_is() has not been explicitly called to configure a default interval, the interval will be reset to tx=300ms, rx=300ms and mult=3.
Return the BFD status given a BFD session key.
Protected Functions
Private Members
Friends
Enums
BFD session status.
Values:
BFD session type.
Values:
BFD session key class. Used to identify a BFD session on a switch.
Public Functions
Getter for ‘ip_addr’: IP address of the peer.
Getter for ‘vrf’: vrf associated with the BFD session.
Getter for ‘type’: type associated with the BFD session.
Getter for ‘intf’: local interface associated with the BFD session.
The hash function for type bfd_session_key_t.
Returns a string representation of the current object’s values.
Friends
A utility stream operator that adds a string representation of bfd_session_key_t to the ostream.
BFD interval configuration class. Used to specify BFD timer interval.
Public Functions
Getter for ‘tx’: desired minimum tx interval.
Getter for ‘rx’: required minimum rx interval.
Getter for ‘mult’: detection multiplier.
Returns a string representation of the current object’s values.
Private Members
Friends
A utility stream operator that adds a string representation of bfd_interval_t to the ostream.
This data structure is used to describe a BFD session.
Public Functions
Getter for ‘peer’: the peer for this BFD session.
Getter for ‘status’: the status of the BFD session.
Returns a string representation of the current object’s values.
Friends
A utility stream operator that adds a string representation of bfd_session_t to the ostream.