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 46controls the multi-player 47.Xr hunt 6 48game. 49.Pp 50The 51.Fl s 52option is for running 53.Nm 54forever (server mode). 55This 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 59The 60.Fl p 61option can be either a pathname, in which case a local socket by that 62name is used for the game, or a number, in which case it selects an 63alternate port number for the internet socket used for the game. 64This allows for private games of hunt. 65.Ss INETD 66To run 67.Nm 68from 69.Xr inetd 8 , 70you'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 79uncomment the following line in 80.Pa /etc/inetd.conf : 81.Bd -literal -offset indent -compact 82hunt dgram udp wait nobody /usr/games/huntd huntd 83.Ed 84Do not use any of the command line options; if you want 85.Xr inetd 8 86to start up 87.Nm 88on a private port, change the port listed for 89.Nm hunt 90in 91.Pa /etc/services . 92.Sh NETWORK RENDEZVOUS 93When 94.Xr hunt 6 95starts up, it broadcasts on the local area net 96(using the broadcast address for each interface) to find a 97.Nm hunt 98game in progress. 99If a 100.Nm 101hears the request, it sends back the port number for the 102.Nm hunt 103process to connect to. 104Otherwise, the 105.Nm hunt 106process starts up a 107.Nm 108on the local machine and tries to rendezvous with it. 109.Sh SEE ALSO 110.Xr sendmail 1 , 111.Xr hunt 6 112.Sh AUTHORS 113Conrad Huang, Ken Arnold, and Greg Couch; 114.br 115University of California, San Francisco, Computer Graphics Lab 116