Go to the source code of this file.
Add a child dependent to an adjacency.
The child will thus be informed via its registerd back-walk function when the adjacency state changes.
Definition at line 225 of file adj.c.
Remove a child dependent.
Definition at line 242 of file adj.c.
Get a pointer to an adjacency object from its index.
Definition at line 117 of file adj.h.
Return the link type of the adjacency.
Definition at line 259 of file adj.c.
Return the link type of the adjacency.
Definition at line 285 of file adj.c.
Return the sw interface index of the adjacency.
Definition at line 272 of file adj.c.
An adjacency is a representation of an attached L3 peer.
Adjacency Sub-types:
- neighbour: a representation of an attached L3 peer. Key:{addr,interface,link/ether-type} SHARED
- glean: used to drive ARP/ND for packets destined to a local sub-net. 'glean' mean use the packet's destination address as the target address in the ARP packet. UNSHARED. Only one per-interface.
- midchain: a nighbour adj on a virtual/tunnel interface.
- rewrite: an adj with no key, but with a rewrite string.
The API to create and update the adjacency is very sub-type specific. This is intentional as it encourages the user to carefully consider which adjacency sub-type they are really using, and hence assign it data in the appropriate sub-type space in the union of sub-types. This prevents the adj becoming a disorganised dumping group for 'my features needs a u16 somewhere' data. It is important to enforce this approach as space in the adjacency is a premium, as we need it to fit in 1 cache line.
the API is also based around an index to an ajdacency not a raw pointer. This is so the user doesn't suffer the same limp inducing firearm injuries that the author suffered as the adjacenices can realloc.
Take a reference counting lock on the adjacency
Definition at line 189 of file adj.c.
Release a reference counting lock on the adjacency.
Definition at line 206 of file adj.c.
Walk the Adjacencies on a given interface.
The global adjacnecy pool.
Exposed for fast/inline data-plane access
Definition at line 35 of file adj.c.
Adjacency packet counters.
Definition at line 30 of file adj.c.