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.
The neighbor table handler.
This class provides handler APIs to react to neighbor table entry deletion and addition. It works for both the v4 ARP table and v6 neighbor table.
Public Functions
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
Lookup a resolved neighbor entry for a given L3 interface and IP address.
Programmatically specify neighbor table entries.
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.
Lookup a configured neighbor entry for a given L3 interface and IP address.
Protected Functions
Private Members
Friends
Enums
Neighbor entry types.
Values:
The neighbor entry key class. Maps an IP address to its associated MAC address on a specific interface.
Public Functions
Getter for ‘ip_addr’: the ip address of the neighbor entry.
Getter for ‘intf_id’: the interface of the neighbor entry.
Returns a string representation of the current object’s values.
Friends
A utility stream operator that adds a string representation of neighbor_key_t to the ostream.
The neighbor entry class.
Public Functions
Getter for ‘neighbor_key’: the key of the neighbor entry.
Getter for ‘eth_addr’: the Ethernet address of the neighbor entry.
Getter for ‘entry_type’: the type of neighbor entry, it will be either STATIC or DYNAMIC.
Returns a string representation of the current object’s values.
Friends
A utility stream operator that adds a string representation of neighbor_entry_t to the ostream.