Dissecting OpenBSD's divert(4)
lteo.net
lteo.net
You can select packets to be sent to userspace with the "-j QUEUE" iptables target handler, and then read those packets using libnetfilter.
Anyone have any idea of the performance overhead? (Not that it really matters for me, just curious)