summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/nat_binding_cmds.hpp
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-04-04 09:34:50 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2018-04-13 08:51:21 +0000
commit25b049484fcf9161edb2c19250066b893c38c264 (patch)
tree69204352a0648cfc4089fa0e37214bffbae61e81 /src/vpp-api/vom/nat_binding_cmds.hpp
parent4f8863b21405d1ab3e067e978a60be72a343358b (diff)
GBP V2
update the GBP plugin to implement the full NAT feature set of opflex agent Change-Id: Ic06a039c889445ed0b9087fa1f292634192b0f8d Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/nat_binding_cmds.hpp')
-rw-r--r--src/vpp-api/vom/nat_binding_cmds.hpp232
1 files changed, 232 insertions, 0 deletions
diff --git a/src/vpp-api/vom/nat_binding_cmds.hpp b/src/vpp-api/vom/nat_binding_cmds.hpp
index bb9404872eb..1b51192a73c 100644
--- a/src/vpp-api/vom/nat_binding_cmds.hpp
+++ b/src/vpp-api/vom/nat_binding_cmds.hpp
@@ -255,6 +255,238 @@ private:
HW::item<bool> item;
};
+/////
+/**
+* A functor class that binds a NAT configuration to an input interface
+*/
+class bind_66_input_cmd
+ : public rpc_cmd<HW::item<bool>, rc_t, vapi::Nat66_add_del_interface>
+{
+public:
+ /**
+ * Constructor
+ */
+ bind_66_input_cmd(HW::item<bool>& item,
+ const handle_t& itf,
+ const nat_binding::zone_t& zone);
+
+ /**
+ * 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 bind_66_input_cmd& i) const;
+
+private:
+ /**
+ * The interface to bind
+ */
+ const handle_t m_itf;
+
+ /**
+ * The zone the interface is in
+ */
+ const nat_binding::zone_t m_zone;
+};
+
+/**
+ * A cmd class that unbinds a NAT configuration from an input interface
+ */
+class unbind_66_input_cmd
+ : public rpc_cmd<HW::item<bool>, rc_t, vapi::Nat66_add_del_interface>
+{
+public:
+ /**
+ * Constructor
+ */
+ unbind_66_input_cmd(HW::item<bool>& item,
+ const handle_t& itf,
+ const nat_binding::zone_t& zone);
+
+ /**
+ * 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_66_input_cmd& i) const;
+
+private:
+ /**
+ * The interface to bind
+ */
+ const handle_t m_itf;
+
+ /**
+ * The zone the interface is in
+ */
+ const nat_binding::zone_t m_zone;
+};
+
+/**
+ * A functor class that binds a NAT configuration to an output interface
+ */
+/* class bind_66_output_cmd */
+/* : public rpc_cmd<HW::item<bool>, */
+/* rc_t, */
+/* vapi::Nat66_interface_add_del_output_feature> */
+/* { */
+/* public: */
+/* /\** */
+/* * Constructor */
+/* *\/ */
+/* bind_66_output_cmd(HW::item<bool>& item, */
+/* const handle_t& itf, */
+/* const nat_binding::zone_t& zone); */
+
+/* /\** */
+/* * 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 bind_66_output_cmd& i) const; */
+
+/* private: */
+/* /\** */
+/* * The interface to bind */
+/* *\/ */
+/* const handle_t m_itf; */
+
+/* /\** */
+/* * The zone the interface is in */
+/* *\/ */
+/* const nat_binding::zone_t m_zone; */
+/* }; */
+
+/* /\** */
+/* * A cmd class that unbinds a NAT configuration from an output interface */
+/* *\/ */
+/* class unbind_66_output_cmd */
+/* : public rpc_cmd<HW::item<bool>, */
+/* rc_t, */
+/* vapi::Nat66_interface_add_del_output_feature> */
+/* { */
+/* public: */
+/* /\** */
+/* * Constructor */
+/* *\/ */
+/* unbind_66_output_cmd(HW::item<bool>& item, */
+/* const handle_t& itf, */
+/* const nat_binding::zone_t& zone); */
+
+/* /\** */
+/* * 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_66_output_cmd& i) const; */
+
+/* private: */
+/* /\** */
+/* * The interface to bind */
+/* *\/ */
+/* const handle_t m_itf; */
+
+/* /\** */
+/* * The zone the interface is in */
+/* *\/ */
+/* const nat_binding::zone_t m_zone; */
+/* }; */
+
+/**
+ * A cmd class that Dumps all the nat_statics
+ */
+class dump_input_66_cmd : public dump_cmd<vapi::Nat66_interface_dump>
+{
+public:
+ /**
+ * Constructor
+ */
+ dump_input_66_cmd();
+ dump_input_66_cmd(const dump_input_66_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_input_66_cmd& i) const;
+
+private:
+ /**
+ * HW reutrn code
+ */
+ HW::item<bool> item;
+};
+
+/**
+ * A cmd class that Dumps all the nat_statics
+ */
+/* class dump_output_66_cmd */
+/* : public dump_cmd<vapi::Nat66_interface_output_feature_dump> */
+/* { */
+/* public: */
+/* /\** */
+/* * Constructor */
+/* *\/ */
+/* dump_output_66_cmd(); */
+/* dump_output_66_cmd(const dump_output_66_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_output_66_cmd& i) const; */
+
+/* private: */
+/* /\** */
+/* * HW reutrn code */
+/* *\/ */
+/* HW::item<bool> item; */
+/* }; */
+
}; // namespace nat_binding_cmds
}; // namespace VOM