Merge from vendor branch GDB:
[dragonfly.git] / usr.sbin / portmap / portmap.8
1 .\" Copyright (c) 1987 Sun Microsystems
2 .\" Copyright (c) 1990, 1991, 1993
3 .\"     The Regents of the University of California.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\"    must display the following acknowledgement:
15 .\"     This product includes software developed by the University of
16 .\"     California, Berkeley and its contributors.
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\"    may be used to endorse or promote products derived from this software
19 .\"    without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\"     @(#)portmap.8   8.1 (Berkeley) 6/6/93
34 .\" $FreeBSD: src/usr.sbin/portmap/portmap.8,v 1.7.2.4 2002/04/04 11:00:38 dd Exp $
35 .\" $DragonFly: src/usr.sbin/portmap/portmap.8,v 1.2 2003/06/17 04:30:00 dillon Exp $
36 .\"
37 .Dd June 6, 1993
38 .Dt PORTMAP 8
39 .Os
40 .Sh NAME
41 .Nm portmap
42 .Nd
43 .Tn RPC
44 program,version
45 to
46 .Tn DARPA
47 port mapper
48 .Sh SYNOPSIS
49 .Nm
50 .Op Fl d
51 .Op Fl v
52 .Op Fl h Ar bindip
53 .Sh DESCRIPTION
54 .Nm Portmap
55 is a server that converts
56 .Tn RPC
57 program numbers into
58 .Tn DARPA
59 protocol port numbers.
60 It must be running in order to make
61 .Tn RPC
62 calls.
63 .Pp
64 When an
65 .Tn RPC
66 server is started, it will tell
67 .Nm
68 what port number it is listening to, and what
69 .Tn RPC
70 program numbers it is prepared to serve.
71 When a client wishes to make an
72 .Tn RPC
73 call to a given program number,
74 it will first contact
75 .Nm
76 on the server machine to determine
77 the port number where
78 .Tn RPC
79 packets should be sent.
80 .Pp
81 .Nm Portmap
82 must be started before any
83 .Tn RPC
84 servers are invoked.
85 .Pp
86 .Nm Portmap
87 uses
88 .Xr hosts_access 5
89 access control by default.
90 Access control patterns may only reference IP addresses.
91 .Pp
92 Normally
93 .Nm
94 forks and dissociates itself from the terminal
95 like any other daemon.
96 .Nm Portmap
97 then logs errors using
98 .Xr syslog 3 .
99 .Pp
100 The following options are available:
101 .Bl -tag -width indent
102 .It Fl d
103 Prevent
104 .Nm
105 from running as a daemon,
106 and causes errors and debugging information
107 to be printed to the standard error output.
108 .It Fl v
109 Enable verbose logging of access control checks.
110 .It Fl h
111 Specify specific IP addresses to bind to for UDP requests.
112 This option
113 may be specified multiple times and is typically necessary when running
114 on a multi-homed host.
115 If no
116 .Fl h
117 option is specified,
118 .Nm
119 will bind to
120 .Dv INADDR_ANY ,
121 which could lead to problems on a multi-homed host due to
122 .Nm
123 returning a UDP packet from a different IP address than it was
124 sent to.
125 Note that when specifying IP addresses with
126 .Fl h ,
127 .Nm
128 will automatically add
129 .Li 127.0.0.1
130 to the list.
131 .El
132 .Sh SEE ALSO
133 .Xr hosts_access 5 ,
134 .Xr inetd.conf 5 ,
135 .Xr inetd 8 ,
136 .Xr rpcinfo 8
137 .Sh BUGS
138 If
139 .Nm
140 crashes, all servers must be restarted.
141 .Sh HISTORY
142 The
143 .Nm
144 command appeared in
145 .Bx 4.3 .