After claudio helped me with some details, here's the first round of improvements.
SO_TABLE is not applicable to AF_ROUTE, ROUTE_TABLEFILTER works across all families and goes well in line with the other ROUTE_* macros. While here, document RTABLE_ANY and mention rtable(4). OK? Index: route.4 =================================================================== RCS file: /cvs/src/share/man/man4/route.4,v retrieving revision 1.49 diff -u -p -r1.49 route.4 --- route.4 2 Apr 2019 14:12:09 -0000 1.49 +++ route.4 3 Apr 2019 07:52:39 -0000 @@ -194,8 +194,16 @@ by doing a system call for further input. .Pp A process can specify an alternate routing table by using the -.Dv SO_RTABLE +.Dv ROUTE_TABLEFILTER .Xr setsockopt 2 . +For example, to receive messsags for all routing tables: +.Bd -literal -offset indent +unsigned int rdomain = RTABLE_ANY; + +if (setsockopt(routefd, AF_ROUTE, ROUTE_TABLEFILTER, + &rdomain, sizeof(rdomain)) == -1) + err(1, "setsockopt(ROUTE_TABLEFILTER)"); +.Ed .Pp A process can specify which route message types it's interested in by using @@ -469,6 +477,7 @@ Specifiers for which addresses are prese .Xr netstat 1 , .Xr socket 2 , .Xr sysctl 2 , +.Xr rtable 4 , .Xr mygate 5 , .Xr route 8 , .Xr route 9