1 #ifndef __VOM_NAT_BINDING_CMDS_H__
2 #define __VOM_NAT_BINDING_CMDS_H__
4 #include "vom/nat_binding.hpp"
5 #include "vom/rpc_cmd.hpp"
6 #include "vom/dump_cmd.hpp"
8 #include <vapi/nat.api.vapi.hpp>
11 namespace nat_binding_cmds {
13 * A functor class that binds L2 configuration to an interface
15 class bind_44_input_cmd
16 : public rpc_cmd<HW::item<bool>,
18 vapi::Nat44_interface_add_del_feature>
24 bind_44_input_cmd(HW::item<bool>& item,
26 const nat_binding::zone_t& zone);
29 * Issue the command to VPP/HW
31 rc_t issue(connection& con);
33 * convert to string format for debug purposes
35 std::string to_string() const;
38 * Comparison operator - only used for UT
40 bool operator==(const bind_44_input_cmd& i) const;
44 * The interface to bind
49 * The zone the interface is in
51 const nat_binding::zone_t m_zone;
55 * A cmd class that Unbinds L2 configuration from an interface
57 class unbind_44_input_cmd
58 : public rpc_cmd<HW::item<bool>,
60 vapi::Nat44_interface_add_del_feature>
66 unbind_44_input_cmd(HW::item<bool>& item,
68 const nat_binding::zone_t& zone);
71 * Issue the command to VPP/HW
73 rc_t issue(connection& con);
75 * convert to string format for debug purposes
77 std::string to_string() const;
80 * Comparison operator - only used for UT
82 bool operator==(const unbind_44_input_cmd& i) const;
86 * The interface to bind
91 * The zone the interface is in
93 const nat_binding::zone_t m_zone;
97 * A cmd class that Dumps all the nat_statics
99 class dump_44_cmd : public dump_cmd<vapi::Nat44_interface_dump>
106 dump_44_cmd(const dump_44_cmd& d);
109 * Issue the command to VPP/HW
111 rc_t issue(connection& con);
113 * convert to string format for debug purposes
115 std::string to_string() const;
118 * Comparison operator - only used for UT
120 bool operator==(const dump_44_cmd& i) const;