1.\" $OpenBSD: portmap.8,v 1.7 2007/05/31 19:20:27 jmc Exp $ 2.\" 3.\" Copyright (c) 1987 Sun Microsystems 4.\" Copyright (c) 1990, 1991 The Regents of the University of California. 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. Neither the name of the University nor the names of its contributors 16.\" may be used to endorse or promote products derived from this software 17.\" without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" from: @(#)portmap.8 5.3 (Berkeley) 3/16/91 32.\" 33.Dd $Mdocdate: May 31 2007 $ 34.Dt PORTMAP 8 35.Os 36.Sh NAME 37.Nm portmap 38.Nd 39.Tn DARPA 40port to 41.Tn RPC 42program number mapper 43.Sh SYNOPSIS 44.Nm portmap 45.Op Fl d 46.Sh DESCRIPTION 47.Nm portmap 48is a server that converts 49.Tn RPC 50program numbers into 51.Tn DARPA 52protocol port numbers. 53It must be running in order to make 54.Tn RPC 55calls. 56.Pp 57When an 58.Tn RPC 59server is started, it will tell 60.Nm portmap 61what port number it is listening to, and what 62.Tn RPC 63program numbers it is prepared to serve. 64When a client wishes to make an 65.Tn RPC 66call to a given program number, 67it will first contact 68.Nm portmap 69on the server machine to determine 70the port number where 71.Tn RPC 72packets should be sent. 73.Pp 74.Nm portmap 75must be started before any 76.Tn RPC 77servers are invoked. 78.Pp 79Normally 80.Nm portmap 81forks and dissociates itself from the terminal 82like any other daemon. 83.Nm portmap 84then logs errors using 85.Xr syslog 3 . 86.Pp 87Option available: 88.Bl -tag -width Ds 89.It Fl d 90(debug) prevents 91.Nm portmap 92from running as a daemon, 93and causes errors and debugging information 94to be printed to the standard error output. 95.El 96.Sh SEE ALSO 97.Xr inetd.conf 5 , 98.Xr inetd 8 , 99.Xr rpcinfo 8 100.Sh HISTORY 101The 102.Nm 103command appeared in 104.Bx 4.3 . 105.Sh BUGS 106If 107.Nm portmap 108crashes, all servers must be restarted. 109