|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
22 namespace neighbour_cmds {
38 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
39 (m_itf == other.m_itf) && (m_flags == other.m_flags));
45 msg_t req(
con.ctx(), std::ref(*
this));
47 auto& payload = req.get_request().get_payload();
49 payload.neighbor.sw_if_index = m_itf.
value();
51 to_api(m_mac, payload.neighbor.mac_address);
52 to_api(m_ip_addr, payload.neighbor.ip_address);
53 payload.neighbor.flags =
to_api(m_flags);
66 <<
" ip:" << m_ip_addr.to_string();
86 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
87 (m_itf == other.m_itf));
93 msg_t req(
con.ctx(), std::ref(*
this));
95 auto& payload = req.get_request().get_payload();
97 payload.neighbor.sw_if_index = m_itf.
value();
99 to_api(m_mac, payload.neighbor.mac_address);
100 to_api(m_ip_addr, payload.neighbor.ip_address);
101 payload.neighbor.flags =
to_api(m_flags);
114 std::ostringstream s;
117 <<
" ip:" << m_ip_addr.to_string();
143 auto& payload =
m_dump->get_request().get_payload();
144 payload.sw_if_index = m_itf.
value();
145 payload.af =
to_api(m_proto);
157 std::ostringstream s;
vapi::Ip_neighbor_dump msg_t
delete_cmd(HW::item< handle_t > &item, handle_t itf, const mac_address_t &mac, const boost::asio::ip::address &ip_addr, const neighbour::flags_t &flags)
Constructor.
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.
uint32_t value() const
get the value of the handle
std::string to_string() const
convert to string format for debug purposes
HW::item< handle_t > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< vapi::Ip_neighbor_dump > m_dump
The VAPI event registration.
std::string to_string() const
convert to string format for debug purposes
DEFINE_VAPI_MSG_IDS_IP_NEIGHBOR_API_JSON
create_cmd(HW::item< handle_t > &item, handle_t itf, const mac_address_t &mac, const boost::asio::ip::address &ip_addr, const neighbour::flags_t &flags)
Constructor.
rc_t issue(connection &con)
Issue the command to VPP/HW.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
A representation of the connection to VPP.
rc_t wait()
Wait for the issue of the command to complete.
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
A type declaration of an interface handle in VPP.
rc_t issue(connection &con)
Issue the command to VPP/HW.
manual_print typedef address
std::string to_string() const
convert to string format for debug purposes
A command class that creates or updates the bridge domain ARP Entry.
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
vapi::Ip_neighbor_add_del msg_t
convenient typedef
const std::string & to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
A cmd class that Dumps all the neighbours.
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
A cmd class that deletes a bridge domain ARP entry.
std::string to_string() const
String conversion.
Type def of a Ethernet address.
dump_cmd()
Default Constructor.
Error codes that VPP will return during a HW write.
vl_api_wireguard_peer_flags_t flags