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

Base class for all Route entries in agent. More...

#include <agent_route.h>

Inheritance diagram for AgentRoute:
Collaboration diagram for AgentRoute:

Public Types

enum  Trace {
  ADD, DEL, ADD_PATH, DELETE_PATH,
  CHANGE_PATH, STALE_PATH
}
 
typedef DependencyList
< AgentRoute, AgentRoute
RouteDependencyList
 
typedef DependencyList
< NextHop, AgentRoute
TunnelNhDependencyList
 
- Public Types inherited from Route
typedef
boost::intrusive::member_hook
< Path,
boost::intrusive::list_member_hook
<>,&Path::node_
PathListMember
 
typedef boost::intrusive::list
< Path, PathListMember
PathList
 
typedef bool(* Compare )(const Path &path1, const Path &path2)
 
- Public Types inherited from DBEntryBase
typedef DBTableBase::ListenerId ListenerId
 
typedef std::unique_ptr
< DBRequestKey
KeyPtr
 

Public Member Functions

 AgentRoute (VrfEntry *vrf, bool is_multicast, const std::string &intf_route_type="interface")
 
virtual ~AgentRoute ()
 
virtual bool IsLess (const DBEntry &rhs) const
 
virtual KeyPtr GetDBRequestKey () const =0
 
virtual void SetKey (const DBRequestKey *key)=0
 
virtual int CompareTo (const Route &rhs) const =0
 
virtual Agent::RouteTableType GetTableType () const =0
 
virtual bool DBEntrySandesh (Sandesh *sresp, bool stale) const =0
 
virtual std::string ToString () const =0
 
virtual const std::string GetAddressString () const =0
 
virtual const std::string GetSourceAddressString () const =0
 
virtual bool ReComputePathDeletion (AgentPath *path)
 
virtual bool ReComputePathAdd (AgentPath *path)
 
virtual uint32_t GetActiveLabel () const
 
virtual AgentPathFindPathUsingKeyData (const AgentRouteKey *key, const AgentRouteData *data) const
 
virtual AgentPathFindPath (const Peer *peer) const
 
virtual bool RecomputeRoutePath (Agent *agent, DBTablePartition *part, AgentPath *path, AgentRouteData *data)
 
virtual void UpdateDerivedRoutes (AgentRouteTable *table, const AgentPath *path, bool active_path_changed)
 
virtual void DeleteDerivedRoutes (AgentRouteTable *table)
 
bool is_multicast () const
 
VrfEntryvrf () const
 
uint32_t vrf_id () const
 
const std::string & intf_route_type () const
 
void set_intf_route_type (const std::string &intf_route_type)
 
AgentPathFindLocalPath () const
 
AgentPathFindLocalVmPortPath () const
 
const AgentPathFindIntfOrCompLocalVmPortPath () const
 Finds path to an interface or a composite of interfaces and returns it. The priority is given to composite: if both an interface and a composite are present, then the composite path is returned. More...
 
AgentPathGetLocalVmPortPath () const
 
const AgentPathGetActivePath () const
 
const NextHopGetActiveNextHop () const
 
const std::string & dest_vn_name () const
 
bool IsRPFInvalid () const
 
void EnqueueRouteResync () const
 
void ResyncTunnelNextHop ()
 
bool HasUnresolvedPath ()
 
bool Sync (void)
 
void UpdateDependantRoutes ()
 
bool IsDependantRouteEmpty ()
 
bool IsTunnelNHListEmpty ()
 
void FillTrace (RouteInfo &route, Trace event, const AgentPath *path) const
 
bool WaitForTraffic () const
 
bool DeleteAllBgpPath (DBTablePartBase *part, AgentRouteTable *table)
 
void DeletePathFromPeer (DBTablePartBase *part, AgentRouteTable *table, AgentPath *path)
 
bool SubOpResyncInput (VrfEntry *vrf, AgentRouteTable *table, AgentPath **path_ptr, AgentRouteKey *key, AgentRouteData *data)
 
