DIVERT(4) - Device Drivers Manual
DIVERT(4) - Device Drivers Manual # DIVERT(4) - Device Drivers Manual NAME # divert - kernel packet diversion mechanism SYNOPSIS # #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> int socket(AF_INET, SOCK_RAW, IPPROTO_DIVERT); int socket(AF_INET6, SOCK_RAW, IPPROTO_DIVERT); DESCRIPTION # Divert sockets are part of a mechanism completely integrated with pf(4) that queues raw packets from the kernel stack to userspace applications, and vice versa. A divert socket must be bound to a divert port through bind(2), which only the superuser can do. ...