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();
45 s <<
"l3-acl-bind:[" << m_direction.
to_string()
55 msg_t req(con.
ctx(), std::ref(*
this));
57 auto& payload = req.get_request().get_payload();
58 payload.sw_if_index = m_itf.
value();
61 payload.acl_index = m_acl.
value();
73 s <<
"l3-acl-unbind:[" << m_direction.
to_string()
83 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
85 auto& payload = m_dump->get_request().get_payload();
86 payload.sw_if_index = ~0;
99 return (
"l3-acl-bind-dump");
106 msg_t req(con.
ctx(), std::ref(*
this));
108 auto& payload = req.get_request().get_payload();
109 payload.sw_if_index = m_itf.
value();
111 payload.acl_index = m_acl.
value();
122 std::ostringstream s;
123 s <<
"l2-acl-bind:[" << m_direction.
to_string()
133 msg_t req(con.
ctx(), std::ref(*
this));
135 auto& payload = req.get_request().get_payload();
136 payload.sw_if_index = m_itf.
value();
138 payload.acl_index = m_acl.
value();
149 std::ostringstream s;
150 s <<
"l2-acl-unbind:[" << m_direction.
to_string()
160 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
162 auto& payload = m_dump->get_request().get_payload();
163 payload.sw_if_index = ~0;
176 return (
"l2-acl-bind-dump");
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 wait()
Wait on the commands promise.
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.
DEFINE_VAPI_MSG_IDS_ACL_API_JSON
const std::string & to_string() const
convert to string format for debug purposes
BIND msg_t
convenient typedef