bool SubOpAddChangeInput (VrfEntry *vrf, AgentRouteTable *table, AgentPath **path_ptr, AgentRouteKey *key, AgentRouteData *data, bool route_added)
 
void DeleteInput (DBTablePartition *part, AgentRouteTable *table, AgentRouteKey *key, AgentRouteData *data)
 
void AddUnresolvedRouteToTable (AgentRouteTable *table)
 
void RemoveUnresolvedRouteFromTable (AgentRouteTable *table)
 
virtual uint8_t prefix_length () const
 Returns the length of a stored prefix address. More...
 
- Public Member Functions inherited from Route
 Route ()
 
virtual ~Route ()
 
bool operator< (const Route &rhs) const
 
const Pathfront () const
 
void insert (const Path *path)
 
void remove (const Path *path)
 
void Sort (Compare compare, const Path *prev_front)
 
const PathListGetPathList () const
 
PathListGetPathList ()
 
- Public Member Functions inherited from DBEntry
 DBEntry ()
 
virtual ~DBEntry ()
 
bool operator< (const DBEntry &rhs) const
 
- Public Member Functions inherited from DBEntryBase
 DBEntryBase ()
 
virtual ~DBEntryBase ()
 
virtual bool IsMoreSpecific (const std::string &match) const
 
virtual bool IsLessSpecific (const std::string &match) const
 
void SetState (DBTableBase *tbl_base, ListenerId listener, DBState *state)
 
void ClearState (DBTableBase *tbl_base, ListenerId listener)
 
DBStateGetState (DBTableBase *tbl_base, ListenerId listener) const
 
const DBStateGetState (const DBTableBase *tbl_base, ListenerId listener) const
 
bool is_state_empty (DBTablePartBase *tpart)
 
bool is_state_empty_unlocked (DBTablePartBase *tpart)
 
void Delete ()
 
void MarkDelete ()
 
void ClearDelete ()
 
bool IsDeleted () const
 
void set_onlist ()
 
void clear_onlist ()
 
bool is_onlist ()
 
void SetOnRemoveQ ()
 
bool IsOnRemoveQ ()
 
void ClearOnRemoveQ ()
 
void set_last_change_at (uint64_t time)
 
void set_last_change_at_to_now ()
 
const uint64_t last_change_at () const
 
const std::string last_change_at_str () const
 
void set_last_update_at (uint64_t time)
 
void set_last_update_at_to_now ()
 
const uint64_t last_update_at () const
 
DBTablePartBaseget_table_partition () const
 
void set_table_partition (DBTablePartBase *tpart)
 
DBTableBaseget_table () const
 
void Notify ()
 

Protected Member Functions

void SetVrf (VrfEntry *vrf)
 
void RemovePath (AgentPath *path)
 
void InsertPath (const AgentPath *path)
 
virtual void HandleMulticastLabel (const Agent *agent, AgentPath *path, const AgentPath *local_peer_path, const AgentPath *local_vm_peer_path, bool del, uint32_t *evpn_label)
 
virtual bool ReComputeMulticastPaths (AgentPath *path, bool del)
 
virtual void HandleDeviceMastershipUpdate (AgentPath *path, bool del)
 
virtual Composite::Type GetMulticastCompType ()
 
const AgentRouteTableGetDependentRouteTable (void) const
 
virtual bool ValidateMcastSrc () const
 

Private Member Functions

bool ProcessPath (Agent *agent, DBTablePartition *part, AgentPath *path, AgentRouteData *data)
 
 DEPENDENCY_LIST (AgentRoute, AgentRoute, dependant_routes_)
 
 DEPENDENCY_LIST (NextHop, AgentRoute, tunnel_nh_list_)
 
 DISALLOW_COPY_AND_ASSIGN (AgentRoute)
 

Private Attributes

VrfEntryvrf_
 
bool is_multicast_
 
