X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Fneighbour_cmds.cpp;h=d43e508e1f54526da597a27bb22ec08a46d83c79;hb=37029305c671f4e2d091d6f6c22142634e409043;hp=9bd32923379b225e08637a01b337e19e766491a2;hpb=13b2ba2ad5527c8185dce368993a3877e7daf7a2;p=vpp.git diff --git a/extras/vom/vom/neighbour_cmds.cpp b/extras/vom/vom/neighbour_cmds.cpp index 9bd32923379..d43e508e1f5 100644 --- a/extras/vom/vom/neighbour_cmds.cpp +++ b/extras/vom/vom/neighbour_cmds.cpp @@ -14,6 +14,7 @@ */ #include "vom/neighbour_cmds.hpp" +#include "vom/api_types.hpp" namespace VOM { namespace neighbour_cmds { @@ -41,11 +42,12 @@ create_cmd::issue(connection& con) msg_t req(con.ctx(), std::ref(*this)); auto& payload = req.get_request().get_payload(); - payload.sw_if_index = m_itf.value(); payload.is_add = 1; - payload.is_static = 1; - m_mac.to_bytes(payload.mac_address, 6); - to_bytes(m_ip_addr, &payload.is_ipv6, payload.dst_address); + 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); VAPI_CALL(req.execute()); @@ -87,11 +89,12 @@ delete_cmd::issue(connection& con) msg_t req(con.ctx(), std::ref(*this)); auto& payload = req.get_request().get_payload(); - payload.sw_if_index = m_itf.value(); payload.is_add = 0; - payload.is_static = 1; - m_mac.to_bytes(payload.mac_address, 6); - to_bytes(m_ip_addr, &payload.is_ipv6, payload.dst_address); + 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); VAPI_CALL(req.execute());