neighbor_table

The neighbor_table module manages IP/MAC mapping tables, including IPv4 ARP table and IPv6 neighbor table.

This module provides APIs to create and delete static IPv4/IPv6 entries. It also provides APIs to query the configured static entries and the learned (both static/dynamic) entries on the system from IPv4 ARP table and IPv6 neighbor table.

Two handler APIs are provided to allow 3rd party agents to react to the addition and deletion of entries in the learned ARP table or neighbor table on the system.

namespace eos
class neighbor_table_handler
#include <neighbor_table.h>

The neighbor table handler.

This class provides handler APIs to react to neighbor table entry deletion and addition. It works for both the IPv4 ARP table and IPv6 neighbor table.

Public Functions

neighbor_table_handler(neighbor_table_mgr * mgr)
neighbor_table_mgr * get_neighbor_table_mgr() const
void watch_all_neighbor_entries(bool interest)

Registers this class to receive change updates on all neighbor entries. This includes both IPv4 ARP table entries and IPv6 Neighbor Discovery table entries.

void watch_neighbor_entry(neighbor_key_t const & key, bool interest)

Registers this class to receive change updates on a given neighbor entry. This includes both IPv4 ARP table entries and IPv6 Neighbor Discovery table entries.

virtual void on_neighbor_entry_set(neighbor_entry_t const & entry)
virtual void on_neighbor_entry_del(neighbor_key_t const & key)
class neighbor_table_iter_t
#include <neighbor_table.h>

An iterator over the configured ARP and Neighbor Discovery tables.

Private Functions

neighbor_table_iter_t(neighbor_table_iter_impl * const)

Friends

friend class neighbor_table_iter_impl
class neighbor_table_mgr
#include <neighbor_table.h>

The neighbor table manager.

This class provides access to the resolved MAC address for a given IP address off of an L3 interface (aka the ARP table for IPv4 addresses and the Neighbor Discovery table for IPv6 addresses). It also provides APIs to delete/add v4 static ARP entry and v6 static neighbor table entries.

Public Functions

virtual ~neighbor_table_mgr()
virtual neighbor_table_iter_t neighbor_table_iter() const = 0

Iterates through the configured ARP and Neighbor Discovery tables. A neighbor_key_t is returned for each entry.

virtual neighbor_entry_t neighbor_entry_status(neighbor_key_t const & key) const = 0

Looks up a resolved neighbor entry for a given L3 interface and IP address.

virtual void neighbor_entry_set(neighbor_entry_t const & entry) = 0

Configures a new static entry in either ARP table for IPv4 or Neighbor table for IPv6. Note “intf_id” is needed only for v6 case, since the IP/MAC pair may not be unique. It’s not needed for v4 case.

virtual void neighbor_entry_del(neighbor_key_t const & key) = 0

Deletes a static entry in either ARP table (IPv4) or Neighbor table for IPv6. Note “intf_id” is needed only for v6 case, since the IP/MAC pair may not be unique. It’s not needed for v4 case.

virtual neighbor_entry_t neighbor_entry(neighbor_key_t const & key) const = 0

Looks up a configured neighbor entry for a given L3 interface and IP address.

Protected Functions

neighbor_table_mgr()

Private Members

neighbor_table_mgr

Friends

friend class neighbor_table_handler

Type definitions in neighbor_table

Warning

doxygenfile: Found multiple matches for file “eos/types/neighbor_table.h

Table Of Contents

Previous topic

mpls_route

Next topic

nexthop_group