freebsd-dev/sys
Alexander V. Chernikov 7e5bf68495 netlink: add netlink support
Netlinks is a communication protocol currently used in Linux kernel to modify,
 read and subscribe for nearly all networking state. Interfaces, addresses, routes,
 firewall, fibs, vnets, etc are controlled via netlink.
It is async, TLV-based protocol, providing 1-1 and 1-many communications.

The current implementation supports the subset of NETLINK_ROUTE
family. To be more specific, the following is supported:
* Dumps:
 - routes
 - nexthops / nexthop groups
 - interfaces
 - interface addresses
 - neighbors (arp/ndp)
* Notifications:
 - interface arrival/departure
 - interface address arrival/departure
 - route addition/deletion
* Modifications:
 - adding/deleting routes
 - adding/deleting nexthops/nexthops groups
 - adding/deleting neghbors
 - adding/deleting interfaces (basic support only)
* Rtsock interaction
 - route events are bridged both ways

The implementation also supports the NETLINK_GENERIC family framework.

Implementation notes:
Netlink is implemented via loadable/unloadable kernel module,
 not touching many kernel parts.
Each netlink socket uses dedicated taskqueue to support async operations
 that can sleep, such as interface creation. All message processing is
 performed within these taskqueues.

Compatibility:
Most of the Netlink data models specified above maps to FreeBSD concepts
 nicely. Unmodified ip(8) binary correctly works with
interfaces, addresses, routes, nexthops and nexthop groups. Some
software such as net/bird require header-only modifications to compile
and work with FreeBSD netlink.

Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D36002
MFC after:	2 months
2022-10-01 14:15:35 +00:00
..
amd64 pmap: optimize MADV_WILLNEED on existing superpages 2022-09-30 12:14:05 -05:00
arm Teach the GICv3 driver to translate memory ranges 2022-09-23 15:28:45 +01:00
arm64 Set denominator to 1 if it is 0 in the init phase. 2022-10-01 02:01:59 +00:00
bsm
cam cam: Provide compatibility for CAMGETPASSTHRU for periph drivers 2022-09-29 13:14:57 -04:00
cddl opensolaris: Delete unused sources 2022-09-29 08:34:29 -04:00
compat Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
conf arm64: coresight: fix the build without FDT 2022-09-29 14:33:33 -05:00
contrib zlib crc32: Add prototypes for recently-added static functions. 2022-09-28 14:00:27 -07:00
crypto Fix the IV length in the armv8 AES GCM code 2022-09-06 13:11:04 +01:00
ddb Adjust db_flush_line() definition to avoid clang 15 warning 2022-07-19 20:37:15 +02:00
dev uart: Remove sbbc reference 2022-09-30 18:26:45 -06:00
dts
fs nfsclient: access v_mount only after the vnode is locked 2022-09-27 23:00:51 +03:00
gdb ddb: use _FLAGS command macros where appropriate 2022-07-05 11:56:55 -03:00
geom Adjust g_waitidle() visibility and definition 2022-08-02 21:11:10 +03:00
gnu
i386 kmem_malloc/free: Use void * instead of vm_offset_t for kernel pointers. 2022-09-22 15:09:19 -07:00
isa Adjust function definition in isa's pnp.c to avoid clang 15 warning 2022-07-27 21:13:59 +02:00
kern unix/dgram: don't leak file descriptors when socket write failed 2022-09-30 13:43:08 -07:00
kgssapi
libkern Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
modules netlink: add netlink support 2022-10-01 14:15:35 +00:00
net netlink: add netlink support 2022-10-01 14:15:35 +00:00
net80211 net80211: move IEEE80211_F_WME check to vap for consistency 2022-09-29 12:54:23 +00:00
netgraph Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
netinet Tcp progress timeout 2022-09-27 13:38:20 -04:00
netinet6 netinet6: factor interface addition code to the dedicated function 2022-09-27 13:23:34 +00:00
netipsec protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
netlink netlink: add netlink support 2022-10-01 14:15:35 +00:00
netpfil ipfilter: Cast uintmax_t values to size_t when adding to a pointer. 2022-09-28 13:58:34 -07:00
netsmb
nfs nfs: skip bootpc when vfs.root.mountfrom is other than nfs 2022-05-31 16:07:27 -03:00
nfsclient
nfsserver
nlm
ofed ibcore: The use of IN_LOOPBACK() now requires a valid VNET context. 2022-09-23 13:42:03 +02:00
opencrypto opencrypto: mark INVARIANTS variables as __diagused 2022-08-10 15:35:29 -04:00
powerpc kmem_malloc/free: Use void * instead of vm_offset_t for kernel pointers. 2022-09-22 15:09:19 -07:00
riscv riscv: Handle invalid L2 entries in pmap_extract() 2022-09-29 13:11:26 -04:00
rpc nfsd: Allow multiple instances of rpc.tlsservd 2022-08-22 13:54:24 -07:00
security vfs: introduce V_PCATCH to stop abusing PCATCH 2022-09-17 15:41:37 +00:00
sys Bump __FreeBSD_version for qsort_r prototype change. 2022-09-30 15:31:13 -07:00
teken
tests
tools sound(4): Fix order of parameters for custom equalizer band pass filter. 2022-08-22 10:04:26 +02:00
ufs Fix an incorrectly placed parenthesis. 2022-09-29 01:45:41 -07:00
vm kmem_malloc/free: Use void * instead of vm_offset_t for kernel pointers. 2022-09-22 15:09:19 -07:00
x86 kmem_malloc/free: Use void * instead of vm_offset_t for kernel pointers. 2022-09-22 15:09:19 -07:00
xdr
xen xenbus: improve device tracking 2022-06-07 12:29:53 +02:00
Makefile