Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NAT44: fix ICMP checksum update crash (VPP-1205)
[vpp.git]
/
src
/
vpp-api
/
vom
/
bridge_domain.hpp
diff --git
a/src/vpp-api/vom/bridge_domain.hpp
b/src/vpp-api/vom/bridge_domain.hpp
index
2c134f0
..
c7f84e9
100644
(file)
--- a/
src/vpp-api/vom/bridge_domain.hpp
+++ b/
src/vpp-api/vom/bridge_domain.hpp
@@
-31,6
+31,11
@@
namespace VOM {
class bridge_domain : public object_base
{
public:
class bridge_domain : public object_base
{
public:
+ /**
+ * Key Type for Bridge Domains in the sigular DB
+ */
+ typedef uint32_t key_t;
+
/**
* Bridge Domain Learning mode
*/
/**
* Bridge Domain Learning mode
*/
@@
-67,6
+72,21
@@
public:
*/
~bridge_domain();
*/
~bridge_domain();
+ /**
+ * Comparison operator - for UT
+ */
+ bool operator==(const bridge_domain& b) const;
+
+ /**
+ * Return the bridge domain's VPP ID
+ */
+ uint32_t id() const;
+
+ /**
+ * Return the bridge domain's key
+ */
+ const key_t& key() const;
+
/**
* Return the matchin 'singular' instance of the bridge-domain
*/
/**
* Return the matchin 'singular' instance of the bridge-domain
*/
@@
-77,15
+97,10
@@
public:
*/
std::string to_string(void) const;
*/
std::string to_string(void) const;
- /**
- * Return VPP's handle for this obejct
- */
- uint32_t id() const;
-
/**
* Static function to find the bridge_domain in the model
*/
/**
* Static function to find the bridge_domain in the model
*/
- static std::shared_ptr<bridge_domain> find(
uint32_t id
);
+ static std::shared_ptr<bridge_domain> find(
const key_t& key
);
/**
* Dump all bridge-doamin into the stream provided
/**
* Dump all bridge-doamin into the stream provided
@@
-146,7
+161,7
@@
private:
/**
* It's the singular_db class that calls replay()
*/
/**
* It's the singular_db class that calls replay()
*/
- friend class singular_db<
uint32
_t, bridge_domain>;
+ friend class singular_db<
key
_t, bridge_domain>;
/**
* Sweep/reap the object if still stale
/**
* Sweep/reap the object if still stale
@@
-171,7
+186,7
@@
private:
/**
* A map of all interfaces key against the interface's name
*/
/**
* A map of all interfaces key against the interface's name
*/
- static singular_db<
uint32
_t, bridge_domain> m_db;
+ static singular_db<
key
_t, bridge_domain> m_db;
};
};
};
};