std::string intf_route_type_
 
AgentRouteTabledependent_route_table_
 

Friends

class AgentRouteTable
 
class EcmpData
 

Additional Inherited Members

- Public Attributes inherited from DBEntryBase
boost::intrusive::list_member_hook chg_list_
 

Detailed Description

Base class for all Route entries in agent.

Definition at line 224 of file agent_route.h.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
ADD 
DEL 
ADD_PATH 
DELETE_PATH 
CHANGE_PATH 
STALE_PATH 

Definition at line 226 of file agent_route.h.

Constructor & Destructor Documentation

AgentRoute::AgentRoute ( VrfEntry vrf,
bool  is_multicast,
const std::string &  intf_route_type = "interface" 
)
inline

Definition at line 238 of file agent_route.h.

virtual AgentRoute::~AgentRoute ( )
inlinevirtual

Definition at line 242 of file agent_route.h.

Member Function Documentation

void AgentRoute::AddUnresolvedRouteToTable ( AgentRouteTable table)

Definition at line 352 of file agent_route.cc.

Here is the call graph for this function:

virtual int AgentRoute::CompareTo ( const Route rhs) const
pure virtual
virtual bool AgentRoute::DBEntrySandesh ( Sandesh sresp,
bool  stale 
) const
pure virtual
bool AgentRoute::DeleteAllBgpPath ( DBTablePartBase part,
AgentRouteTable table 
)

Definition at line 614 of file agent_route.cc.

Here is the call graph for this function:

virtual void AgentRoute::DeleteDerivedRoutes ( AgentRouteTable table)
inlinevirtual

Reimplemented in EvpnRouteEntry.

Definition at line 272 of file agent_route.h.

void AgentRoute::DeleteInput ( DBTablePartition part,
AgentRouteTable table,
AgentRouteKey key,
AgentRouteData data 
)

Definition at line 555 of file agent_route.cc.

Here is the call graph for this function:

void AgentRoute::DeletePathFromPeer ( DBTablePartBase part,
AgentRouteTable table,
AgentPath path 
)

Definition at line 654 of file agent_route.cc.

Here is the call graph for this function:

AgentRoute::DEPENDENCY_LIST ( AgentRoute  ,
AgentRoute  ,
dependant_routes_   
)
private
AgentRoute::DEPENDENCY_LIST ( NextHop  ,
AgentRoute  ,
tunnel_nh_list_   
)
private
const string & AgentRoute::dest_vn_name ( ) const

Definition at line 1026 of file agent_route.cc.

Here is the call graph for this function:

AgentRoute::DISALLOW_COPY_AND_ASSIGN ( AgentRoute  )
private
void AgentRoute::EnqueueRouteResync ( void  ) const

Definition at line 913 of file agent_route.cc.

Here is the call graph for this function:

void AgentRoute::FillTrace ( RouteInfo &  route,
Trace  event,
const AgentPath path 
) const

Definition at line 1583 of file agent_path.cc.

Here is the call graph for this function:

const AgentPath * AgentRoute::FindIntfOrCompLocalVmPortPath ( ) const

Finds path to an interface or a composite of interfaces and returns it. The priority is given to composite: if both an interface and a composite are present, then the composite path is returned.

Returns
the pointer to AgentPath if a proper path found or NULL

Definition at line 816 of file agent_route.cc.

Here is the call graph for this function:

AgentPath * AgentRoute::FindLocalPath ( ) const

Definition at line 727 of file agent_route.cc.

Here is the call graph for this function:

AgentPath * AgentRoute::FindLocalVmPortPath ( ) const

Definition at line 742 of file agent_route.cc.

Here is the call graph for this function:

AgentPath * AgentRoute::FindPath ( const Peer peer) const
virtual

Definition at line 864 of file agent_route.cc.

Here is the call graph for this function:

AgentPath * AgentRoute::FindPathUsingKeyData ( const AgentRouteKey key,
const AgentRouteData data 
) const
virtual

