summaryrefslogtreecommitdiffstats
path: root/extras/vom/vom/neighbour.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'extras/vom/vom/neighbour.hpp')
-rw-r--r--extras/vom/vom/neighbour.hpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/extras/vom/vom/neighbour.hpp b/extras/vom/vom/neighbour.hpp
index 500f03d0a61..4e074bf7f45 100644
--- a/extras/vom/vom/neighbour.hpp
+++ b/extras/vom/vom/neighbour.hpp
@@ -27,6 +27,30 @@ namespace VOM {
class neighbour : public object_base
{
public:
+ struct flags_t : public enum_base<flags_t>
+ {
+ /**
+ * Constructor
+ */
+ flags_t(int v, const std::string s);
+
+ /**
+ * Destructor
+ */
+ ~flags_t() = default;
+
+ flags_t operator|(const flags_t& e1) const
+ {
+ flags_t e = *this;
+ e |= e1;
+ return e;
+ }
+
+ const static flags_t NONE;
+ const static flags_t STATIC;
+ const static flags_t NO_FIB_ENTRY;
+ };
+
/**
* The key for a neighbour entry;
* the interface and IP address
@@ -38,7 +62,8 @@ public:
*/
neighbour(const interface& itf,
const boost::asio::ip::address& ip_addr,
- const mac_address_t& mac);
+ const mac_address_t& mac,
+ const flags_t flags = flags_t::STATIC);
/**
* Copy Construct
@@ -174,6 +199,11 @@ private:
mac_address_t m_mac;
/**
+ * flags on the entry
+ */
+ flags_t m_flags;
+
+ /**
* A map of all bridge_domains
*/
static singular_db<key_t, neighbour> m_db;