22 namespace binding_cmds {
27 msg_t req(con.
ctx(), std::ref(*
this));
29 auto& payload = req.get_request().get_payload();
30 payload.sw_if_index = m_itf.
value();
33 payload.acl_index = m_acl.
value();
47 s <<
"l3-acl-bind:[" << m_direction.
to_string()
57 msg_t req(con.
ctx(), std::ref(*
this));
59 auto& payload = req.get_request().get_payload();
60 payload.sw_if_index = m_itf.
value();
63 payload.acl_index = m_acl.
value();
77 s <<
"l3-acl-unbind:[" << m_direction.
to_string()
87 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
89 auto& payload = m_dump->get_request().get_payload();
90 payload.sw_if_index = ~0;
103 return (
"l3-acl-bind-dump");
110 msg_t req(con.
ctx(), std::ref(*
this));
112 auto& payload = req.get_request().get_payload();
113 payload.sw_if_index = m_itf.
value();
115 payload.acl_index = m_acl.
value();
128 std::ostringstream s;
129 s <<
"l2-acl-bind:[" << m_direction.
to_string()
139 msg_t req(con.
ctx(), std::ref(*
this));
141 auto& payload = req.get_request().get_payload();
142 payload.sw_if_index = m_itf.
value();
144 payload.acl_index = m_acl.
value();
157 std::ostringstream s;
158 s <<
"l2-acl-unbind:[" << m_direction.
to_string()
168 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
170 auto& payload = m_dump->get_request().get_payload();
171 payload.sw_if_index = ~0;
184 return (
"l2-acl-bind-dump");
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
rc_t issue(connection &con)
Issue the command to VPP/HW.
uint32_t value() const
get the value of the handle
Error codes that VPP will return during a HW write.
static const direction_t INPUT
Permit Direction.
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t issue(connection &con)
Issue the command to VPP/HW.
std::string to_string() const
convert to string format for debug purposes
A representation of the connection to VPP.
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.
std::string to_string() const
convert to string format for debug purposes
static const rc_t OK
The HW write was successfull.
std::string to_string() const
convert to string format for debug purposes
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
The VPP Object Model (VOM) library.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
BIND msg_t
convenient typedef
DEFINE_VAPI_MSG_IDS_ACL_API_JSON
const std::string & to_string() const
convert to string format for debug purposes
rc_t wait()
Wait on the commands promise.