vxlan: vxlan/vxlan.api API cleanup
[vpp.git] / extras / vom / vom / gbp_bridge_domain.hpp
index c86c53e..d397fe5 100644 (file)
@@ -17,9 +17,9 @@
 #define __VOM_GBP_BRIDGE_DOMAIN_H__
 
 #include "vom/bridge_domain.hpp"
+#include "vom/gbp_route_domain.hpp"
 #include "vom/interface.hpp"
 #include "vom/singular_db.hpp"
-#include "vom/types.hpp"
 
 namespace VOM {
 
@@ -30,23 +30,50 @@ class gbp_bridge_domain : public object_base
 {
 public:
   /**
-   * The key for a bridge_domain is the pari of EPG-IDs
+   * The key for a bridge_domain is the pair of EPG-IDs
    */
   typedef bridge_domain::key_t key_t;
 
+  struct flags_t : enum_base<flags_t>
+  {
+    const static flags_t NONE;
+    const static flags_t DO_NOT_LEARN;
+    const static flags_t UU_FWD_DROP;
+    const static flags_t MCAST_DROP;
+    const static flags_t UCAST_ARP;
+
+    static const flags_t& from_vpp(int i);
+
+  private:
+    flags_t(int v, const std::string& s);
+    flags_t();
+  };
+
   /**
    * Construct a GBP bridge_domain
    */
-  gbp_bridge_domain(const bridge_domain& bd, const interface& bvi);
   gbp_bridge_domain(const bridge_domain& bd,
+                    const gbp_route_domain& rd,
+                    const interface& bvi,
+                    const flags_t& flags = flags_t::NONE);
+  gbp_bridge_domain(const bridge_domain& bd,
+                    const gbp_route_domain& rd,
                     const interface& bvi,
-                    const interface& uu_fwd);
+                    const interface& uu_fwd,
+                    const interface& bm_flood,
+                    const flags_t& flags = flags_t::NONE);
   gbp_bridge_domain(const bridge_domain& bd,
+                    const gbp_route_domain& rd,
                     const std::shared_ptr<interface> bvi,
-                    const std::shared_ptr<interface> uu_fwd);
+                    const std::shared_ptr<interface> uu_fwd,
+                    const std::shared_ptr<interface> bm_flood,
+                    const flags_t& flags = flags_t::NONE);
   gbp_bridge_domain(const bridge_domain& bd,
+                    const gbp_route_domain& rd,
                     const interface& bvi,
-                    const std::shared_ptr<interface> uu_fwd);
+                    const std::shared_ptr<interface> uu_fwd,
+                    const std::shared_ptr<interface> bm_flood,
+                    const flags_t& flags = flags_t::NONE);
 
   /**
    * Copy Construct
@@ -98,8 +125,8 @@ public:
    */
   std::string to_string() const;
 
-  const std::shared_ptr<bridge_domain> get_bridge_domain();
-  const std::shared_ptr<interface> get_bvi();
+  const std::shared_ptr<bridge_domain> get_bridge_domain() const;
+  const std::shared_ptr<interface> get_bvi() const;
 
 private:
   /**
@@ -169,8 +196,11 @@ private:
   HW::item<uint32_t> m_id;
 
   std::shared_ptr<bridge_domain> m_bd;
+  std::shared_ptr<gbp_route_domain> m_rd;
   std::shared_ptr<interface> m_bvi;
   std::shared_ptr<interface> m_uu_fwd;
+  std::shared_ptr<interface> m_bm_flood;
+  flags_t m_flags;
 
   /**
    * A map of all bridge_domains