OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ErmVpnPrefix Class Reference

#include <ermvpn_route.h>

Collaboration diagram for ErmVpnPrefix:

Public Types

enum  RouteType { NativeRoute = 0, LocalTreeRoute = 1, GlobalTreeRoute = 2, Invalid = 255 }
 

Public Member Functions

 ErmVpnPrefix ()
 
 ErmVpnPrefix (uint8_t type, const RouteDistinguisher &rd, const Ip4Address &group, const Ip4Address &source)
 
 ErmVpnPrefix (uint8_t type, const RouteDistinguisher &rd, const Ip4Address &router_id, const Ip4Address &group, const Ip4Address &source)
 
const std::string GetType () const
 
std::string ToString () const
 
std::string ToXmppIdString () const
 
bool operator== (const ErmVpnPrefix &rhs) const
 
uint8_t type () const
 
const RouteDistinguisherroute_distinguisher () const
 
Ip4Address router_id () const
 
Ip4Address group () const
 
Ip4Address source () const
 
void set_route_distinguisher (const RouteDistinguisher &rd)
 
void BuildProtoPrefix (BgpProtoPrefix *prefix) const
 

Static Public Member Functions

static int FromProtoPrefix (const BgpProtoPrefix &proto_prefix, ErmVpnPrefix *prefix)
 
static int FromProtoPrefix (BgpServer *server, const BgpProtoPrefix &proto_prefix, const BgpAttr *attr, const Address::Family family, ErmVpnPrefix *prefix, BgpAttrPtr *new_attr, uint32_t *label, uint32_t *l3_label)
 
static ErmVpnPrefix FromString (const std::string &str, boost::system::error_code *errorp=NULL)
 
static bool IsValidForBgp (uint8_t type)
 
static bool IsValid (uint8_t type)
 

Private Attributes

uint8_t type_
 
RouteDistinguisher rd_
 
Ip4Address router_id_
 
Ip4Address group_
 
Ip4Address source_
 

Detailed Description

Definition at line 22 of file ermvpn_route.h.

Member Enumeration Documentation

Enumerator
NativeRoute 
LocalTreeRoute 
GlobalTreeRoute 
Invalid 

Definition at line 24 of file ermvpn_route.h.

Constructor & Destructor Documentation

ErmVpnPrefix::ErmVpnPrefix ( )

Definition at line 34 of file ermvpn_route.cc.

ErmVpnPrefix::ErmVpnPrefix ( uint8_t  type,
const RouteDistinguisher rd,
const Ip4Address group,
const Ip4Address source 
)

Definition at line 37 of file ermvpn_route.cc.

ErmVpnPrefix::ErmVpnPrefix ( uint8_t  type,
const RouteDistinguisher rd,
const Ip4Address router_id,
const Ip4Address group,
const Ip4Address source 
)

Definition at line 42 of file ermvpn_route.cc.

Member Function Documentation

void ErmVpnPrefix::BuildProtoPrefix ( BgpProtoPrefix prefix) const

Definition at line 94 of file ermvpn_route.cc.

Here is the call graph for this function:

int ErmVpnPrefix::FromProtoPrefix ( const BgpProtoPrefix proto_prefix,
ErmVpnPrefix prefix 
)
static

Definition at line 49 of file ermvpn_route.cc.

Here is the call graph for this function:

int ErmVpnPrefix::FromProtoPrefix ( BgpServer server,
const BgpProtoPrefix proto_prefix,
const BgpAttr attr,
const Address::Family  family,
ErmVpnPrefix prefix,
BgpAttrPtr new_attr,
uint32_t *  label,
uint32_t *  l3_label 
)
static

Definition at line 84 of file ermvpn_route.cc.

Here is the call graph for this function:

ErmVpnPrefix ErmVpnPrefix::FromString ( const std::string &  str,
boost::system::error_code *  errorp = NULL 
)
static

Definition at line 128 of file ermvpn_route.cc.

Here is the call graph for this function:

const std::string ErmVpnPrefix::GetType ( ) const

Definition at line 319 of file ermvpn_route.cc.

Ip4Address ErmVpnPrefix::group ( ) const
inline

Definition at line 59 of file ermvpn_route.h.

bool ErmVpnPrefix::IsValid ( uint8_t  type)
static

Definition at line 239 of file ermvpn_route.cc.

Here is the call graph for this function:

bool ErmVpnPrefix::IsValidForBgp ( uint8_t  type)
static

Definition at line 235 of file ermvpn_route.cc.

bool ErmVpnPrefix::operator== ( const ErmVpnPrefix rhs) const

Definition at line 243 of file ermvpn_route.cc.

const RouteDistinguisher& ErmVpnPrefix::route_distinguisher ( ) const
inline

Definition at line 57 of file ermvpn_route.h.

Ip4Address ErmVpnPrefix::router_id ( ) const
inline

Definition at line 58 of file ermvpn_route.h.

void ErmVpnPrefix::set_route_distinguisher ( const RouteDistinguisher rd)
inline

Definition at line 61 of file ermvpn_route.h.

Ip4Address ErmVpnPrefix::source ( ) const
inline

Definition at line 60 of file ermvpn_route.h.

string ErmVpnPrefix::ToString ( ) const

Definition at line 218 of file ermvpn_route.cc.

Here is the call graph for this function:

string ErmVpnPrefix::ToXmppIdString ( ) const

Definition at line 227 of file ermvpn_route.cc.

Here is the call graph for this function:

uint8_t ErmVpnPrefix::type ( ) const
inline

Definition at line 56 of file ermvpn_route.h.

Member Data Documentation

Ip4Address ErmVpnPrefix::group_
private

Definition at line 69 of file ermvpn_route.h.

RouteDistinguisher ErmVpnPrefix::rd_
private

Definition at line 67 of file ermvpn_route.h.

Ip4Address ErmVpnPrefix::router_id_
private

Definition at line 68 of file ermvpn_route.h.

Ip4Address ErmVpnPrefix::source_
private

Definition at line 70 of file ermvpn_route.h.

uint8_t ErmVpnPrefix::type_
private

Definition at line 66 of file ermvpn_route.h.


The documentation for this class was generated from the following files: