2 * Copyright (c) 2017 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 #ifndef __VOM_ARP_PROXY_BINDING_CMDS_H__
17 #define __VOM_ARP_PROXY_BINDING_CMDS_H__
19 #include "vom/arp_proxy_binding.hpp"
20 #include "vom/dump_cmd.hpp"
22 #include <vapi/vpe.api.vapi.hpp>
25 namespace arp_proxy_binding_cmds {
27 * A command class that binds the LLDP config to the interface
30 : public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_intfc_enable_disable>
36 bind_cmd(HW::item<bool>& item, const handle_t& itf);
39 * Issue the command to VPP/HW
41 rc_t issue(connection& con);
43 * convert to string format for debug purposes
45 std::string to_string() const;
48 * Comparison operator - only used for UT
50 bool operator==(const bind_cmd& i) const;
54 * Reference to the HW::item of the interface to bind
56 const handle_t& m_itf;
60 * A cmd class that Unbinds ArpProxy Config from an interface
63 : public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_intfc_enable_disable>
69 unbind_cmd(HW::item<bool>& item, const handle_t& itf);
72 * Issue the command to VPP/HW
74 rc_t issue(connection& con);
76 * convert to string format for debug purposes
78 std::string to_string() const;
81 * Comparison operator - only used for UT
83 bool operator==(const unbind_cmd& i) const;
87 * Reference to the HW::item of the interface to unbind
89 const handle_t& m_itf;
93 * A cmd class that Dumps all the Proxy ARP configs
95 class dump_cmd : public VOM::dump_cmd<vapi::Proxy_arp_intfc_dump>
101 dump_cmd() = default;
104 * Issue the command to VPP/HW
106 rc_t issue(connection& con);
108 * convert to string format for debug purposes
110 std::string to_string() const;
113 * Comparison operator - only used for UT
115 bool operator==(const dump_cmd& i) const;
128 * fd.io coding-style-patch-verification: ON
131 * eval: (c-set-style "mozilla")