|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
38 <<
"ip:" << m_ip <<
" mac:" << m_mac.to_string() <<
" bd:" << m_bd_id
39 <<
" rd:" << m_rd_id <<
"]";
47 return (
nh.m_ip < m_ip);
53 return ((m_ip ==
nh.m_ip) && (m_mac ==
nh.m_mac) && (m_bd_id ==
nh.m_bd_id) &&
54 (m_rd_id ==
nh.m_rd_id));
85 gbp_rule::hash_mode_t::hash_mode_t(
int v,
const std::string s)
117 std::ostringstream s;
119 s <<
"hash-mode:" << m_hm.to_string() <<
" next-hops:[";
120 auto it = m_nhs.cbegin();
121 while (
it != m_nhs.cend()) {
122 s <<
" " <<
it->to_string();
125 s <<
" ] next-hop-size:" << m_nhs.size();
133 return ((m_hm ==
nhs.m_hm) && (m_nhs ==
nhs.m_nhs));
152 gbp_rule::action_t::action_t(
int v,
const std::string s)
187 return (other.m_priority < m_priority);
193 return ((m_action == rule.m_action) && (m_nhs == rule.m_nhs) &&
194 (m_priority == rule.m_priority));
200 std::ostringstream s;
203 <<
"priority:" << m_priority <<
" action:" << m_action.
to_string()
204 <<
" next-hop-set:[" << m_nhs.
to_string() <<
"]]";
Representation of set of next hops and associated hash mode profile.
const next_hop_set_t & nhs() const
Getters.
const uint32_t getBdId(void) const
get the bridge domain Id
@ GBP_API_HASH_MODE_SRC_IP
bool operator<(const gbp_rule &rule) const
less-than operator
The VPP Object Model (VOM) library.
const static action_t DENY
Deny action.
std::set< next_hop_t > next_hops_t
unordered set of next hops
const next_hops_t & next_hops(void) const
get the set of next hops
const static hash_mode_t DST_IP
Flow hash is calculated based on DST IP.
next_hop_set_t(const hash_mode_t &hm, next_hops_t &nhs)
Constructor for next_hop_set_t.
const hash_mode_t & hash_mode(void) const
get the hash mode
const static action_t PERMIT
Permit action.
const static action_t REDIRECT
Redirect action.
std::string to_string() const
convert to string format for debug purposes
const static hash_mode_t SYMMETRIC
Flow hash is calculated based on SRC IP, DST IP and Protocol.
std::string to_string() const
convert to string
@ GBP_API_HASH_MODE_SYMMETRIC
A template base class for all enum types.
const mac_address_t & getMac(void) const
get the mac address
bool operator==(const next_hop_t &nh) const
comparison operator (for testing)
bool operator==(const next_hop_set_t &nhs) const
Comparison operator.
manual_print typedef address
std::string to_string() const
convert to string
save_rewrite_length must be aligned so that reass doesn t overwrite it
const std::string & to_string() const
convert to string format for debug purposes
static const action_t & from_int(vapi_enum_gbp_rule_action i)
create the action from int value
const uint32_t getRdId(void) const
get the route domain Id
next_hop_t(const boost::asio::ip::address &ip, const mac_address_t &mac, uint32_t bd_id, uint32_t rd_id)
Constructor for next_hop_t.
Type def of a Ethernet address.
static const hash_mode_t & from_int(vapi_enum_gbp_hash_mode i)
create the hash mode from int value
Representation of next hop.
bool operator==(const gbp_rule &rule) const
comparison operator (for testing)
const action_t & action() const
const boost::asio::ip::address & getIp(void) const
get the IP address
const static hash_mode_t SRC_IP
Flow Hash is calculated based on SRC IP in case of load balancing.
bool operator<(const next_hop_t &nh) const
less-than operator
gbp_rule(uint32_t priority, const next_hop_set_t &nhs, const action_t &a)
Construct a new object matching the desried state.