16 #ifndef __VOM_GBP_RULE_H__ 17 #define __VOM_GBP_RULE_H__ 22 #include <vapi/gbp.api.vapi.h> 73 const uint32_t
getBdId(
void)
const;
78 const uint32_t
getRdId(
void)
const;
94 const uint32_t m_bd_id;
99 const uint32_t m_rd_id;
129 static const hash_mode_t& from_int(vapi_enum_gbp_hash_mode
i);
175 const next_hops_t& next_hops(
void)
const;
186 const next_hops_t m_nhs;
212 static const action_t& from_int(vapi_enum_gbp_rule_action
i);
215 action_t(
int v,
const std::string s);
A template base class for all enum types.
~gbp_rule()=default
Destructor.
bool operator==(const next_hop_t &nh) const
comparison operator (for testing)
gbp_rule(uint32_t priority, const next_hop_set_t &nhs, const action_t &a)
Construct a new object matching the desried state.
static const hash_mode_t DST_IP
Flow hash is calculated based on DST IP.
const boost::asio::ip::address & getIp(void) const
get the IP address
const uint32_t getRdId(void) const
get the route domain Id
static const hash_mode_t SYMMETRIC
Flow hash is calculated based on SRC IP, DST IP and Protocol.
Representation of set of next hops and associated hash mode profile.
bool operator<(const next_hop_t &nh) const
less-than operator
const uint32_t getBdId(void) const
get the bridge domain Id
static const action_t REDIRECT
Redirect action.
const mac_address_t & getMac(void) const
get the mac address
Representation of next hop.
The VPP Object Model (VOM) library.
std::set< next_hop_t > next_hops_t
unordered set of next hops
static const action_t DENY
Deny action.
static const hash_mode_t SRC_IP
Flow Hash is calculated based on SRC IP in case of load balancing.
~next_hop_t()=default
default destructor
const next_hop_set_t & nhs() const
Getters.
std::string to_string() const
convert to string
Type def of a Ethernet address.
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.
const action_t & action() const
static const action_t PERMIT
Permit action.