gbp_endpoint_group::event_handler gbp_endpoint_group::m_evh;
+gbp_endpoint_group::retention_t::retention_t()
+ : remote_ep_timeout(0xffffffff)
+{
+}
+gbp_endpoint_group::retention_t::retention_t(uint32_t remote_ep_timeout_)
+ : remote_ep_timeout(remote_ep_timeout_)
+{
+}
+
+bool
+gbp_endpoint_group::retention_t::operator==(const retention_t& o) const
+{
+ return (remote_ep_timeout == o.remote_ep_timeout);
+}
+
+std::string
+gbp_endpoint_group::retention_t::to_string() const
+{
+ return std::to_string(remote_ep_timeout);
+}
+
gbp_endpoint_group::gbp_endpoint_group(epg_id_t epg_id,
const interface& itf,
const gbp_route_domain& rd,
, m_itf(itf.singular())
, m_rd(rd.singular())
, m_bd(bd.singular())
+ , m_retention()
{
}
, m_itf()
, m_rd(rd.singular())
, m_bd(bd.singular())
+ , m_retention()
{
}
, m_itf(itf.singular())
, m_rd(rd.singular())
, m_bd(bd.singular())
+ , m_retention()
{
}
, m_itf()
, m_rd(rd.singular())
, m_bd(bd.singular())
+ , m_retention()
{
}
, m_itf(epg.m_itf)
, m_rd(epg.m_rd)
, m_bd(epg.m_bd)
+ , m_retention(epg.m_retention)
{
}
return (m_epg_id);
}
+void
+gbp_endpoint_group::set(const retention_t& retention)
+{
+ m_retention = retention;
+}
+
bool
gbp_endpoint_group::operator==(const gbp_endpoint_group& gg) const
{
return (key() == gg.key() && (m_sclass == gg.m_sclass) &&
- (m_itf == gg.m_itf) && (m_rd == gg.m_rd) && (m_bd == gg.m_bd));
+ (m_retention == gg.m_retention) && (m_itf == gg.m_itf) &&
+ (m_rd == gg.m_rd) && (m_bd == gg.m_bd));
}
void
{
if (m_hw) {
HW::enqueue(new gbp_endpoint_group_cmds::create_cmd(
- m_hw, m_epg_id, m_sclass, m_bd->id(), m_rd->id(),
+ m_hw, m_epg_id, m_sclass, m_bd->id(), m_rd->id(), m_retention,
(m_itf ? m_itf->handle() : handle_t::INVALID)));
}
}
std::ostringstream s;
s << "gbp-endpoint-group:["
<< "epg:" << m_epg_id << ", sclass:" << m_sclass << ", "
+ << "retention:[" << m_retention.to_string() << "], "
<< (m_itf ? m_itf->to_string() : "NULL") << ", " << m_bd->to_string()
<< ", " << m_rd->to_string() << "]";
{
if (rc_t::OK != m_hw.rc()) {
HW::enqueue(new gbp_endpoint_group_cmds::create_cmd(
- m_hw, m_epg_id, m_sclass, m_bd->id(), m_rd->id(),
+ m_hw, m_epg_id, m_sclass, m_bd->id(), m_rd->id(), m_retention,
(m_itf ? m_itf->handle() : handle_t::INVALID)));
}
}