Reimplemented in InetUnicastRouteEntry, and BridgeRouteEntry.

Definition at line 859 of file agent_route.cc.

Here is the call graph for this function:

uint32_t AgentRoute::GetActiveLabel ( ) const
virtual

Reimplemented in EvpnRouteEntry, and BridgeRouteEntry.

Definition at line 890 of file agent_route.cc.

Here is the call graph for this function:

const NextHop * AgentRoute::GetActiveNextHop ( ) const

Definition at line 881 of file agent_route.cc.

Here is the call graph for this function:

const AgentPath * AgentRoute::GetActivePath ( ) const

Definition at line 876 of file agent_route.cc.

Here is the call graph for this function:

virtual const std::string AgentRoute::GetAddressString ( ) const
pure virtual
virtual KeyPtr AgentRoute::GetDBRequestKey ( ) const
pure virtual
const AgentRouteTable* AgentRoute::GetDependentRouteTable ( void  ) const
inlineprotected

Definition at line 336 of file agent_route.h.

AgentPath * AgentRoute::GetLocalVmPortPath ( ) const

Definition at line 844 of file agent_route.cc.

Here is the call graph for this function:

virtual Composite::Type AgentRoute::GetMulticastCompType ( )
inlineprotectedvirtual

Reimplemented in Inet4MulticastRouteEntry.

Definition at line 335 of file agent_route.h.

virtual const std::string AgentRoute::GetSourceAddressString ( ) const
pure virtual
virtual Agent::RouteTableType AgentRoute::GetTableType ( ) const
pure virtual
void AgentRoute::HandleDeviceMastershipUpdate ( AgentPath path,
bool  del 
)
protectedvirtual

Definition at line 1053 of file agent_route.cc.

Here is the call graph for this function:

void AgentRoute::HandleMulticastLabel ( const Agent agent,
AgentPath path,
const AgentPath local_peer_path,
const AgentPath local_vm_peer_path,
bool  del,
uint32_t *  evpn_label 
)
protectedvirtual

Definition at line 1061 of file agent_route.cc.

Here is the call graph for this function:

bool AgentRoute::HasUnresolvedPath ( void  )

Definition at line 943 of file agent_route.cc.

Here is the call graph for this function:

void AgentRoute::InsertPath ( const AgentPath path)
protected

Definition at line 600 of file agent_route.cc.

Here is the call graph for this function:

const std::string& AgentRoute::intf_route_type ( ) const
inline

Definition at line 277 of file agent_route.h.

bool AgentRoute::is_multicast ( ) const
inline

Definition at line 274 of file agent_route.h.

bool AgentRoute::IsDependantRouteEmpty ( )
inline

Definition at line 303 of file agent_route.h.

bool AgentRoute::IsLess ( const DBEntry rhs) const
virtual

Implements DBEntry.

Definition at line 1035 of file agent_route.cc.

Here is the call graph for this function:

bool AgentRoute::IsRPFInvalid ( ) const

Definition at line 1044 of file agent_route.cc.

Here is the call graph for this function:

bool AgentRoute::IsTunnelNHListEmpty ( )
inline

Definition at line 304 of file agent_route.h.

virtual uint8_t AgentRoute::prefix_length ( ) const
inlinevirtual

Returns the length of a stored prefix address.

Reimplemented in EvpnRouteEntry, BridgeRouteEntry, and InetUnicastRouteEntry.

Definition at line 323 of file agent_route.h.

bool AgentRoute::ProcessPath ( Agent agent,
DBTablePartition part,
AgentPath path,
AgentRouteData data 
)
private

Definition at line 985 of file agent_route.cc.

Here is the call graph for this function:

bool AgentRoute::ReComputeMulticastPaths ( AgentPath path,
bool  del 
)
protectedvirtual

Definition at line 1160 of file agent_route.cc.

Here is the call graph for this function:

