http://packetstormsecurity.org/UNIX/admin/xscreensaver-3.34.tar.gz
[xscreensaver] / hacks / sonar.man
1 .de EX          \"Begin example
2 .ne 5
3 .if n .sp 1
4 .if t .sp .5
5 .nf
6 .in +.5i
7 ..
8 .de EE
9 .fi
10 .in -.5i
11 .if n .sp 1
12 .if t .sp .5
13 ..
14 .TH Sonar 1 "3-Nov-98" "X Version 11"
15 .SH NAME
16 sonar - display a sonar scope
17 .SH SYNOPSIS
18 .B sonar
19 [\-ping \fIhosts-or-subnets\fP]
20 [\-background \fIcolor\fP]
21 [\-sweep\-color \fIcolor\fP]
22 [\-low\-color \fIcolor\fP] 
23 [\-scope\-color \fIcolor\fP]
24 [\-grid\-color \fIcolor\fP]
25 [\-text\-color \fIcolor\fP]
26 [\-ttl \fIinteger\fP]
27 [\-font \fIfont\fP]
28 [\-ping\-timeout \fIint\fP]
29 [\-team-a-name \fIstring\fP] 
30 [\-team-b-name \fIstring\fP]
31 [\-team-a-count \fIint\fP]
32 [\-team-b-count \fIint\fP]
33 [\-debug] 
34 .SH DESCRIPTION
35 The \fIsonar\fP program displays a sonar scope on the computer's screen.
36 This scope polls a sensor as the sweep goes around the scope and displays
37 what it finds as bogies on the screen.  The program is designed to support
38 different modes representing different types of sensors.  Currently the
39 only implemented sensors are a simulator, and a network ping function that
40 pings hosts and plots the results on the scope.
41 .SH OPTIONS
42 .I sonar
43 understands the following options:
44 .TP 8
45 .B \-background \fIColor\fP
46 The background Color of the screen not covered by the scope.
47 .TP 8
48 .B \-sweep\-color \fIColor\fP
49 The color of the brightest part of the sweep.
50 .TP 8
51 .B \-scope\-color \fIColor\fP
52 The color of the circular part of the scope.
53 .TP 8
54 .B \-grid\-color \fIColor\fP
55 The color to the grid lines overlaying the scope.
56 .TP 8
57 .B \-text\-color \fIColor\fP
58 The color of the text identifying bogies on the scope.
59 .TP 8
60 .B \-ttl \fIinteger\fP
61 "Time to live": visible time of a Bogie. Try values between 10 (very short)
62 and 100. 
63 .TP 8
64 .B \-font \fIfont\fP
65 The font used to display text on the scope.  Default "fixed".
66 .TP 8
67 .B \-ping\-timeout \fIint\fP
68 The amount of time in milliseconds the program will wait for an answer
69 to a ping.
70 .TP 8
71 .B \-ping \fIhosts-or-subnets\fP
72 The list of things to ping, separated by commas or spaces. 
73 Elements of this list may be:
74 .RS 8
75 .TP 12
76 .B simulation
77 to run in simulation mode, instead of pinging real hosts (this is the default
78 if the program is not installed setuid);
79 .TP 12
80 .I hostname
81 to ping the given host;
82 .TP 12
83 .I A.B.C.D
84 to ping the given IP address;
85 .TP 12
86 .B subnet
87 to ping the local class C subnet (the nearest 255 addresses);
88 .TP 12
89 .B subnet/\fINN\fP
90 to ping a different-sized local subnet: e.g., \fBsubnet/28\fP would ping
91 a 4-bit subnet (the nearest 15 addresses);
92 .TP 12
93 .I A.B.C.D/NN
94 to ping an arbitrary other subnet: the IP address specifies the base address,
95 and the part after the slash is how wide the subnet is.  Typical values
96 are /24 (for 255 addresses) and /28 (for 15 addresses.)
97 .TP 12
98 .I filename
99 to ping the hosts listed in the given file.  This file can be in the
100 format used by \fI/etc/hosts\fP, or it can be any file that has host
101 names as the first element on each line.  If you use ssh, try this:
102
103   sonar -ping $HOME/.ssh/known_hosts
104 .RE
105 .TP 8
106 .B \-team-a-name \fIstring\fP
107 In simulation mode, the name of team A.
108 .TP 8
109 .B \-team-b-name \fIstring\fP
110 In simulation mode, the name of team B.
111 .TP 8
112 .B \-team-a-count \fIint\fP
113 In simulation mode, the number of bogies on team A.
114 .TP 8
115 .B \-team-b-count \fIint\fP
116 In simulation mode, the number of bogies on team B.
117 .SH RESOURCES
118 Configuration of the targets to ping is best done by setting X Resources.
119 .PP
120 .TP 8
121 .B background \fI(Color)\fP
122 See option \-background, above; default value is \fIblack\fP.
123 .TP 8
124 .B sweepColor \fI(Color)\fP
125 See option \-sweep\-color, above; default value is \fI#00ff00\fP.
126 .TP 8
127 .B scopeColor \fI(Color)\fP
128 See option \-scope\-color, above; default value is \fI#003300\fP.
129 .TP 8
130 .B gridColor \fI(Color)\fP
131 See option \-grid\-color, above; default value is \fI#00aa00\fP.
132 .TP 8
133 .B textColor \fI(Color)\fP
134 See option \-text\-color, above; default value is \fI#ffff00\fP.
135 .TP 8
136 .B ttl \fI(integer)\fP
137 See option \-ttl, above; default value is \fI90\fP or one sweep.
138 .TP 8
139 .B ping \fI(string)\fP
140 See option \-ping, above.  If set to \fBdefault\fP, it will ping
141 the contents of /etc/hosts if possible, otherwise, will run in
142 simulation-mode.
143 .TP 8
144 .B font \fI(font)\fP
145 See option \-font, above; default value is \fIfixed\fP.
146 .TP 8
147 .B pingTimeout \fI(Integer)\fP
148 See option \-pingtimeout, above; default value is 3000.
149 .TP 8
150 .B teamAName \fIstring\fP
151 See option \-team\-a\-name, above.  Default value is \fBF18\fP.
152 .TP 8
153 .B teamBName \fIstring\fP
154 See option \-teamBName, above.  Default value is \fBMIG\fP.
155 .TP 8
156 .B teamACount \fIint\fP
157 See option \-teamACount, above.  Default value is 4.
158 .TP 8
159 .B teamBCount \fIint\fP
160 See option \-teamBCount, above.  Default value is 4.
161 .SH NOTES
162 In order to use the ping sensor, this program must be installed as 
163 setuid root, so that it can create an ICMP socket.  Root privileges
164 are disavowed shortly after startup (just after connecting to the
165 X server and reading the resource database) so this is \fIbelieved\fP
166 to be a safe thing to do, but it is usually recommended that you 
167 have as few setuid programs around as possible, on general principles.
168 .EX
169 chown root.root sonar
170 chmod u+s sonar
171 .EE
172 .SH SEE ALSO
173 .BR X (1),
174 .BR xscreensaver (1),
175 .BR ping (8)
176 .SH COPYRIGHT
177 Copyright \(co 1998 by Stephen Martin. (smartin@canada.com)
178
179 Permission to use, copy, modify, distribute, and sell this software and its
180 documentation for any purpose is hereby granted without fee, provided that
181 the above copyright notice appear in all copies and that both that
182 copyright notice and this permission notice appear in supporting
183 documentation.  No representations are made about the suitability of this
184 software for any purpose.  It is provided "as is" without express or 
185 implied warranty.
186
187 .SH AUTHORS
188 Stephen Martin <smartin@canada.com>, 3-nov-98.
189
190 Thanks to Tom Kelly for suggesting a modular approach to the sensor
191 amoung other things.
192
193 Thomas Bahls <thommy@cs.tu-berlin.de> hacked the "ttl" option, 12-jul-98.
194
195 Better subnet support and command-line processing by Jamie Zawinski, 17-Jul-00.