24 namespace ip_mroute_cmds {
42 return ((m_mprefix == other.m_mprefix) && (m_id == other.m_id));
48 msg_t req(con.
ctx(), 1, std::ref(*
this));
50 auto& payload = req.get_request().get_payload();
54 payload.route.table_id = m_id;
55 payload.route.prefix =
to_api(m_mprefix);
58 payload.route.paths[0].itf_flags =
to_api(m_flags);
71 <<
" flags:" << m_flags;
92 return ((m_mprefix == other.m_mprefix) && (m_id == other.m_id));
98 msg_t req(con.
ctx(), 1, std::ref(*
this));
100 auto& payload = req.get_request().get_payload();
103 payload.route.table_id = m_id;
104 payload.route.prefix =
to_api(m_mprefix);
107 payload.route.paths[0].itf_flags =
to_api(m_flags);
120 std::ostringstream s;
144 auto& payload =
m_dump->get_request().get_payload();
146 payload.table.table_id = m_id;
147 payload.table.is_ip6 = m_proto.
is_ipv6();
159 std::ostringstream s;
160 s <<
"ip-mroute-dump: id:" << m_id <<
" proto:" << m_proto.
to_string();
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.
vl_api_wireguard_peer_flags_t flags
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
An L3 protocol can be used to construct a prefix that is used to match packets are part of a route...
vapi::Ip_mroute_dump msg_t
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
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.
A representation of the connection to VPP.
dump_cmd()
Default Constructor.
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.
A cmd class that Dumps ipv4 fib.
std::string to_string() const
convert to string format for debug purposes
const std::string & to_string() const
convert to string format for debug purposes
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 update_cmd &i) const
Comparison operator - only used for UT.
rc_t wait()
Wait for the issue of the command to complete.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
path(special_t special, const nh_proto_t &proto=nh_proto_t::IPV4)
constructor for special paths
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.
std::unique_ptr< vapi::Ip_mroute_dump > m_dump
The VAPI event registration.
bool operator==(const dump_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.
rc_t issue(connection &con)
Issue the command to VPP/HW.