virtual bool AgentRoute::ReComputePathAdd ( AgentPath path)
inlinevirtual

Reimplemented in BridgeRouteEntry, InetUnicastRouteEntry, and Inet4MulticastRouteEntry.

Definition at line 257 of file agent_route.h.

virtual bool AgentRoute::ReComputePathDeletion ( AgentPath path)
inlinevirtual
virtual bool AgentRoute::RecomputeRoutePath ( Agent agent,
DBTablePartition part,
AgentPath path,
AgentRouteData data 
)
inlinevirtual

Definition at line 262 of file agent_route.h.

void AgentRoute::RemovePath ( AgentPath path)
protected

Definition at line 606 of file agent_route.cc.

Here is the call graph for this function:

void AgentRoute::RemoveUnresolvedRouteFromTable ( AgentRouteTable table)

Definition at line 364 of file agent_route.cc.

Here is the call graph for this function:

void AgentRoute::ResyncTunnelNextHop ( void  )

Definition at line 895 of file agent_route.cc.

Here is the call graph for this function:

void AgentRoute::set_intf_route_type ( const std::string &  intf_route_type)
inline

Definition at line 278 of file agent_route.h.

Here is the call graph for this function:

virtual void AgentRoute::SetKey ( const DBRequestKey key)
pure virtual
void AgentRoute::SetVrf ( VrfEntry vrf)
inlineprotected

Definition at line 325 of file agent_route.h.

Here is the call graph for this function:

bool AgentRoute::SubOpAddChangeInput ( VrfEntry vrf,
AgentRouteTable table,
AgentPath **  path_ptr,
AgentRouteKey key,
AgentRouteData data,
bool  route_added 
)

Definition at line 501 of file agent_route.cc.

Here is the call graph for this function:

bool AgentRoute::SubOpResyncInput ( VrfEntry vrf,
AgentRouteTable table,
AgentPath **  path_ptr,
AgentRouteKey key,
AgentRouteData data 
)

Definition at line 468 of file agent_route.cc.

Here is the call graph for this function:

bool AgentRoute::Sync ( void  )

Definition at line 957 of file agent_route.cc.

Here is the call graph for this function:

string AgentRoute::ToString ( ) const
pure virtual

Implements DBEntryBase.

Implemented in EvpnRouteEntry, BridgeRouteEntry, InetUnicastRouteEntry, and Inet4MulticastRouteEntry.

Definition at line 1031 of file agent_route.cc.

void AgentRoute::UpdateDependantRoutes ( void  )

Definition at line 935 of file agent_route.cc.

Here is the call graph for this function:

virtual void AgentRoute::UpdateDerivedRoutes ( AgentRouteTable table,
const AgentPath path,
bool  active_path_changed 
)
inlinevirtual

Reimplemented in EvpnRouteEntry.

Definition at line 267 of file agent_route.h.

virtual bool AgentRoute::ValidateMcastSrc ( ) const
inlineprotectedvirtual

Reimplemented in BridgeRouteEntry.

Definition at line 339 of file agent_route.h.

VrfEntry* AgentRoute::vrf ( ) const
inline

Definition at line 275 of file agent_route.h.

uint32_t AgentRoute::vrf_id ( ) const

Definition at line 1040 of file agent_route.cc.

Here is the call graph for this function:

bool AgentRoute::WaitForTraffic ( ) const

Definition at line 971 of file agent_route.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class AgentRouteTable
friend

Definition at line 342 of file agent_route.h.

friend class EcmpData
friend

Definition at line 344 of file agent_route.h.

Member Data Documentation

AgentRouteTable* AgentRoute::dependent_route_table_
private

Definition at line 354 of file agent_route.h.

std::string AgentRoute::intf_route_type_
private

Definition at line 353 of file agent_route.h.

bool AgentRoute::is_multicast_
private

Definition at line 352 of file agent_route.h.

VrfEntry* AgentRoute::vrf_
private

Definition at line 349 of file agent_route.h.


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