|
OpenSDN source code
|
Base class for all Route entries in agent. More...
#include <agent_route.h>


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 AgentPath * | FindPathUsingKeyData (const AgentRouteKey *key, const AgentRouteData *data) const |
| virtual AgentPath * | FindPath (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 |
| VrfEntry * | vrf () const |
| uint32_t | vrf_id () const |
| const std::string & | intf_route_type () const |
| void | set_intf_route_type (const std::string &intf_route_type) |
| const std::string & | origin_vn_name () const |
| void | set_origin_vn_name (const VnListType &dest_vn_list) |
| AgentPath * | FindLocalPath () const |
| AgentPath * | FindLocalVmPortPath () const |
| const AgentPath * | 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. More... | |
| AgentPath * | GetLocalVmPortPath () const |
| const AgentPath * | GetActivePath () const |
| const NextHop * | GetActiveNextHop () 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 Path * | front () const |
| void | insert (const Path *path) |
| void | remove (const Path *path) |
| void | Sort (Compare compare, const Path *prev_front) |
| const PathList & | GetPathList () const |
| PathList & | GetPathList () |
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) |
| DBState * | GetState (DBTableBase *tbl_base, ListenerId listener) const |
| const DBState * | GetState (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 |
| DBTablePartBase * | get_table_partition () const |
| void | set_table_partition (DBTablePartBase *tpart) |
| DBTableBase * | get_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 AgentRouteTable * | GetDependentRouteTable (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 | |
| VrfEntry * | vrf_ |
| bool | is_multicast_ |
| std::string | intf_route_type_ |
| std::string | origin_vn_name_ |
| AgentRouteTable * | dependent_route_table_ |
Friends | |
| class | AgentRouteTable |
| class | EcmpData |
Additional Inherited Members | |
Public Attributes inherited from DBEntryBase | |
| boost::intrusive::list_member_hook | chg_list_ |
Base class for all Route entries in agent.
Definition at line 224 of file agent_route.h.
Definition at line 235 of file agent_route.h.
Definition at line 236 of file agent_route.h.
| enum AgentRoute::Trace |
| Enumerator | |
|---|---|
| ADD | |
| DEL | |
| ADD_PATH | |
| DELETE_PATH | |
| CHANGE_PATH | |
| STALE_PATH | |
Definition at line 226 of file agent_route.h.
|
inline |
Definition at line 238 of file agent_route.h.
|
inlinevirtual |
Definition at line 242 of file agent_route.h.
| void AgentRoute::AddUnresolvedRouteToTable | ( | AgentRouteTable * | table | ) |
|
pure virtual |
Implements Route.
Implemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
|
pure virtual |
Implemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
| bool AgentRoute::DeleteAllBgpPath | ( | DBTablePartBase * | part, |
| 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 | ||
| ) |
| void AgentRoute::DeletePathFromPeer | ( | DBTablePartBase * | part, |
| AgentRouteTable * | table, | ||
| AgentPath * | path | ||
| ) |
|
private |
|
private |
| const string & AgentRoute::dest_vn_name | ( | ) | const |
|
private |
| void AgentRoute::EnqueueRouteResync | ( | void | ) | const |
| 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.
Definition at line 817 of file agent_route.cc.

| AgentPath * AgentRoute::FindLocalPath | ( | ) | const |
| AgentPath * AgentRoute::FindLocalVmPortPath | ( | ) | const |
|
virtual |
Reimplemented in InetUnicastRouteEntry, and BridgeRouteEntry.
Definition at line 860 of file agent_route.cc.

|
virtual |
Reimplemented in EvpnRouteEntry, and BridgeRouteEntry.
Definition at line 891 of file agent_route.cc.

| const NextHop * AgentRoute::GetActiveNextHop | ( | ) | const |
| const AgentPath * AgentRoute::GetActivePath | ( | ) | const |
|
pure virtual |
Implemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
|
pure virtual |
Implements DBEntryBase.
Implemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
|
inlineprotected |
Definition at line 349 of file agent_route.h.
| AgentPath * AgentRoute::GetLocalVmPortPath | ( | ) | const |
|
inlineprotectedvirtual |
Reimplemented in Inet4MulticastRouteEntry.
Definition at line 348 of file agent_route.h.
|
pure virtual |
Implemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
|
pure virtual |
Implemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
|
protectedvirtual |
| bool AgentRoute::HasUnresolvedPath | ( | void | ) |
|
protected |
|
inline |
Definition at line 277 of file agent_route.h.
|
inline |
Definition at line 274 of file agent_route.h.
|
inline |
Definition at line 316 of file agent_route.h.
|
virtual |
Implements DBEntry.
Definition at line 1036 of file agent_route.cc.

| bool AgentRoute::IsRPFInvalid | ( | ) | const |
|
inline |
Definition at line 317 of file agent_route.h.
|
inline |
Definition at line 281 of file agent_route.h.
|
inlinevirtual |
Returns the length of a stored prefix address.
Reimplemented in InetUnicastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
Definition at line 336 of file agent_route.h.
|
private |
|
protectedvirtual |
|
inlinevirtual |
Reimplemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, and BridgeRouteEntry.
Definition at line 257 of file agent_route.h.
|
inlinevirtual |
Reimplemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
Definition at line 256 of file agent_route.h.
|
inlinevirtual |
Definition at line 262 of file agent_route.h.
|
protected |
| void AgentRoute::RemoveUnresolvedRouteFromTable | ( | AgentRouteTable * | table | ) |
| void AgentRoute::ResyncTunnelNextHop | ( | void | ) |
|
inline |
|
inline |
|
pure virtual |
Implements DBEntry.
Implemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
|
inlineprotected |
| bool AgentRoute::SubOpAddChangeInput | ( | VrfEntry * | vrf, |
| AgentRouteTable * | table, | ||
| AgentPath ** | path_ptr, | ||
| AgentRouteKey * | key, | ||
| AgentRouteData * | data, | ||
| bool | route_added | ||
| ) |
| bool AgentRoute::SubOpResyncInput | ( | VrfEntry * | vrf, |
| AgentRouteTable * | table, | ||
| AgentPath ** | path_ptr, | ||
| AgentRouteKey * | key, | ||
| AgentRouteData * | data | ||
| ) |
| bool AgentRoute::Sync | ( | void | ) |
|
pure virtual |
Implements DBEntryBase.
Implemented in InetUnicastRouteEntry, Inet4MulticastRouteEntry, EvpnRouteEntry, and BridgeRouteEntry.
Definition at line 1032 of file agent_route.cc.
| void AgentRoute::UpdateDependantRoutes | ( | void | ) |
|
inlinevirtual |
Reimplemented in EvpnRouteEntry.
Definition at line 267 of file agent_route.h.
|
inlineprotectedvirtual |
Reimplemented in BridgeRouteEntry.
Definition at line 352 of file agent_route.h.
|
inline |
Definition at line 275 of file agent_route.h.
| uint32_t AgentRoute::vrf_id | ( | ) | const |
| bool AgentRoute::WaitForTraffic | ( | ) | const |
|
friend |
Definition at line 355 of file agent_route.h.
|
friend |
Definition at line 357 of file agent_route.h.
|
private |
Definition at line 368 of file agent_route.h.
|
private |
Definition at line 366 of file agent_route.h.
|
private |
Definition at line 365 of file agent_route.h.
|
private |
Definition at line 367 of file agent_route.h.
|
private |
Definition at line 362 of file agent_route.h.