diff options
author | Neale Ranns <nranns@cisco.com> | 2019-02-12 06:18:30 -0800 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-02-13 09:06:44 +0000 |
commit | 6fef74ad3083f630648eae65545a0dd46af1102e (patch) | |
tree | 8b7ad67c063ae41ef7acfd15fa7f406198e6e7c7 /extras/vom/vom/neighbour_cmds.cpp | |
parent | 22ad815d654294d77ccbb2b7286a73b544bf3f52 (diff) |
VOM: neighbour API flags
Change-Id: Ia664cd4c77f1c5b4bc46c5e191bb57704b3ccc46
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'extras/vom/vom/neighbour_cmds.cpp')
-rw-r--r-- | extras/vom/vom/neighbour_cmds.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/extras/vom/vom/neighbour_cmds.cpp b/extras/vom/vom/neighbour_cmds.cpp index d43e508e1f5..5f9e180b01d 100644 --- a/extras/vom/vom/neighbour_cmds.cpp +++ b/extras/vom/vom/neighbour_cmds.cpp @@ -21,11 +21,13 @@ namespace neighbour_cmds { create_cmd::create_cmd(HW::item<bool>& item, handle_t itf, const mac_address_t& mac, - const boost::asio::ip::address& ip_addr) + const boost::asio::ip::address& ip_addr, + const neighbour::flags_t& flags) : rpc_cmd(item) , m_itf(itf) , m_mac(mac) , m_ip_addr(ip_addr) + , m_flags(flags) { } @@ -33,7 +35,7 @@ bool create_cmd::operator==(const create_cmd& other) const { return ((m_mac == other.m_mac) && (m_ip_addr == other.m_ip_addr) && - (m_itf == other.m_itf)); + (m_itf == other.m_itf) && (m_flags == other.m_flags)); } rc_t @@ -44,10 +46,10 @@ create_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 1; payload.neighbor.sw_if_index = m_itf.value(); - payload.neighbor.flags = IP_API_NEIGHBOR_FLAG_STATIC; to_api(m_mac, payload.neighbor.mac_address); to_api(m_ip_addr, payload.neighbor.ip_address); + payload.neighbor.flags = to_api(m_flags); VAPI_CALL(req.execute()); @@ -68,11 +70,13 @@ create_cmd::to_string() const delete_cmd::delete_cmd(HW::item<bool>& item, handle_t itf, const mac_address_t& mac, - const boost::asio::ip::address& ip_addr) + const boost::asio::ip::address& ip_addr, + const neighbour::flags_t& flags) : rpc_cmd(item) , m_itf(itf) , m_mac(mac) , m_ip_addr(ip_addr) + , m_flags(flags) { } @@ -91,10 +95,10 @@ delete_cmd::issue(connection& con) auto& payload = req.get_request().get_payload(); payload.is_add = 0; payload.neighbor.sw_if_index = m_itf.value(); - payload.neighbor.flags = IP_API_NEIGHBOR_FLAG_STATIC; to_api(m_mac, payload.neighbor.mac_address); to_api(m_ip_addr, payload.neighbor.ip_address); + payload.neighbor.flags = to_api(m_flags); VAPI_CALL(req.execute()); |