24 namespace ip_mroute_cmds {
42 return ((m_mprefix == other.m_mprefix) && (m_id == other.m_id));
48 msg_t req(con.
ctx(), std::ref(*
this));
50 auto& payload = req.get_request().get_payload();
52 payload.table_id = m_id;
55 m_mprefix.
to_vpp(&payload.is_ipv6, payload.grp_address, payload.src_address,
56 &payload.grp_address_length);
59 payload.itf_flags = m_flags.
value();
72 <<
" flags:" << m_flags;
93 return ((m_mprefix == other.m_mprefix) && (m_id == other.m_id));
99 msg_t req(con.
ctx(), std::ref(*
this));
101 auto& payload = req.get_request().get_payload();
102 payload.table_id = m_id;
105 m_mprefix.
to_vpp(&payload.is_ipv6, payload.grp_address, payload.src_address,
106 &payload.grp_address_length);
109 payload.itf_flags = m_flags.
value();
122 std::ostringstream s;
142 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
154 return (
"ip-mroute-v4-dump");
170 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
182 return (
"ip-mroute-v6-dump");
uint32_t table_id_t
type def the table-id
static const rc_t NOOP
The HW write/update action was/has not been attempted.
A cmd class that deletes a route.
dump_v6_cmd()
Constructor.
A cmd class that Dumps ipv4 fib.
void to_vpp(const route::path &p, vapi_payload_ip_add_del_route &payload)
rc_t issue(connection &con)
Issue the command to VPP/HW.
A path for IP or MPLS routes.
Error codes that VPP will return during a HW write.
std::string to_string() const
convert to string format for debug purposes
int value() const
Return the value of the enum - same as integer conversion.
rc_t wait()
Wait on the commands promise.
std::string to_string() const
convert to string format for debug purposes
delete_cmd(HW::item< bool > &item, table_id_t id, const mprefix_t &mprefix, const path &path, const itf_flags_t &flags)
Constructor.
dump_v4_cmd()
Constructor.
A representation of the connection to VPP.
std::string to_string() const
convert to string format for debug purposes
A base class for all RPC commands to VPP.
A command class that creates or updates the route.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A cmd class that Dumps ipv6 fib.
std::string to_string() const
convert to string format for debug purposes
void to_vpp(uint8_t *is_ip6, uint8_t *saddr, uint8_t *gaddr, uint16_t *len) const
static const rc_t OK
The HW write was successfull.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const dump_v4_cmd &i) const
Comparison operator - only used for UT.
bool operator==(const update_cmd &i) const
Comparison operator - only used for UT.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
std::string to_string() const
convert to string format for debug purposes
The VPP Object Model (VOM) library.
rc_t issue(connection &con)
Issue the command to VPP/HW.
update_cmd(HW::item< bool > &item, table_id_t id, const mprefix_t &mprefix, const path &path, const itf_flags_t &flags)
Constructor.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
bool operator==(const dump_v6_cmd &i) const
Comparison operator - only used for UT.
std::string to_string() const
convert to string format for debug purposes
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
HW::item< bool > & item()
return the HW item the command updates
vapi::Ip_mroute_add_del msg_t
convenient typedef
rc_t issue(connection &con)
Issue the command to VPP/HW.