aboutsummaryrefslogtreecommitdiffstats
path: root/extras/vom
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-06-19 07:07:13 -0700
committerOle Trøan <otroan@employees.org>2019-06-19 15:56:18 +0000
commitbc764c8bc26282445901dc9aa32223a13f18e8dc (patch)
tree5269531d092bb3d9f8ba9bad025d2057314dd473 /extras/vom
parent6a69b2483198de57ef304cb5e05a2ecfb960e68f (diff)
l2: BD ARP termination entry API update
Type: refactor Change-Id: I492b6e88acadf0ab0e4d7b1c0c5d1cab84c1726f Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'extras/vom')
-rw-r--r--extras/vom/vom/bridge_domain_arp_entry.cpp9
-rw-r--r--extras/vom/vom/bridge_domain_arp_entry_cmds.cpp12
2 files changed, 11 insertions, 10 deletions
diff --git a/extras/vom/vom/bridge_domain_arp_entry.cpp b/extras/vom/vom/bridge_domain_arp_entry.cpp
index 7221c3f2578..f468e0f977f 100644
--- a/extras/vom/vom/bridge_domain_arp_entry.cpp
+++ b/extras/vom/vom/bridge_domain_arp_entry.cpp
@@ -14,6 +14,7 @@
*/
#include "vom/bridge_domain_arp_entry.hpp"
+#include "vom/api_types.hpp"
#include "vom/bridge_domain_arp_entry_cmds.hpp"
#include "vom/singular_db_funcs.hpp"
@@ -174,10 +175,10 @@ bridge_domain_arp_entry::event_handler::handle_populate(
for (auto& record : *cmd) {
auto& payload = record.get_payload();
- std::shared_ptr<bridge_domain> bd = bridge_domain::find(payload.bd_id);
- bridge_domain_arp_entry bd_ae(
- *bd, from_bytes(payload.is_ipv6, payload.ip_address),
- mac_address_t(payload.mac_address));
+ std::shared_ptr<bridge_domain> bd =
+ bridge_domain::find(payload.entry.bd_id);
+ bridge_domain_arp_entry bd_ae(*bd, from_api(payload.entry.ip),
+ from_api(payload.entry.mac));
VOM_LOG(log_level_t::DEBUG) << "dump: " << bd_ae.to_string();
diff --git a/extras/vom/vom/bridge_domain_arp_entry_cmds.cpp b/extras/vom/vom/bridge_domain_arp_entry_cmds.cpp
index a72ad3ed874..e1a80908271 100644
--- a/extras/vom/vom/bridge_domain_arp_entry_cmds.cpp
+++ b/extras/vom/vom/bridge_domain_arp_entry_cmds.cpp
@@ -43,10 +43,10 @@ create_cmd::issue(connection& con)
msg_t req(con.ctx(), std::ref(*this));
auto& payload = req.get_request().get_payload();
- payload.bd_id = m_bd;
+ payload.entry.bd_id = m_bd;
payload.is_add = 1;
- to_api(m_mac, payload.mac);
- to_api(m_ip_addr, payload.ip);
+ to_api(m_mac, payload.entry.mac);
+ to_api(m_ip_addr, payload.entry.ip);
VAPI_CALL(req.execute());
@@ -88,10 +88,10 @@ delete_cmd::issue(connection& con)
msg_t req(con.ctx(), std::ref(*this));
auto& payload = req.get_request().get_payload();
- payload.bd_id = m_bd;
+ payload.entry.bd_id = m_bd;
payload.is_add = 0;
- to_api(m_mac, payload.mac);
- to_api(m_ip_addr, payload.ip);
+ to_api(m_mac, payload.entry.mac);
+ to_api(m_ip_addr, payload.entry.ip);
VAPI_CALL(req.execute());