19 namespace neighbour_cmds {
23 const boost::asio::ip::address& ip_addr)
34 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
35 (m_itf == other.m_itf));
41 msg_t req(con.
ctx(), std::ref(*
this));
43 auto& payload = req.get_request().get_payload();
44 payload.sw_if_index = m_itf.
value();
46 payload.is_static = 1;
47 m_mac.
to_bytes(payload.mac_address, 6);
48 to_bytes(m_ip_addr, &payload.is_ipv6, payload.dst_address);
63 <<
" ip:" << m_ip_addr.to_string();
71 const boost::asio::ip::address& ip_addr)
82 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
83 (m_itf == other.m_itf));
89 msg_t req(con.
ctx(), std::ref(*
this));
91 auto& payload = req.get_request().get_payload();
92 payload.sw_if_index = m_itf.
value();
94 payload.is_static = 1;
95 m_mac.
to_bytes(payload.mac_address, 6);
96 to_bytes(m_ip_addr, &payload.is_ipv6, payload.dst_address);
109 std::ostringstream s;
112 <<
" ip:" << m_ip_addr.to_string();
140 auto& payload =
m_dump->get_request().get_payload();
141 payload.sw_if_index = m_itf.
value();
142 payload.is_ipv6 = m_proto.
is_ipv6();
154 return (
"neighbour-dump");
static const rc_t NOOP
The HW write/update action was/has not been attempted.
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
A cmd class that deletes a bridge domain ARP entry.
std::string to_string() const
convert to string format for debug purposes
uint32_t value() const
get the value of the handle
std::string to_string() const
String conversion.
Error codes that VPP will return during a HW write.
Types belonging to Routing.
vapi::Ip_neighbor_dump msg_t
std::string to_string() const
convert to string format for debug purposes
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
void to_bytes(const boost::asio::ip::address_v6 &addr, uint8_t *array)
A representation of the connection to VPP.
dump_cmd()
Default Constructor.
HW::item< bool > & item()
return the HW item the command updates
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
delete_cmd(HW::item< bool > &item, handle_t itf, const mac_address_t &mac, const boost::asio::ip::address &ip_addr)
Constructor.
create_cmd(HW::item< bool > &item, handle_t itf, const mac_address_t &mac, const boost::asio::ip::address &ip_addr)
Constructor.
std::string to_string() const
convert to string format for debug purposes
A type declaration of an interface handle in VPP.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
static const rc_t OK
The HW write was successfull.
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t wait()
Wait for the issue of the command to complete.
A cmd class that Dumps all the neighbours.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
void to_bytes(uint8_t *array, uint8_t len) const
Convert to byte array.
The VPP Object Model (VOM) library.
A command class that creates or updates the bridge domain ARP Entry.
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_neighbor_dump > m_dump
The VAPI event registration.
vapi::Ip_neighbor_add_del msg_t
convenient typedef
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
Type def of a Ethernet address.
rc_t wait()
Wait on the commands promise.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.