19 namespace neighbour_cmds {
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);
61 <<
" ip:" << m_ip_addr.to_string();
80 return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) &&
81 (m_itf == other.m_itf));
87 msg_t req(con.
ctx(), std::ref(*
this));
89 auto& payload = req.get_request().get_payload();
90 payload.sw_if_index = m_itf.
value();
92 payload.is_static = 1;
93 m_mac.
to_bytes(payload.mac_address, 6);
94 to_bytes(m_ip_addr, &payload.is_ipv6, payload.dst_address);
107 std::ostringstream s;
110 <<
" ip:" << m_ip_addr.to_string();
138 auto& payload =
m_dump->get_request().get_payload();
139 payload.sw_if_index = m_itf.
value();
140 payload.is_ipv6 = m_proto.
is_ipv6();
152 std::ostringstream s;
static const rc_t NOOP
The HW write/update action was/has not been attempted.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
A cmd class that deletes a bridge domain ARP entry.
uint32_t value() const
get the value of the handle
Error codes that VPP will return during a HW write.
An L3 protocol can be used to construct a prefix that is used to match packets are part of a route...
vapi::Ip_neighbor_dump msg_t
void to_bytes(uint8_t *array, uint8_t len) const
Convert to byte array.
rc_t wait()
Wait on the commands promise.
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.
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.
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.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
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.
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
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.
std::string to_string() const
String conversion.
std::string to_string() const
convert to string format for debug purposes
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.
rc_t issue(connection &con)
Issue the command to VPP/HW.
Type def of a Ethernet address.
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_neighbor_add_del msg_t
convenient typedef