freebsd-dev/share/examples
Gleb Smirnoff 8624f4347e divert: declare PF_DIVERT domain and stop abusing PF_INET
The divert(4) is not a protocol of IPv4.  It is a socket to
intercept packets from ipfw(4) to userland and re-inject them
back.  It can divert and re-inject IPv4 and IPv6 packets today,
but potentially it is not limited to these two protocols.  The
IPPROTO_DIVERT does not belong to known IP protocols, it
doesn't even fit into u_char.  I guess, the implementation of
divert(4) was done the way it is done basically because it was
easier to do it this way, back when protocols for sockets were
intertwined with IP protocols and domains were statically
compiled in.

Moving divert(4) out of inetsw accomplished two important things:

1) IPDIVERT is getting much closer to be not dependent on INET.
   This will be finalized in following changes.
2) Now divert socket no longer aliases with raw IPv4 socket.
   Domain/proto selection code won't need a hack for SOCK_RAW and
   multiple entries in inetsw implementing different flavors of
   raw socket can merge into one without requirement of raw IPv4
   being the last member of dom_protosw.

Differential revision:	https://reviews.freebsd.org/D36379
2022-08-30 15:09:21 -07:00
..
bhyve Remove a space I missed in previous commit 2021-01-04 14:53:57 +00:00
bootforth
BSD_daemon
csh
diskless
drivers
etc make.conf: Fix a typo in the example file 2022-06-04 12:24:17 +02:00
find_interface
flua jail(3lua): add a jail.list() method 2021-09-30 16:30:57 -05:00
FreeBSD_version
hast
hwpmc
indent
ipfilter ipfilter: Adjust example returns to conform to style(9) 2022-01-03 18:06:43 -08:00
ipfw -F is GNU diff specific, not implemented in BSD diff. 2020-03-18 08:00:46 +00:00
IPv6 update external URL 2022-02-05 19:23:51 +00:00
jails add ability to set watchdog timeout for a shutdown 2019-10-03 11:23:10 +00:00
kld Fix syscall kld example 2021-06-09 12:24:26 +02:00
libifconfig libifconfig: Overhaul ifconfig_media_* interfaces 2021-03-05 04:15:55 -05:00
libusb20
libvgl
mdoc Remove misleading macros from -width arguments 2020-12-28 16:30:55 +01:00
netgraph divert: declare PF_DIVERT domain and stop abusing PF_INET 2022-08-30 15:09:21 -07:00
perfmon
pf
ppi
ppp
printing
scsi_target
ses ses: Correct spelling of "Temperature Sensor" 2021-09-02 14:38:06 -06:00
smbfs pkgbase: Remove the last users of the FreeBSD-example package 2020-08-04 14:48:45 +00:00
sound sound: Add an example of basic sound application 2021-08-04 18:11:54 +08:00
sunrpc
tests Update the spelling of my name 2019-04-22 17:52:46 +00:00
uefisign
witness
ypldap
Makefile sound: Add an example of basic sound application 2021-08-04 18:11:54 +08:00
Makefile.depend