From 10e7a9f8d8c8572be16f9b3f0395da6f8eff22ec Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Tue, 14 Nov 2017 08:40:43 -0800 Subject: VOM: bridge-domain learning mode and route help commands Change-Id: I2fa219d6530f1e7a3b8ae32d35a0c60ba57c5129 Signed-off-by: Neale Ranns --- src/vpp-api/vom/route_domain.hpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/vpp-api/vom/route_domain.hpp') 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" @@ -93,6 +94,41 @@ public: void replay(void); 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. */ -- cgit 1.2.3-korg