diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2018-03-07 19:53:51 +0100 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-03-14 09:09:01 +0000 |
commit | 04def7418b649a94e32149ee924a3743358b5c84 (patch) | |
tree | c4773eefcf199477bc3628cdd6d05f7cec22f403 /src/vpp-api/vom/acl_ethertype_cmds.hpp | |
parent | afb193019192a296e96c1008fdb788f70f5150d6 (diff) |
VOM: acl: Add support for acl ethertype unbind and dump
Change-Id: I667b9ccabe54c8f9cff5b1a2e63864965f5064f5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/acl_ethertype_cmds.hpp')
-rw-r--r-- | src/vpp-api/vom/acl_ethertype_cmds.hpp | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/vpp-api/vom/acl_ethertype_cmds.hpp b/src/vpp-api/vom/acl_ethertype_cmds.hpp index a0af50e8297..f72a3fb97b5 100644 --- a/src/vpp-api/vom/acl_ethertype_cmds.hpp +++ b/src/vpp-api/vom/acl_ethertype_cmds.hpp @@ -65,6 +65,73 @@ private: */ const acl_ethertype::ethertype_rules_t& m_le; }; + +/** + * A command class that unbinds the ethertype list to the interface + */ +class unbind_cmd : public rpc_cmd<HW::item<bool>, + rc_t, + vapi::Acl_interface_set_etype_whitelist> +{ +public: + /** + * Constructor + */ + unbind_cmd(HW::item<bool>& item, const handle_t& itf); + + /** + * Issue the command to VPP/HW + */ + rc_t issue(connection& con); + /** + * convert to string format for debug purposes + */ + std::string to_string() const; + + /** + * Comparison operator - only used for UT + */ + bool operator==(const unbind_cmd& i) const; + +private: + /** + * Reference to the HW::item of the interface to bind + */ + const handle_t m_itf; +}; + +/** + * A cmd class that Dumps all the acl ethertypes on given interface + */ +class dump_cmd : public VOM::dump_cmd<vapi::Acl_interface_etype_whitelist_dump> +{ +public: + /** + * Constructor + */ + dump_cmd(const handle_t& itf); + dump_cmd(const dump_cmd& d); + + /** + * Issue the command to VPP/HW + */ + rc_t issue(connection& con); + /** + * convert to string format for debug purposes + */ + std::string to_string() const; + + /** + * Comparison operator - only used for UT + */ + bool operator==(const dump_cmd& i) const; + +private: + /** + * The interface to get the addresses for + */ + const handle_t m_itf; +}; }; }; }; |