5 #ifndef SRC_BGP_MVPN_MVPN_ROUTE_H_
6 #define SRC_BGP_MVPN_MVPN_ROUTE_H_
13 #include <boost/system/error_code.hpp>
85 const std::string
GetType()
const;
97 boost::system::error_code *errorp = NULL);
102 const std::string &str, boost::system::error_code *errorp,
105 const std::string &str,
size_t pos1,
size_t *pos2,
106 boost::system::error_code *ec);
108 const std::string &str,
size_t pos1,
109 boost::system::error_code *errorp);
111 const std::string &str,
size_t pos1,
size_t *pos2,
112 boost::system::error_code *ec);
114 const std::string &str,
size_t pos1,
size_t *pos2,
115 boost::system::error_code *ec);
117 const std::string &str,
size_t pos1,
size_t *pos2,
118 boost::system::error_code *ec,
bool last =
false);
135 virtual std::string
ToString()
const;
146 uint32_t l3_label = 0)
const;
156 const std::string
GetType()
const;
165 #endif // SRC_BGP_MVPN_MVPN_ROUTE_H_
virtual std::string ToString() const
static bool GetSourceFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, size_t *pos2, boost::system::error_code *ec)
static const size_t kInterASPMSIADRouteSize
int CompareTo(const MvpnPrefix &rhs) const
static int FromProtoPrefix(const BgpProtoPrefix &proto_prefix, MvpnPrefix *prefix)
virtual bool IsValid() const
static const size_t kSPMSIADRouteSize
IpAddress groupIpAddress() const
static const size_t kPrefixBytes
boost::asio::ip::address IpAddress
static const size_t kAsnSize
virtual void BuildProtoPrefix(BgpProtoPrefix *prefix, const BgpAttr *attr=NULL, uint32_t label=0, uint32_t l3_label=0) const
void SetLeafADPrefixFromSPMSIPrefix(const MvpnPrefix &prefix)
void set_originator(const Ip4Address &originator)
static bool GetOriginatorFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, boost::system::error_code *errorp)
static bool GetAsnFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, size_t *pos2, boost::system::error_code *ec)
void set_route_distinguisher(const RouteDistinguisher &rd)
static int SpmsiAdRouteFromProtoPrefix(const BgpProtoPrefix &proto_prefix, MvpnPrefix *prefix, size_t rd_offset)
static const size_t kIp4AddrBitSize
std::unique_ptr< DBRequestKey > KeyPtr
std::string ToXmppIdString() const
const std::string GetType() const
virtual std::string ToXmppIdString() const
boost::intrusive_ptr< const BgpAttr > BgpAttrPtr
static const size_t kLeafADRouteSize
virtual KeyPtr GetDBRequestKey() const
bool operator==(const MvpnPrefix &rhs) const
static const size_t kIp4AddrSize
IpAddress sourceIpAddress() const
boost::asio::ip::address_v4 Ip4Address
const std::string GetType() const
virtual int CompareTo(const Route &rhs) const
void SetSPMSIPrefixFromLeafADPrefix(const MvpnPrefix &prefix)
std::vector< uint8_t > rt_key_
static const size_t kSourceActiveADRouteSize
static const size_t kSourceTreeJoinRouteSize
IpAddress originatorIpAddress() const
virtual bool IsLess(const DBEntry &genrhs) const
static bool IsValid(uint8_t type)
virtual void BuildBgpProtoNextHop(std::vector< uint8_t > &nh, IpAddress nexthop) const
static bool GetGroupFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, size_t *pos2, boost::system::error_code *ec, bool last=false)
static bool GetTypeFromString(MvpnPrefix *prefix, const std::string &str, boost::system::error_code *errorp, size_t *pos1)
uint8_t ip_prefix_length() const
MvpnRoute(const MvpnPrefix &prefix)
static MvpnPrefix FromString(const std::string &str, boost::system::error_code *errorp=NULL)
Ip4Address source() const
const MvpnPrefix & GetPrefix() const
DISALLOW_COPY_AND_ASSIGN(MvpnRoute)
const RouteDistinguisher & route_distinguisher() const
static const size_t kRdSize
Ip4Address originator() const
virtual void SetKey(const DBRequestKey *reqkey)
static const size_t kIntraASPMSIADRouteSize
void BuildProtoPrefix(BgpProtoPrefix *prefix) const
Ip4Address GetType3OriginatorFromType4Route() const
std::string ToString() const
static bool GetRDFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, size_t *pos2, boost::system::error_code *ec)