]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - hunt/huntd/huntd.6
cgram: rename local functions
[bsdgames-darwin.git] / hunt / huntd / huntd.6
1 .\" $NetBSD: huntd.6,v 1.12 2014/03/30 01:44:37 dholland Exp $
2 .\"
3 .\" huntd
4 .\"
5 .\" Copyright (c) 1983-2003, Regents of the University of California.
6 .\" All rights reserved.
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions are
10 .\" met:
11 .\"
12 .\" + Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" + Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
17 .\" + Neither the name of the University of California, San Francisco nor
18 .\" the names of its contributors may be used to endorse or promote
19 .\" products derived from this software without specific prior written
20 .\" permission.
21 .\"
22 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
23 .\" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25 .\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 .\"
34 .Dd March 29, 2014
35 .Dt HUNTD 6
36 .Os
37 .Sh NAME
38 .Nm huntd
39 .Nd hunt daemon, back-end for hunt game
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl s
43 .Op Fl p Ar address
44 .Sh DESCRIPTION
45 .Nm
46 controls the multi-player
47 .Xr hunt 6
48 game.
49 .Pp
50 The
51 .Fl s
52 option is for running
53 .Nm
54 forever (server mode).
55 This is similar to running it under the control of
56 .Xr inetd 8
57 (see below), but it consumes a process table entry when no one is playing.
58 .Pp
59 The
60 .Fl p
61 option can be either a pathname, in which case a local socket by that
62 name is used for the game, or a number, in which case it selects an
63 alternate port number for the internet socket used for the game.
64 This allows for private games of hunt.
65 .Ss INETD
66 To run
67 .Nm
68 from
69 .Xr inetd 8 ,
70 you'll need to
71 .\"put the
72 .\".Nm hunt
73 .\"service in
74 .\".Pa /etc/services :
75 .\".Bd -literal
76 .\"hunt 26740/udp # multi-player/multi-host mazewars
77 .\".Ed
78 .\"and
79 uncomment the following line in
80 .Pa /etc/inetd.conf :
81 .Bd -literal -offset indent -compact
82 hunt dgram udp wait nobody /usr/games/huntd huntd
83 .Ed
84 Do not use any of the command line options; if you want
85 .Xr inetd 8
86 to start up
87 .Nm
88 on a private port, change the port listed for
89 .Nm hunt
90 in
91 .Pa /etc/services .
92 .Sh NETWORK RENDEZVOUS
93 When
94 .Xr hunt 6
95 starts up, it broadcasts on the local area net
96 (using the broadcast address for each interface) to find a
97 .Nm hunt
98 game in progress.
99 If a
100 .Nm
101 hears the request, it sends back the port number for the
102 .Nm hunt
103 process to connect to.
104 Otherwise, the
105 .Nm hunt
106 process starts up a
107 .Nm
108 on the local machine and tries to rendezvous with it.
109 .Sh SEE ALSO
110 .Xr sendmail 1 ,
111 .Xr hunt 6
112 .Sh AUTHORS
113 Conrad Huang, Ken Arnold, and Greg Couch;
114 .br
115 University of California, San Francisco, Computer Graphics Lab