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;
boost::asio::ip::address IpAddress
boost::asio::ip::address_v4 Ip4Address
boost::intrusive_ptr< const BgpAttr > BgpAttrPtr
std::unique_ptr< DBRequestKey > KeyPtr
void SetLeafADPrefixFromSPMSIPrefix(const MvpnPrefix &prefix)
IpAddress originatorIpAddress() const
std::string ToString() const
void SetSPMSIPrefixFromLeafADPrefix(const MvpnPrefix &prefix)
static const size_t kIntraASPMSIADRouteSize
void set_route_distinguisher(const RouteDistinguisher &rd)
bool operator==(const MvpnPrefix &rhs) const
static bool GetAsnFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, size_t *pos2, boost::system::error_code *ec)
static const size_t kSourceActiveADRouteSize
static const size_t kPrefixBytes
static int SpmsiAdRouteFromProtoPrefix(const BgpProtoPrefix &proto_prefix, MvpnPrefix *prefix, size_t rd_offset)
const std::string GetType() const
static bool GetSourceFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, size_t *pos2, boost::system::error_code *ec)
uint8_t ip_prefix_length() const
static int FromProtoPrefix(const BgpProtoPrefix &proto_prefix, MvpnPrefix *prefix)
std::vector< uint8_t > rt_key_
static const size_t kInterASPMSIADRouteSize
Ip4Address source() const
void set_originator(const Ip4Address &originator)
std::string ToXmppIdString() const
static const size_t kSPMSIADRouteSize
static bool GetOriginatorFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, boost::system::error_code *errorp)
static bool GetRDFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, size_t *pos2, boost::system::error_code *ec)
static const size_t kAsnSize
static const size_t kIp4AddrBitSize
IpAddress sourceIpAddress() const
static bool GetTypeFromString(MvpnPrefix *prefix, const std::string &str, boost::system::error_code *errorp, size_t *pos1)
static const size_t kSourceTreeJoinRouteSize
static MvpnPrefix FromString(const std::string &str, boost::system::error_code *errorp=NULL)
static bool IsValid(uint8_t type)
int CompareTo(const MvpnPrefix &rhs) const
Ip4Address GetType3OriginatorFromType4Route() const
static bool GetGroupFromString(MvpnPrefix *prefix, const std::string &str, size_t pos1, size_t *pos2, boost::system::error_code *ec, bool last=false)
Ip4Address originator() const
const RouteDistinguisher & route_distinguisher() const
void BuildProtoPrefix(BgpProtoPrefix *prefix) const
IpAddress groupIpAddress() const
static const size_t kIp4AddrSize
static const size_t kRdSize
static const size_t kLeafADRouteSize
virtual int CompareTo(const Route &rhs) const
virtual std::string ToString() const
virtual std::string ToXmppIdString() const
virtual void SetKey(const DBRequestKey *reqkey)
DISALLOW_COPY_AND_ASSIGN(MvpnRoute)
MvpnRoute(const MvpnPrefix &prefix)
const std::string GetType() const
virtual bool IsValid() const
const MvpnPrefix & GetPrefix() const
virtual KeyPtr GetDBRequestKey() const
virtual void BuildProtoPrefix(BgpProtoPrefix *prefix, const BgpAttr *attr=NULL, uint32_t label=0, uint32_t l3_label=0) const
virtual void BuildBgpProtoNextHop(std::vector< uint8_t > &nh, IpAddress nexthop) const
virtual bool IsLess(const DBEntry &genrhs) const