HomeFreeBSD

Add rib subscription API.

Description

Add rib subscription API.

Currently there is no easy way of subscribing for the routing table changes.
The only existing way is to set ifa_rtrequest callback in the each protocol
ifaddr, which is not convenient or extandable.

This change provides generic notification subscription mechanism, that will
replace current ifa_rtrequest one and allow other applications such as
accelerated routing lookup modules subscribe for the changes.

In particular, this change provides 2 hooks: 1) synchronous one
(RIB_NOTIFY_IMMEDIATE), called under RIB_WLOCK, which ensures exact
ordering of the changes and 2) async one, (RIB_NOTIFY_DELAYED)
that is called after the change w/o holding locks. The latter one does not
provide any notification ordering guarantee.

Differential Revision: https://reviews.freebsd.org/D25070

Details

Provenance
melifaroAuthored on
Differential Revision
D25070: Add rib subscription API.
Parents
rS361707: Finish r361706: add sys/net/route/route_ctl.h, missed in previous commit.
Branches
Unknown
Tags
Unknown