|
OpenSDN source code
|
#include <physical_device.h>


Public Types | |
| typedef std::set< boost::uuids::uuid > | PhysicalDeviceSet |
| typedef std::map< const std::string, PhysicalDeviceSet > | VrfDevicesMap |
| typedef std::pair< const std::string, PhysicalDeviceSet > | VrfDevicesPair |
| typedef std::set< std::string > | VrfSet |
| typedef std::map< const boost::uuids::uuid, VrfSet > | DeviceVrfMap |
| typedef std::pair< const boost::uuids::uuid, VrfSet > | DeviceVrfPair |
| typedef std::map< IpAddress, PhysicalDevice * > | IpToDeviceMap |
| typedef std::pair< IpAddress, PhysicalDevice * > | IpToDevicePair |
Public Types inherited from DBTable | |
| typedef boost::intrusive_ptr< DBTableWalk > | DBTableWalkRef |
| typedef boost::function< bool(DBTablePartBase *, DBEntryBase *)> | WalkFn |
| typedef boost::function< void(DBTableWalkRef, DBTableBase *)> | WalkCompleteFn |
Public Types inherited from DBTableBase | |
| typedef boost::function< void(DBTablePartBase *, DBEntryBase *)> | ChangeCallback |
| typedef int | ListenerId |
Public Member Functions | |
| PhysicalDeviceTable (DB *db, const std::string &name) | |
| virtual | ~PhysicalDeviceTable () |
| virtual std::unique_ptr< DBEntry > | AllocEntry (const DBRequestKey *k) const |
| virtual size_t | Hash (const DBEntry *entry) const |
| virtual size_t | Hash (const DBRequestKey *key) const |
| virtual DBEntry * | OperDBAdd (const DBRequest *req) |
| virtual bool | OperDBOnChange (DBEntry *entry, const DBRequest *req) |
| virtual bool | OperDBDelete (DBEntry *entry, const DBRequest *req) |
| virtual bool | OperDBResync (DBEntry *entry, const DBRequest *req) |
| virtual bool | IFNodeToReq (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u) |
| bool | ProcessConfig (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u) |
| virtual bool | IFNodeToUuid (IFMapNode *node, boost::uuids::uuid &u) |
| virtual AgentSandeshPtr | GetAgentSandesh (const AgentSandeshArguments *args, const std::string &context) |
| PhysicalDevice * | Find (const boost::uuids::uuid &u) |
| void | RegisterDBClients (IFMapDependencyManager *dep) |
| void | UpdateIpToDevMap (IpAddress old, IpAddress new_ip, PhysicalDevice *p) |
| void | DeleteIpToDevEntry (IpAddress ip) |
| PhysicalDevice * | IpToPhysicalDevice (IpAddress ip) |
| const PhysicalDeviceSet & | managed_pd_set () const |
| void | EnqueueDeviceChange (const boost::uuids::uuid &u, bool master) |
| void | UpdateDeviceMastership (const std::string &vrf, ComponentNHList clist, bool del) |
Public Member Functions inherited from AgentOperDBTable | |
| AgentOperDBTable (DB *db, const std::string &name) | |
| AgentOperDBTable (DB *db, const std::string &name, bool del_on_zero_refcount) | |
| virtual | ~AgentOperDBTable () |
| virtual void | ConfigEventHandler (IFMapNode *node, DBEntry *entry) |
Public Member Functions inherited from AgentDBTable | |
| AgentDBTable (DB *db, const std::string &name) | |
| AgentDBTable (DB *db, const std::string &name, bool del_on_zero_refcount) | |
| virtual | ~AgentDBTable () |
| virtual int | PartitionCount () const |
| virtual void | Input (DBTablePartition *root, DBClient *client, DBRequest *req) |
| virtual DBEntry * | CfgAdd (DBRequest *req) |
| virtual void | Clear () |
| virtual bool | IFLinkToReq (IFMapLink *link, IFMapNode *node, const std::string &peer_name, IFMapNode *peer, DBRequest &req) |
| virtual DBTablePartition * | AllocPartition (int index) |
| virtual void | OnZeroRefcount (AgentDBEntry *e) |
| virtual void | NotifyEntry (DBEntryBase *entry) |
| void | Notify (DBTablePartBase *partition, DBEntryBase *entry) |
| DBTableBase::ListenerId | GetRefListenerId () const |
| AgentDBEntry * | FindActiveEntry (const DBEntry *key) |
| AgentDBEntry * | FindActiveEntryNoLock (const DBEntry *key) |
| AgentDBEntry * | FindActiveEntry (const DBRequestKey *key) |
| AgentDBEntry * | FindActiveEntryNoLock (const DBRequestKey *key) |
| AgentDBEntry * | Find (const DBEntry *key, bool ret_del) |
| AgentDBEntry * | Find (const DBRequestKey *key, bool ret_del) |
| virtual bool | CanNotify (IFMapNode *dbe) |
| virtual void | Process (DBRequest &req) |
| void | set_agent (Agent *agent) |
| Agent * | agent () const |
| void | Flush () |
| void | reset_flush_walk_ref () |
| SandeshTraceBufferPtr | GetOperDBTraceBuf () const |
Public Member Functions inherited from DBTable | |
| DBTable (DB *db, const std::string &name) | |
| virtual | ~DBTable () |
| void | Init () |
| void | NotifyAllEntries () |
| DBEntry * | Find (const DBEntry *entry) |
| const DBEntry * | Find (const DBEntry *entry) const |
| DBEntry * | Find (const DBRequestKey *key, int id=-1) |
| const DBEntry * | Find (const DBRequestKey *key, int id=-1) const |
| DBEntry * | FindNoLock (const DBEntry *entry) |
| DBEntry * | FindNoLock (const DBRequestKey *key) |
| virtual DBTablePartBase * | GetTablePartition (const DBRequestKey *key) |
| virtual const DBTablePartBase * | GetTablePartition (const DBRequestKey *key) const |
| virtual DBTablePartBase * | GetTablePartition (const DBEntryBase *entry) |
| virtual const DBTablePartBase * | GetTablePartition (const DBEntryBase *entry) const |
| virtual DBTablePartBase * | GetTablePartition (const int index) |
| virtual const DBTablePartBase * | GetTablePartition (const int index) const |
| virtual void | Change (DBEntryBase *entry) |
| virtual size_t | Size () const |
| DBTableWalkRef | AllocWalker (WalkFn walk_fn, WalkCompleteFn walk_complete) |
| void | ReleaseWalker (DBTableWalkRef &walk) |
| void | WalkTable (DBTableWalkRef walk) |
| void | WalkAgain (DBTableWalkRef walk) |
| void | SetWalkIterationToYield (int count) |
| int | GetWalkIterationToYield () |
| void | SetWalkTaskId (int task_id) |
| int | GetWalkerTaskId () |
Public Member Functions inherited from DBTableBase | |
| DBTableBase (DB *db, const std::string &name) | |
| virtual | ~DBTableBase () |
| bool | Enqueue (DBRequest *req) |
| void | EnqueueRemove (DBEntryBase *db_entry) |
| virtual void | AddRemoveCallback (const DBEntryBase *entry, bool add) const |
| ListenerId | Register (ChangeCallback callback, const std::string &name="unspecified") |
| void | Unregister (ListenerId listener) |
| void | RunNotify (DBTablePartBase *tpart, DBEntryBase *entry) |
| void | AddToDBStateCount (ListenerId listener, int count) |
| uint64_t | GetDBStateCount (ListenerId listener) |
| bool | empty () const |
| virtual void | RetryDelete () |
| virtual bool | MayDelete () const |
| DB * | database () |
| const DB * | database () const |
| const std::string & | name () const |
| bool | HasListeners () const |
| size_t | GetListenerCount () const |
| void | FillListeners (std::vector< ShowTableListener > *listeners) const |
| uint64_t | enqueue_count () const |
| void | incr_enqueue_count () |
| void | reset_enqueue_count () |
| uint64_t | input_count () const |
| void | incr_input_count () |
| void | reset_input_count () |
| uint64_t | notify_count () const |
| void | incr_notify_count () |
| void | reset_notify_count () |
| bool | HasWalkers () const |
| uint64_t | walker_count () const |
| void | incr_walker_count () |
| uint64_t | decr_walker_count () |
| uint64_t | walk_request_count () const |
| uint64_t | walk_complete_count () const |
| uint64_t | walk_cancel_count () const |
| uint64_t | walk_again_count () const |
| uint64_t | walk_count () const |
| void | incr_walk_request_count () |
| void | incr_walk_complete_count () |
| void | incr_walk_cancel_count () |
| void | incr_walk_again_count () |
| void | incr_walk_count () |
Static Public Member Functions | |
| static DBTableBase * | CreateTable (DB *db, const std::string &name) |
Static Public Member Functions inherited from DBTable | |
| static void | DBStateClear (DBTable *table, ListenerId id) |
Private Member Functions | |
| void | ResetDeviceMastership (const boost::uuids::uuid &u, const std::string &vrf) |
| void | AddDeviceToVrfEntry (const boost::uuids::uuid &u, const std::string &vrf) |
| bool | RemoveDeviceToVrfEntry (const boost::uuids::uuid &u, const std::string &vrf) |
| DISALLOW_COPY_AND_ASSIGN (PhysicalDeviceTable) | |
Private Attributes | |
| IpToDeviceMap | ip_tree_ |
| PhysicalDeviceSet | managed_pd_set_ |
| VrfDevicesMap | vrf2devices_map_ |
| DeviceVrfMap | device2vrf_map_ |
Additional Inherited Members | |
Static Public Attributes inherited from AgentDBTable | |
| static const int | kPartitionCount = 1 |
Static Public Attributes inherited from DBTable | |
| static const int | kIterationToYield = 256 |
Static Public Attributes inherited from DBTableBase | |
| static const int | kInvalidId = -1 |
Protected Member Functions inherited from AgentOperDBTable | |
| void | UpdateIfMapNode (AgentOperDBEntry *entry, IFMapNode *node) |
| virtual DBEntry * | Add (const DBRequest *req) |
| virtual bool | OnChange (DBEntry *entry, const DBRequest *req) |
| virtual bool | Resync (DBEntry *entry, const DBRequest *req) |
| virtual bool | Delete (DBEntry *entry, const DBRequest *req) |
Definition at line 110 of file physical_device.h.
| typedef std::map<const boost::uuids::uuid, VrfSet> PhysicalDeviceTable::DeviceVrfMap |
Definition at line 116 of file physical_device.h.
| typedef std::pair<const boost::uuids::uuid, VrfSet> PhysicalDeviceTable::DeviceVrfPair |
Definition at line 117 of file physical_device.h.
| typedef std::map<IpAddress, PhysicalDevice *> PhysicalDeviceTable::IpToDeviceMap |
Definition at line 118 of file physical_device.h.
| typedef std::pair<IpAddress, PhysicalDevice *> PhysicalDeviceTable::IpToDevicePair |
Definition at line 119 of file physical_device.h.
| typedef std::set<boost::uuids::uuid> PhysicalDeviceTable::PhysicalDeviceSet |
Definition at line 112 of file physical_device.h.
| typedef std::map<const std::string, PhysicalDeviceSet> PhysicalDeviceTable::VrfDevicesMap |
Definition at line 113 of file physical_device.h.
| typedef std::pair<const std::string, PhysicalDeviceSet> PhysicalDeviceTable::VrfDevicesPair |
Definition at line 114 of file physical_device.h.
| typedef std::set<std::string> PhysicalDeviceTable::VrfSet |
Definition at line 115 of file physical_device.h.
|
inline |
Definition at line 121 of file physical_device.h.
|
inlinevirtual |
Definition at line 124 of file physical_device.h.
|
private |
Definition at line 380 of file physical_device.cc.
|
virtual |
Implements DBTable.
Definition at line 127 of file physical_device.cc.
|
static |
| void PhysicalDeviceTable::DeleteIpToDevEntry | ( | IpAddress | ip | ) |
Definition at line 350 of file physical_device.cc.
|
private |
| void PhysicalDeviceTable::EnqueueDeviceChange | ( | const boost::uuids::uuid & | u, |
| bool | master | ||
| ) |
| PhysicalDevice * PhysicalDeviceTable::Find | ( | const boost::uuids::uuid & | u | ) |
|
virtual |
Reimplemented from AgentDBTable.
Definition at line 304 of file physical_device.cc.

