diff options
author | John Lo <loj@cisco.com> | 2018-04-28 01:19:24 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-05-11 22:35:30 +0000 |
commit | 7f358b30b04aabe9a35680997cc1eeefb080a869 (patch) | |
tree | 25b82c278355adf4a49289b31e3e3ca008bbc743 /src/vnet/ip/ip6_neighbor.h | |
parent | 84c6204969898453aacfa900876e7b7eecd8be0e (diff) |
Periodic scan and probe of IP neighbors to maintain neighbor pools
Scan IPv4 and IPv6 neigbor pool entries once a minute to keep them
up to date. The neighbor of an entry is probed if its time-stamp
is older than 1 minute. If the neighbor respond, its time-stamp
will be updated. If there is no response from a neighbor, its
entry will be deleted when the time-stamp of the entry become more
than 4 minutes old. Static neighbor entries are not probed nor
deleted.
Implemented CLI and API to enable and disable priodic scan of IPv4,
IPv6 or both types of IP neighbors. CLI is "ip scan-neighbor" and
API is "ip_scan_neighbor_enable_disable". Other IP neighbor scan
parameters can also be changed from their defaults via the CLI/API.
Change-Id: Id1a0a934ace15d03db845aa698bcbb9cdabebfcd
Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip6_neighbor.h')
-rw-r--r-- | src/vnet/ip/ip6_neighbor.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/ip/ip6_neighbor.h b/src/vnet/ip/ip6_neighbor.h index e46a6b14221..753de56072e 100644 --- a/src/vnet/ip/ip6_neighbor.h +++ b/src/vnet/ip/ip6_neighbor.h @@ -40,10 +40,12 @@ typedef struct ip6_neighbor_key_t key; u8 link_layer_address[8]; ip6_neighbor_flags_t flags; - u64 cpu_time_last_updated; + f64 time_last_updated; fib_node_index_t fib_entry_index; } ip6_neighbor_t; +extern ip6_neighbor_t *ip6_neighbors_pool (void); + extern ip6_neighbor_t *ip6_neighbors_entries (u32 sw_if_index); extern int ip6_neighbor_ra_config (vlib_main_t * vm, u32 sw_if_index, |