diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-18 10:47:35 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-18 10:47:35 +0000 |
commit | 2aff867b912a01da627f87bed28384b9ee2e2765 (patch) | |
tree | 637790c80de9f5a81226dc4265aac7a6144efc61 /share/man/man9 | |
parent | 5721fd177e5eed07c78ba3af33aa92587162bc05 (diff) |
Rename rt_gettable() into rtable_get(), swap its arguments to be
coherent with the existing rtable_* functions and document it.
While here fix some other manpage glitches pointed out by jmc@.
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/Makefile | 6 | ||||
-rw-r--r-- | share/man/man9/rtable_add.9 | 37 |
2 files changed, 26 insertions, 17 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index dbc139654ca..1531267b983 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.203 2014/03/18 09:01:11 mpi Exp $ +# $OpenBSD: Makefile,v 1.204 2014/03/18 10:47:34 mpi Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -315,8 +315,8 @@ MLINKS+=route.9 rt_lookup.9 route.9 rtalloc.9 \ route.9 rtfree.9 route.9 rtrequest1.9 \ route.9 rt_setgate.9 route.9 rtredirect.9 \ route.9 rtdeletemsg.9 -MLINKS+=rtable_add.9 rtable_exists.9 rtable_add.9 rtable_l2.9 \ - rtable_add.9 rtable_l2set.9 rtable_add.9 rt_gettable.9 +MLINKS+=rtable_add.9 rtable_exists.9 rtable_add.9 rtable_get.9 \ + rtable_add.9 rtable_l2.9 rtable_add.9 rtable_l2set.9 MLINKS+=rt_timer_add.9 rt_timer_queue_create.9 \ rt_timer_add.9 rt_timer_queue_change.9 \ rt_timer_add.9 rt_timer_queue_destroy.9 \ diff --git a/share/man/man9/rtable_add.9 b/share/man/man9/rtable_add.9 index c38a4edcc0f..4562d32652e 100644 --- a/share/man/man9/rtable_add.9 +++ b/share/man/man9/rtable_add.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rtable_add.9,v 1.1 2014/03/18 09:01:11 mpi Exp $ +.\" $OpenBSD: rtable_add.9,v 1.2 2014/03/18 10:47:34 mpi Exp $ .\" .\" Copyright (c) 2011 Bret S. Lambert <blambert@openbsd.org> .\" All rights reserved. @@ -21,6 +21,7 @@ .Sh NAME .Nm rtable_add , .Nm rtable_exists , +.Nm rtable_get , .Nm rtable_l2 , .Nm rtable_l2set .Nd routing tables and routing domains interface @@ -30,39 +31,47 @@ .Fn rtable_add "u_int id" .Ft int .Fn rtable_exists "u_int id" +.Ft struct radix_node_head * +.Fn rttable_get "u_int id" "sa_family_t af" .Ft u_int .Fn rtable_l2 "u_int id" .Ft void -.Fn rtable_l2set "u_int id" "u_int parent" -.Ft struct radix_node_head * -.Fn rt_gettable "sa_family_t af" "u_int id" +.Fn rtable_l2set "u_int id" "u_int rdomain" .Sh DESCRIPTION Routing tables contain layer 2 and 3 forwarding information. Each address family in use will have its own routing table. Routing domains are a way of logically segmenting a router among multiple networks and may contain more than one routing table. .Bl -tag -width Ds +.It Fn rtable_add "u_int id" +Add routing table with ID of +.Fa id +to routing domain +.Fa 0 . .It Fn rtable_exists "u_int id" Return .Fa 1 -if table with ID +if routing table with ID .Fa id exists, .Fa 0 otherwise. -.It Fn rtable_add "u_int id" -Add table with ID of +.It Fn rtable_get "u_int id" "sa_family_t af" +Return the root node for the family +.Fa af +of the routing table with ID of .Fa id -to routing domain -.Fa 0 . +if it exists, +.Fa NULL +otherwise. .It Fn rtable_l2 "u_int id" -Get the routing domain of table with ID of +Get the routing domain of routing table with ID of .Fa id . -.It Fn rtable_l2set "u_int id" "u_int parent" -Place table with ID of +.It Fn rtable_l2set "u_int id" "u_int rdomain" +Place routing table with ID of .Fa id under the routing domain with ID of -.Fa parent . +.Fa rdomain . .El .Sh RETURN VALUES .Fn rtable_add @@ -70,7 +79,7 @@ may fail with: .Pp .Bl -tag -width Er -compact .It Bq Er EEXIST -A table with ID of +A routing table with ID of .Fa id already exists. .It Bq Er ENOMEM |