diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2007-01-01 20:11:18 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2007-01-01 20:11:18 +0000 |
commit | f45393d5c9610388e796af505b7b0778b7aea35d (patch) | |
tree | 4d5118556aefaea2cccb6a2323b6ce1bf3a27f7e /sbin | |
parent | 242be1357f454640b2fa4736a4858de07136489f (diff) |
- merge first two synopses
- standard options list
- sync usage()
started by a diff from stevesk;
usage() help from dlg;
ok reyk;
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/brconfig/brconfig.8 | 42 | ||||
-rw-r--r-- | sbin/brconfig/brconfig.c | 11 |
2 files changed, 26 insertions, 27 deletions
diff --git a/sbin/brconfig/brconfig.8 b/sbin/brconfig/brconfig.8 index cd2229925a0..248f7073169 100644 --- a/sbin/brconfig/brconfig.8 +++ b/sbin/brconfig/brconfig.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: brconfig.8,v 1.63 2006/12/24 19:05:25 reyk Exp $ +.\" $OpenBSD: brconfig.8,v 1.64 2007/01/01 20:11:17 jmc Exp $ .\" .\" Copyright (c) 1999-2001 Jason L. Wright (jason@thought.net) .\" All rights reserved. @@ -33,14 +33,13 @@ .Sh SYNOPSIS .Nm .Op Fl Aa -.Nm -.Ar bridge-name +.Op Ar interface .Op Ar parameters .Nm -.Ar bridge-name Cm rule No { +.Ar interface Cm rule No { .Cm block | pass No } { .Cm in | out | in/out No } Cm on -.Ar interface-name +.Ar interface .Op Cm src Ar address .Op Cm dst Ar address .Op Cm tag Ar tagname @@ -59,27 +58,22 @@ segment and to provide a transparent filter for .Xr ip 4 datagrams. .Pp -In the first synopsis, invoking -.Nm -with no arguments, or with the -.Fl a -or -.Fl A -flag, will list the status of all bridges in the system. -The -.Fl A -flag will also list additional status information. -In the second, its command line consists -of the name of a bridge and a set of operations to be -performed on that bridge. -The commands are executed in the order they were specified. -If no command is specified in the second synopsis, the +The options are as follows: +.Bl -tag -width Ds +.It Fl A +The same as +.Fl a , +but also lists additional status information. +.It Fl a +Lists the status of all bridges in the system. +This is the default if .Nm -will display full status information about the bridge. -With the third synopsis, rules for filtering Ethernet MAC addresses can -be added to a bridge. +is invoked without arguments. +.El .Pp -The following parameters may be set with +The following +.Ar parameters +may be set with .Nm : .Bl -tag -width Ds .It Cm up diff --git a/sbin/brconfig/brconfig.c b/sbin/brconfig/brconfig.c index 5509e31a60d..573a1a40ffb 100644 --- a/sbin/brconfig/brconfig.c +++ b/sbin/brconfig/brconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brconfig.c,v 1.41 2006/12/31 10:44:52 jmc Exp $ */ +/* $OpenBSD: brconfig.c,v 1.42 2007/01/01 20:11:17 jmc Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -129,9 +129,14 @@ char *stproles[] = { void usage(void) { - fprintf(stderr, "usage: brconfig [-Aa]\n"); + extern char *__progname; + fprintf(stderr, "usage: %s [-Aa] [interface] [parameters]\n", + __progname); fprintf(stderr, - " brconfig interface [up] [down] [add if] [del if] ...\n"); + " %s interface rule { block | pass } " + "{ in | out | in/out } on\n" + "\t\tinterface [src address] [dst address] [tag tagname]\n", + __progname); } int |