|
inlinevirtual |
Reimplemented from DBTable.
Definition at line 127 of file physical_device.h.
|
inlinevirtual |
Reimplemented from DBTable.
Definition at line 128 of file physical_device.h.
|
virtual |
Reimplemented from AgentDBTable.
Definition at line 233 of file physical_device.cc.

|
virtual |
Reimplemented from AgentDBTable.
Definition at line 206 of file physical_device.cc.

| PhysicalDevice * PhysicalDeviceTable::IpToPhysicalDevice | ( | IpAddress | ip | ) |
Definition at line 359 of file physical_device.cc.
|
inline |
Definition at line 149 of file physical_device.h.
Implements AgentOperDBTable.
Definition at line 134 of file physical_device.cc.

Implements AgentOperDBTable.
Definition at line 166 of file physical_device.cc.

Implements AgentOperDBTable.
Definition at line 144 of file physical_device.cc.

Reimplemented from AgentOperDBTable.
Definition at line 154 of file physical_device.cc.

|
virtual |
Reimplemented from AgentDBTable.
Definition at line 214 of file physical_device.cc.

| void PhysicalDeviceTable::RegisterDBClients | ( | IFMapDependencyManager * | dep | ) |
Definition at line 187 of file physical_device.cc.
|
private |
Definition at line 400 of file physical_device.cc.
|
private |
| void PhysicalDeviceTable::UpdateDeviceMastership | ( | const std::string & | vrf, |
| ComponentNHList | clist, | ||
| bool | del | ||
| ) |
| void PhysicalDeviceTable::UpdateIpToDevMap | ( | IpAddress | old, |
| IpAddress | new_ip, | ||
| PhysicalDevice * | p | ||
| ) |
|
private |
Definition at line 164 of file physical_device.h.
|
private |
Definition at line 161 of file physical_device.h.
|
private |
Definition at line 162 of file physical_device.h.
|
private |
Definition at line 163 of file physical_device.h.