diff options
Diffstat (limited to 'src/vpp-api/vom/neighbour.hpp')
-rw-r--r-- | src/vpp-api/vom/neighbour.hpp | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/src/vpp-api/vom/neighbour.hpp b/src/vpp-api/vom/neighbour.hpp index 85577f077a9..500f03d0a61 100644 --- a/src/vpp-api/vom/neighbour.hpp +++ b/src/vpp-api/vom/neighbour.hpp @@ -22,26 +22,23 @@ namespace VOM { /** - * A entry in the ARP termination table of a Bridge Domain + * A entry in the neighbour entry (ARP or IPv6 ND) */ class neighbour : public object_base { public: /** - * The key for a bridge_domain ARP entry; - * the BD, IP address and MAC address + * The key for a neighbour entry; + * the interface and IP address */ - typedef std::tuple<interface::key_type, - mac_address_t, - boost::asio::ip::address> - key_t; + typedef std::pair<interface::key_t, boost::asio::ip::address> key_t; /** * Construct an ARP entry */ neighbour(const interface& itf, - const mac_address_t& mac, - const boost::asio::ip::address& ip_addr); + const boost::asio::ip::address& ip_addr, + const mac_address_t& mac); /** * Copy Construct @@ -54,17 +51,27 @@ public: ~neighbour(); /** + * Return the object's key + */ + const key_t key() const; + + /** + * Comparison operator + */ + bool operator==(const neighbour& n) const; + + /** * Return the matching 'singular instance' */ std::shared_ptr<neighbour> singular() const; /** - * Find the instnace of the bridge_domain domain in the OM + * Find the neighbour fromits key */ - static std::shared_ptr<neighbour> find(const neighbour& temp); + static std::shared_ptr<neighbour> find(const key_t& k); /** - * Dump all bridge_domain-doamin into the stream provided + * Dump all neighbours into the stream provided */ static void dump(std::ostream& os); @@ -127,7 +134,7 @@ private: const l3_proto_t& proto); /** - * Find or add the instnace of the bridge_domain domain in the OM + * Find or add the instnace of the neighbour in the OM */ static std::shared_ptr<neighbour> find_or_add(const neighbour& temp); @@ -157,14 +164,14 @@ private: std::shared_ptr<interface> m_itf; /** - * The mac to match + * The IP address */ - mac_address_t m_mac; + boost::asio::ip::address m_ip_addr; /** - * The IP address + * The mac to match */ - boost::asio::ip::address m_ip_addr; + mac_address_t m_mac; /** * A map of all bridge_domains |