|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
21 namespace vxlan_tunnel_cmds {
29 , m_mcast_itf(mcast_itf)
35 return (m_ep == other.m_ep);
41 msg_t req(
con.ctx(), std::ref(*
this));
43 auto& payload = req.get_request().get_payload();
46 (uint8_t*)&payload.src_address.af,
47 (uint8_t*)&payload.src_address.un);
49 (uint8_t*)&payload.dst_address.af,
50 (uint8_t*)&payload.dst_address.un);
51 payload.mcast_sw_if_index = m_mcast_itf.
value();
52 payload.encap_vrf_id = 0;
53 payload.decap_next_index = ~0;
54 payload.vni = m_ep.
vni;
86 return (m_ep == other.m_ep);
92 msg_t req(
con.ctx(), std::ref(*
this));
94 auto payload = req.get_request().get_payload();
97 (uint8_t*)&payload.src_address.af,
98 (uint8_t*)&payload.src_address.un);
100 (uint8_t*)&payload.dst_address.af,
101 (uint8_t*)&payload.dst_address.un);
102 payload.mcast_sw_if_index = ~0;
103 payload.encap_vrf_id = 0;
104 payload.decap_next_index = ~0;
105 payload.vni = m_ep.
vni;
119 std::ostringstream s;
138 auto& payload =
m_dump->get_request().get_payload();
139 payload.sw_if_index = ~0;
151 return (
"Vpp-vxlan_tunnels-Dump");
std::string to_string() const
convert to string format for debug purposes
boost::asio::ip::address dst
The destination IP address of the endpoint.
vapi::Vxlan_tunnel_dump msg_t
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
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.
A cmd class that Dumps all the Vpp interfaces.
DEFINE_VAPI_MSG_IDS_VXLAN_API_JSON
The VPP Object Model (VOM) library.
const static rc_t OK
The HW write was successfull.
void to_bytes(const boost::asio::ip::address_v6 &addr, uint8_t *array)
dump_cmd()
Default Constructor.
uint32_t value() const
get the value of the handle
std::string to_string() const
convert to string format for debug purposes
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A Command class that creates an VXLAN tunnel.
HW::item< handle_t > & m_hw_item
A reference to an object's HW::item that the command will update.
std::unique_ptr< vapi::Vxlan_tunnel_dump > m_dump
The VAPI event registration.
uint32_t vni
The VNI of the endpoint.
void insert_interface()
add the created interface to the DB
rc_t issue(connection &con)
Issue the command to VPP/HW.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
create_cmd(HW::item< handle_t > &item, const std::string &name, const vxlan_tunnel::endpoint_t &ep, handle_t mcast_itf)
Create command constructor taking HW item to update and the endpoint values.
A representation of the connection to VPP.
A functor class that creates an VXLAN tunnel.
rc_t wait()
Wait for the issue of the command to complete.
boost::asio::ip::address src
The src IP address of the endpoint.
A representation of an interface in VPP.
const static rc_t NOOP
The HW write/update action was/has not been attempted.
A type declaration of an interface handle in VPP.
delete_cmd(HW::item< handle_t > &item, const vxlan_tunnel::endpoint_t &ep)
delete command constructor taking HW item to update and the endpoint values
std::string to_string() const
convert to string format for debug purposes
vapi::Vxlan_add_del_tunnel msg_t
convenient typedef
rc_t rc() const
Get the HW return code.
void remove_interface()
remove the deleted interface from the DB
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
std::string to_string() const
Debug print function.
std::string to_string() const
convert to string format for debug purposes
Error codes that VPP will return during a HW write.
Combaintion of attributes that are a unique key for a VXLAN tunnel.