PF_ROUTE: Erlang Edition
This is an erlang wrapper for the BSD's PF_ROUTE
socket.
Supported operating systems:
- MacOS (12+)
- FreeBSD (13+)
Other BSD will be added later down the road.
OTP 23+ is required (it uses the socket
module) and if you want to alter the routing table, you'll need to run erlang as root.
Current status: should be able to decode all of the messages sent over the socket. Some types of messages still need testing.
It cannot send requests over the socket for now, but that should happen soon.
Usage
You can subscribe to PF_ROUTE
messages using a gen_event
handler.
pf_route:add_handler(my_handler, [args]).
pf_route:delete_handler(my_handler, shutdown_args).