From cbe25aab3be72154f2c706c39eeba6a77f34450f Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 30 Sep 2019 10:53:31 +0000 Subject: ip: Protocol Independent IP Neighbors Type: feature - ip-neighbour: generic neighbour handling; APIs, DBs, event handling, aging - arp: ARP protocol implementation - ip6-nd; IPv6 neighbor discovery implementation; separate ND, MLD, RA - ip6-link; manage link-local addresses - l2-arp-term; events separated from IP neighbours, since they are not the same. vnet retains just enough education to perform ND/ARP packet construction. arp and ip6-nd to be moved to plugins soon. Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe Signed-off-by: Neale Ranns --- extras/vom/vom/api_types.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'extras/vom/vom/api_types.cpp') diff --git a/extras/vom/vom/api_types.cpp b/extras/vom/vom/api_types.cpp index 5a46571ddea..5eea7654eee 100644 --- a/extras/vom/vom/api_types.cpp +++ b/extras/vom/vom/api_types.cpp @@ -47,8 +47,7 @@ from_api(vapi_enum_ip_neighbor_flags f) invalid_decode::invalid_decode(const std::string reason) : reason(reason) -{ -} +{} void to_api(const boost::asio::ip::address_v4& a, vapi_type_ip4_address& v) @@ -208,7 +207,8 @@ route::mprefix_t from_api(const vapi_type_mprefix& v) { return route::mprefix_t(from_api(v.src_address, v.af), - from_api(v.grp_address, v.af), v.grp_address_length); + from_api(v.grp_address, v.af), + v.grp_address_length); } vapi_type_mprefix @@ -238,6 +238,16 @@ to_api(const nh_proto_t& p) return FIB_API_PATH_NH_PROTO_IP4; } + +vapi_enum_address_family +to_api(const l3_proto_t p) +{ + if (p == l3_proto_t::IPV6) { + return ADDRESS_IP6; + } + return ADDRESS_IP4; +} + const nh_proto_t& from_api(vapi_enum_fib_path_nh_proto p) { -- cgit 1.2.3-korg