freebsd-src/share
Mark Johnston bf454ca88b wg: Add netmap support
When in netmap (emulated) mode, wireguard interfaces prepend or strip a
dummy ethernet header when interfacing with netmap.  The netmap
application thus sees unencrypted, de-encapsulated frames with a fixed
header.

In this mode, netmap hooks the if_input and if_transmit routines of the
ifnet.  Packets from the host TX ring are handled by wg_if_input(),
which simply hands them to the netisr layer; packets which would
otherwise be tunneled are intercepted in wg_output() and placed in the
host RX ring.

The "physical" TX ring is processed by wg_transmit(), which behaves
identically to wg_output() when netmap is not enabled, and packets
appear in the "physical" RX ring by hooking wg_deliver_in().

Reviewed by:	vmaffione
MFC after:	1 month
Sponsored by:	Klara, Inc.
Sponsored by:	Zenarmor
Differential Revision:	https://reviews.freebsd.org/D43460
2024-04-20 12:04:42 -04:00
..
colldef Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
colldef_unicode Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ctypedef Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
dict share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
doc Grammar fix in share/doc/IPv6/IMPLEMENTATION 2024-02-13 15:16:01 +08:00
dtrace libdtrace: decode all tcp header flags and add 2023-12-31 15:02:03 +01:00
examples share/examples/sound: Fix spelling "controller" 2024-02-13 14:18:04 +08:00
i18n Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
keys Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
man wg: Add netmap support 2024-04-20 12:04:42 -04:00
misc organization.dot: Fix typos 2024-04-18 22:02:55 +02:00
mk Update sys.dirdeps.mk set default DEP_* 2024-04-18 14:07:24 -07:00
monetdef Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
monetdef_unicode Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
msgdef msgdef: fix NO and SI locales 2023-09-21 12:54:21 +02:00
msgdef_unicode Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
numericdef Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
numericdef_unicode Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
security Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
sendmail Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
skel dot.profile: handle symlinked $HOME 2024-02-13 13:24:22 -05:00
snmp Remove $FreeBSD$: two-line lua tag 2023-08-16 11:55:30 -06:00
syscons Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
tabset share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
termcap share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
tests Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
timedef Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
vt Trim various $FreeBSD$ 2023-10-10 10:34:43 -07:00
zoneinfo Fix share/zoneinfo for DIRDEPS_BUILD 2023-11-20 12:52:43 -08:00
Makefile share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
Makefile.inc share: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00