GBP V2
[vpp.git] / src / vpp-api / vom / nat_static.hpp
index 1560968..2dcadb3 100644 (file)
@@ -39,7 +39,7 @@ public:
    * table
    */
   nat_static(const boost::asio::ip::address& inside,
-             const boost::asio::ip::address_v4& outside);
+             const boost::asio::ip::address& outside);
 
   /**
    * Construct an NAT Static binding with the outside address in
@@ -47,7 +47,7 @@ public:
    */
   nat_static(const route_domain& rd,
              const boost::asio::ip::address& inside,
-             const boost::asio::ip::address_v4& outside);
+             const boost::asio::ip::address& outside);
 
   /**
    * Copy Construct
@@ -59,6 +59,16 @@ public:
    */
   ~nat_static();
 
+  /**
+   * Comparison operator - for UT
+   */
+  bool operator==(const nat_static& n) const;
+
+  /**
+   * Return the object's key
+   */
+  const key_t key() const;
+
   /**
    * Return the matching 'singular instance'
    */
@@ -67,7 +77,7 @@ public:
   /**
    * Find the instnace of the bridge_domain domain in the OM
    */
-  static std::shared_ptr<nat_static> find(const nat_static& temp);
+  static std::shared_ptr<nat_static> find(const key_t& key);
 
   /**
    * Dump all bridge_domain-doamin into the stream provided
@@ -158,12 +168,12 @@ private:
   /**
    * The 'inside' IP address, could be v4 or v6
    */
-  const boost::asio::ip::address& m_inside;
+  const boost::asio::ip::address m_inside;
 
   /**
-   * The 'outside' IP address - always v4
+   * The 'outside' IP address
    */
-  const boost::asio::ip::address_v4& m_outside;
+  const boost::asio::ip::address m_outside;
 
   /**
    * A map of all NAT statics