X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Fgbp_contract.hpp;h=7775638bb9fac124cef74b9139d4ca482962c2f5;hb=4ba67723d;hp=53f8f3659ecac7c30d584d6a9f302fc20e77309f;hpb=33b81da54acf1236cddf0716005c340f3402ff6d;p=vpp.git diff --git a/extras/vom/vom/gbp_contract.hpp b/extras/vom/vom/gbp_contract.hpp index 53f8f3659ec..7775638bb9f 100644 --- a/extras/vom/vom/gbp_contract.hpp +++ b/extras/vom/vom/gbp_contract.hpp @@ -16,7 +16,7 @@ #ifndef __VOM_GBP_CONTRACT_H__ #define __VOM_GBP_CONTRACT_H__ -#include "vom/acl_list.hpp" +#include "vom/acl_l3_list.hpp" #include "vom/gbp_endpoint.hpp" #include "vom/gbp_rule.hpp" #include "vom/interface.hpp" @@ -39,14 +39,21 @@ public: /** * The key for a contract is the pari of EPG-IDs */ - typedef std::pair key_t; + typedef std::pair key_t; + + /** + * A set of allowed ethertypes + */ + typedef std::set 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); + gbp_contract(sclass_t sclass, + sclass_t dclass, + 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 @@ -167,12 +169,12 @@ private: /** * The source EPG ID */ - epg_id_t m_src_epg_id; + sclass_t m_sclass; /** * The destination EPG ID */ - epg_id_t m_dst_epg_id; + sclass_t m_dclass; /** * The ACL applied to traffic between the gourps @@ -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 */