|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
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();
vapi::Ip_mroute_dump msg_t
rc_t wait()
Wait on the commands promise.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
The VPP Object Model (VOM) library.
const static rc_t OK
The HW write was successfull.
A cmd class that Dumps ipv4 fib.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A base class for all RPC commands to VPP.
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.
std::unique_ptr< vapi::Ip_mroute_dump > m_dump
The VAPI event registration.
std::string to_string() const
convert to string format for debug purposes
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A representation of the connection to VPP.
std::string to_string() const
convert to string format for debug purposes
rc_t wait()
Wait for the issue of the command to complete.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A cmd class that deletes a route.
std::string to_string() const
convert to string format for debug purposes
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
vapi::Ip_mroute_add_del msg_t
convenient typedef
const std::string & to_string() const
convert to string format for debug purposes
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
An L3 protocol can be used to construct a prefix that is used to match packets are part of a route.
std::string to_string() const
convert to string format for debug purposes
dump_cmd()
Default Constructor.
path(special_t special, const nh_proto_t &proto=nh_proto_t::IPV4)
constructor for special paths
rc_t issue(connection &con)
Issue the command to VPP/HW.
A path for IP or MPLS routes.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
uint32_t table_id_t
type def the table-id
Error codes that VPP will return during a HW write.
update_cmd(HW::item< bool > &item, table_id_t id, const mprefix_t &mprefix, const path &path, const itf_flags_t &flags)
Constructor.
bool operator==(const update_cmd &i) const
Comparison operator - only used for UT.
delete_cmd(HW::item< bool > &item, table_id_t id, const mprefix_t &mprefix, const path &path, const itf_flags_t &flags)
Constructor.
A command class that creates or updates the route.
std::string to_string() const
convert to string format for debug purposes
vl_api_wireguard_peer_flags_t flags