24 uint32_t val_lifetime,
25 uint32_t pref_lifetime)
27 , m_use_default(use_default)
28 , m_no_advertise(no_advertise)
32 , m_val_lifetime(val_lifetime)
33 , m_pref_lifetime(pref_lifetime)
42 m_pfx.
to_vpp(&is_ipv6, ra_prefix.address, &ra_prefix.address_length);
44 ra_prefix.use_default = m_use_default;
45 ra_prefix.no_advertise = m_no_advertise;
46 ra_prefix.off_link = m_off_link;
47 ra_prefix.no_autoconfig = m_no_autoconfig;
48 ra_prefix.no_onlink = m_no_onlink;
49 ra_prefix.val_lifetime = m_val_lifetime;
50 ra_prefix.pref_lifetime = m_pref_lifetime;
56 return ((m_pfx == other.m_pfx) && (m_use_default == other.m_use_default) &&
57 (m_no_advertise == other.m_no_advertise) &&
58 (m_val_lifetime == other.m_val_lifetime) &&
59 (m_pref_lifetime == other.m_pref_lifetime));
67 s <<
"ra-pfx-config:[" 68 <<
" pfx:" << m_pfx.
to_string() <<
" use-default:" << m_use_default
69 <<
" no-advertise:" << m_no_advertise <<
" val-lifetime:" << m_val_lifetime
70 <<
" pref-lifetime:" << m_pref_lifetime <<
"]";
void to_vpp(vapi_payload_sw_interface_ip6nd_ra_prefix &ra_prefix) const
Convert the ra prefix configuration to Vpp Api.
bool operator==(const ra_prefix &ra_prefix) const
Comparison operator - only used for UT.
std::string to_string() const
convert to string format for debug purposes
void to_vpp(uint8_t *is_ip6, uint8_t *addr, uint8_t *len) const
Convert the prefix into VPP API parameters.
A representation of RA prefix configuration on given interface.
ra_prefix(const route::prefix_t &pfx, uint8_t use_default, uint8_t no_advertise, uint32_t val_lifetime, uint32_t pref_lifetime)
Construct a new object matching the desried state.
The VPP Object Model (VOM) library.
std::string to_string() const
convert to string format for debug purposes
const route::prefix_t & prefix() const
Return the prefix associated with this ra prefix.