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
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
FreeBSD_version
hast
hwpmc
indent
ipfilter ipfilter: Adjust example returns to conform to style(9) 2022-01-03 18:06:43 -08:00
ipfw
IPv6 update external URL 2022-02-05 19:23:51 +00:00
jails
kld
libifconfig
libusb20
libvgl
mdoc
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
smbfs
sound
sunrpc
tests
uefisign
witness
ypldap
Makefile
Makefile.depend