GBP: add allowed ethertypes to contracts
[vpp.git] / extras / vom / vom / gbp_contract.hpp
index 53f8f36..e517a3d 100644 (file)
@@ -41,12 +41,19 @@ public:
    */
   typedef std::pair<epg_id_t, epg_id_t> key_t;
 
+  /**
+   * A set of allowed ethertypes
+   */
+  typedef std::set<ethertype_t> ethertype_set_t;
+
   /**
    * Construct a GBP contract
    */
   gbp_contract(epg_id_t src_epg_id,
                epg_id_t dst_epg_id,
-               const ACL::l3_list& acl);
+               const ACL::l3_list& acl,
+               const gbp_rules_t& gpb_rules,
+               const ethertype_set_t& allowed_ethertypes);
 
   /**
    * Copy Construct
@@ -93,11 +100,6 @@ public:
    */
   std::string to_string() const;
 
-  /**
-   * Set gbp_rules in case of Redirect Contract
-   */
-  void set_gbp_rules(const gbp_rules_t& gbp_rules);
-
 private:
   /**
    * Class definition for listeners to OM events
@@ -184,6 +186,11 @@ private:
    */
   gbp_rules_t m_gbp_rules;
 
+  /**
+   * the set of Ether-types allowed by this contract
+   */
+  ethertype_set_t m_allowed_ethertypes;
+
   /**
    * A map of all bridge_domains
    */