#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 {
{
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);
-
gbp_bridge_domain(const bridge_domain& bd,
+ const gbp_route_domain& rd,
const interface& bvi,
- const interface& uu_fwd);
+ 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& 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> 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> bm_flood,
+ const flags_t& flags = flags_t::NONE);
/**
* Copy Construct
*/
std::string to_string() const;
+ const std::shared_ptr<bridge_domain> get_bridge_domain() const;
+ const std::shared_ptr<interface> get_bvi() const;
+
private:
/**
* Class definition for listeners to OM events
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