4 #ifndef SRC_BFD_BFD_COMMON_H_
5 #define SRC_BFD_BFD_COMMON_H_
9 #include <boost/asio.hpp>
10 #include <boost/optional.hpp>
11 #include <boost/date_time.hpp>
12 #include <boost/random/taus88.hpp>
76 std::ostringstream os;
91 boost::asio::ip::address()) :
108 std::ostringstream os;
130 typedef boost::function<void(
const SessionKey &key,
boost::function< void(const SessionKey &key, const BFD::BFDState &state)> ChangeCb
std::ostream & operator<<(std::ostream &out, BFDState state)
@ kResultCode_InvalidPacket
@ kResultCode_UnknownSession
@ kResultCode_NotImplemented
boost::posix_time::time_duration TimeInterval
const TimeInterval kIdleTxInterval
@ kControlDetectionTimeExpired
@ kDiagnosticFirstInvalid
@ kNeighborSignaledSessionDown
@ kReverseConcatenatedPathDown
const int kMinimalPacketLength
boost::optional< BFDState > BFDStateFromString(const std::string &str)
boost::random::taus88 randomGen
TimeInterval desiredMinTxInterval
int detectionTimeMultiplier
TimeInterval requiredMinRxInterval
const std::string to_string() const
bool operator<(const SessionIndex &other) const
SessionIndex(uint32_t if_index=0, uint32_t vrf_index=0)
const std::string to_string() const
SessionKey(const boost::asio::ip::address &remote_address, const SessionIndex &session_index=SessionIndex(), uint16_t remote_port=kSingleHop, const boost::asio::ip::address &local_address=boost::asio::ip::address())
boost::asio::ip::address remote_address
boost::asio::ip::address local_address
bool operator<(const SessionKey &other) const
#define BOOL_KEY_COMPARE(x, y)