On Wed, Apr 03, 2019 at 09:53:46AM +0200, Klemens Nanni wrote:
> While here, document RTABLE_ANY and mention rtable(4).
Improved versiono that uses 5 as example and marks up RTABLE_ANY inline
instead, making it searchable with `man -k .=RTABLE_ANY'.

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 08:18:43 -0000
@@ -194,8 +194,19 @@ 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 .
+A value of
+.Dv RTABLE_ANY
+specifies all routing tables.
+For example, to receive messsags for routing table 5:
+.Bd -literal -offset indent
+unsigned int rdomain = 5;
+
+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 +480,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

Reply via email to