diff options
author | Neale Ranns <nranns@cisco.com> | 2019-09-30 10:53:31 +0000 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-12-17 10:56:20 +0000 |
commit | cbe25aab3be72154f2c706c39eeba6a77f34450f (patch) | |
tree | 131fb53b5ec973be045ffb9e2eb797af01d112a0 /extras/vom/vom/api_types.cpp | |
parent | 96453fd2417ebd1d69354a7fb692976129cea80e (diff) |
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 <nranns@cisco.com>
Diffstat (limited to 'extras/vom/vom/api_types.cpp')
-rw-r--r-- | extras/vom/vom/api_types.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
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) { |