xref: /openbsd/usr.bin/rpcinfo/rpcinfo.8 (revision f6aab3d8)
1.\"	$OpenBSD: rpcinfo.8,v 1.15 2017/07/21 02:58:51 deraadt Exp $
2.\"	from: @(#)rpcinfo.8c	2.2 88/08/03 4.0 RPCSRC; from 1.24 88/02/25 SMI
3.\"
4.\" Copyright (c) 2010, Oracle America, Inc.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions are
8.\" met:
9.\"
10.\"     * Redistributions of source code must retain the above copyright
11.\"       notice, this list of conditions and the following disclaimer.
12.\"     * Redistributions in binary form must reproduce the above
13.\"       copyright notice, this list of conditions and the following
14.\"       disclaimer in the documentation and/or other materials
15.\"       provided with the distribution.
16.\"     * Neither the name of the "Oracle America, Inc." nor the names of its
17.\"       contributors may be used to endorse or promote products derived
18.\"       from this software without specific prior written permission.
19.\"
20.\"   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21.\"   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22.\"   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23.\"   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24.\"   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25.\"   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26.\"   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
27.\"   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28.\"   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29.\"   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30.\"   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31.\"   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32.\"
33.Dd $Mdocdate: July 21 2017 $
34.Dt RPCINFO 8
35.Os
36.Sh NAME
37.Nm rpcinfo
38.Nd report RPC information
39.Sh SYNOPSIS
40.Nm rpcinfo
41.Fl b Ar program version
42.Nm rpcinfo
43.Fl d Ar program version
44.Nm rpcinfo
45.Fl p Op Ar host
46.Nm rpcinfo
47.Fl s Ar program version port
48.Nm rpcinfo
49.Op Fl n Ar portnum
50.Fl t Ar host program
51.Op Ar version
52.Nm rpcinfo
53.Op Fl n Ar portnum
54.Fl u Ar host program
55.Op Ar version
56.Sh DESCRIPTION
57.Nm
58makes an
59.Tn RPC
60call to an
61.Tn RPC
62server and reports what it finds.
63.Pp
64The options are as follows:
65.Bl -tag -width Ds
66.It Fl b
67Make an
68.Tn RPC
69broadcast to procedure 0 of the specified
70.Ar program
71and
72.Ar version
73using
74.Tn UDP
75and report all hosts that respond.
76.It Fl d
77Delete registration for the
78.Tn RPC
79service of the specified
80.Ar program
81and
82.Ar version .
83Registrations which point at ports numbered below 1024 can only be
84deleted by the superuser.
85.It Fl n Ar portnum
86Use
87.Ar portnum
88as the port number for the
89.Fl t
90and
91.Fl u
92options instead of the port number given by the portmapper.
93.It Fl p
94Probe the portmapper on
95.Ar host ,
96and print a list of all registered
97.Tn RPC
98programs.
99If
100.Ar host
101is not specified, it defaults to the value returned by
102.Xr hostname 1 .
103.It Fl s
104Create a registration for the
105.Tn RPC
106service of the specified
107.Ar program
108and
109.Ar version ,
110located at port
111.Ar port .
112Registrations which point at ports numbered below 1024 can only be
113created (or changed) by the superuser.
114.It Fl t
115Make an
116.Tn RPC
117call to procedure 0 of
118.Ar program
119on the specified
120.Ar host
121using
122.Tn TCP ,
123and report whether a response was received.
124.It Fl u
125Make an
126.Tn RPC
127call to procedure 0 of
128.Ar program
129on the specified
130.Ar host
131using
132.Tn UDP ,
133and report whether a response was received.
134.El
135.Pp
136The
137.Ar program
138argument can be either a name or a number.
139.Pp
140If a
141.Ar version
142is specified,
143.Nm
144attempts to call that version of the specified
145.Ar program .
146Otherwise,
147.Nm
148attempts to find all the registered version
149numbers for the specified
150.Ar program
151by calling version 0 (which is presumed not
152to exist; if it does exist,
153.Nm
154attempts to obtain this information by calling
155an extremely high version
156number instead) and attempts to call each registered version.
157Note: the version number is required for
158.Fl b
159and
160.Fl d
161options.
162.Sh EXAMPLES
163To show all of the
164.Tn RPC
165services registered on the local machine use:
166.Pp
167.Dl $ rpcinfo -p
168.Pp
169To show all of the
170.Tn RPC
171services registered on the machine named
172.Ar klaxon
173use:
174.Pp
175.Dl $ rpcinfo -p klaxon
176.Pp
177To show all machines on the local net that are running the Yellow Pages
178service use:
179.Pp
180.Dl $ rpcinfo -b ypserv 'version' | uniq
181.Pp
182where 'version' is the current Yellow Pages version obtained from the
183results of the
184.Fl p
185switch above.
186.Pp
187To delete the registration for version 1 of the
188.Nm walld
189service use:
190.Pp
191.Dl $ rpcinfo -d walld 1
192.Sh SEE ALSO
193.Xr rpc 5 ,
194.Xr portmap 8
195.Rs
196.%T "RPC Programming Guide"
197.Re
198