aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/route_domain.hpp
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-11-14 08:40:43 -0800
committerNeale Ranns <nranns@cisco.com>2017-11-14 19:25:54 +0000
commit10e7a9f8d8c8572be16f9b3f0395da6f8eff22ec (patch)
tree76cad881f5bd9a2c1c3ec664a880c3d0ba299961 /src/vpp-api/vom/route_domain.hpp
parenta161a6dedb1aa3aba00109d325d2909051a3c987 (diff)
VOM: bridge-domain learning mode and route help commands
Change-Id: I2fa219d6530f1e7a3b8ae32d35a0c60ba57c5129 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/route_domain.hpp')
-rw-r--r--src/vpp-api/vom/route_domain.hpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/vpp-api/vom/route_domain.hpp b/src/vpp-api/vom/route_domain.hpp
index 0639fb95925..516271f7f66 100644
--- a/src/vpp-api/vom/route_domain.hpp
+++ b/src/vpp-api/vom/route_domain.hpp
@@ -16,6 +16,7 @@
#ifndef __VOM_ROUTE_DOMAIN_H__
#define __VOM_ROUTE_DOMAIN_H__
+#include "vom/inspect.hpp"
#include "vom/object_base.hpp"
#include "vom/om.hpp"
#include "vom/prefix.hpp"
@@ -94,6 +95,41 @@ public:
private:
/**
+ * Class definition for listeners to OM events
+ */
+ class event_handler : public OM::listener, public inspect::command_handler
+ {
+ public:
+ event_handler();
+ virtual ~event_handler() = default;
+
+ /**
+ * Handle a populate event
+ */
+ void handle_populate(const client_db::key_t& key);
+
+ /**
+ * Handle a replay event
+ */
+ void handle_replay();
+
+ /**
+ * Show the object in the Singular DB
+ */
+ void show(std::ostream& os);
+
+ /**
+ * Get the sortable Id of the listener
+ */
+ dependency_t order() const;
+ };
+
+ /**
+ * Instance of the event handler to register with OM
+ */
+ static event_handler m_evh;
+
+ /**
* Commit the acculmulated changes into VPP. i.e. to a 'HW" write.
*/
void update(const route_domain& obj);