From owner-freebsd-bugs Sun Jan 3 18:00:08 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA08426 for freebsd-bugs-outgoing; Sun, 3 Jan 1999 18:00:08 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA08418 for ; Sun, 3 Jan 1999 18:00:07 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id SAA29574; Sun, 3 Jan 1999 18:00:01 -0800 (PST) Received: from mortis.futuresouth.com (mortis.futuresouth.com [209.45.228.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA08352 for ; Sun, 3 Jan 1999 17:59:37 -0800 (PST) (envelope-from fullermd@mortis.futuresouth.com) Received: (from fullermd@localhost) by mortis.futuresouth.com (8.8.8/8.8.5) id TAA23631; Sun, 3 Jan 1999 19:59:07 -0600 (CST) Message-Id: <199901040159.TAA23631@mortis.futuresouth.com> Date: Sun, 3 Jan 1999 19:59:07 -0600 (CST) From: fullermd@futuresouth.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/9301: Listen option to rwhod(8) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 9301 >Category: bin >Synopsis: Listen option to rwhod(8) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 3 18:00:00 PST 1999 >Closed-Date: >Last-Modified: >Originator: Matthew Fuller >Release: FreeBSD 2.2.8-STABLE i386 >Organization: >Environment: Made against HEAD (r1.8) but should apply seamlessly to RELENG_2_2 (if someone wants to stick it back there for some reason) >Description: Add a -l option to rwhod for listen-only mode; doesn't broadcast information, but allows you to monitor the other machines silently. Man page also updated. >How-To-Repeat: >Fix: Index: rwhod.8 =================================================================== RCS file: /usr/cvs/src/usr.sbin/rwhod/rwhod.8,v retrieving revision 1.8 diff -u -r1.8 rwhod.8 --- rwhod.8 1998/12/17 11:05:57 1.8 +++ rwhod.8 1999/01/04 01:21:59 @@ -40,6 +40,7 @@ .Sh SYNOPSIS .Nm rwhod .Op Fl i +.Op Fl l .Op Fl m Op Ar ttl .Sh DESCRIPTION .Nm Rwhod @@ -54,7 +55,9 @@ messages on a network. .Pp .Nm Rwhod -operates as both a producer and consumer of status information. +operates as both a producer and consumer of status information, +unless the -l (listen mode) option is specified, in which case +it acts as a consumer only. As a producer of information it periodically queries the state of the system and constructs status messages which are broadcasted or multicasted on a network. @@ -69,6 +72,15 @@ option enables insecure mode, which causes .Nm to ignore the source port on incoming packets. +.Pp +The +.Fl l +option enables listen mode, which causes +.Nm +to not broadcast any information. +This allows you to monitor other machines' +.Nm +information, without broadcasting your own. .Pp The .Fl m Index: rwhod.c =================================================================== RCS file: /usr/cvs/src/usr.sbin/rwhod/rwhod.c,v retrieving revision 1.8 diff -u -r1.8 rwhod.c --- rwhod.c 1998/12/17 11:05:57 1.8 +++ rwhod.c 1999/01/04 01:08:05 @@ -116,6 +116,7 @@ /* (belongs in protocols/rwhod.h) */ int insecure_mode; +int quiet_mode; int multicast_mode = NO_MULTICAST; int multicast_scope; struct sockaddr_in multicast_addr = { sizeof multicast_addr, AF_INET }; @@ -197,6 +198,8 @@ } else if (strcmp(*argv, "-i") == 0) insecure_mode = 1; + else if (strcmp(*argv, "-l") == 0) + quiet_mode = 1; else usage(); argv++, argc--; @@ -255,8 +258,10 @@ setuid(unpriv_uid); if (!configure(s)) exit(1); - signal(SIGALRM, onalrm); - onalrm(0); + if(!quiet_mode) { + signal(SIGALRM, onalrm); + onalrm(0); + } for (;;) { struct whod wd; int cc, whod, len = sizeof(from); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message