'\"macro stdmacro
.if n .pH g1a.rpcinfo @(#)rpcinfo	40.8 of 1/24/90
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} rpcinfo 1M "" "\&"
.if \nX=1 .ds x} rpcinfo 1M ""
.if \nX=2 .ds x} rpcinfo 1M "" "\&"
.if \nX=3 .ds x} rpcinfo "" "" "\&"
.TH \*(x}
.SH NAME
\f4rpcinfo\f1 \- report RPC information
.SH SYNOPSIS
.nf
\f4rpcinfo \f1[\f2host\f1]
\f4rpcinfo -p \f1[\f2host\f1]
\f4rpcinfo -T \f2transport host program version
\f4rpcinfo \f1[\f4-n \f2portnum\f1] \f4-u \f2host program version
\f4rpcinfo \f1[\f4-n \f2portnum\f1] \f4-t \f2host program version
\f4rpcinfo -a \f2serv_address\f1 \f4-T \f2transport program\f1 [\f2version\f1]
\f4rpcinfo -b \f1[\f4-T \f2transport\f1]\f4 \f2program version\f1
\f4rpcinfo -d \f1[\f4-T \f2transport\f1]\f4 \f2program version\f1
.fi
.SH DESCRIPTION
\f4rpcinfo\f1
makes an RPC call to an RPC
server and reports what it finds.
.P
In the first synopsis,
it lists all the registered RPC services with 
\f4rpcbind\f1
on
.IR host .
If
.I host
is not specified, it defaults to the local host.
.P
In the second synopsis, it lists all the RPC services registered with 
\f4portmapper\f1.
Also note that the format of the information
is different in the first and the second synopsis;
this is because in the first case,
\f4rpcbind\f1 (version 3)
is contacted, while in the second case
\f4portmap\f1 (version 2)
is contacted for information.
.P
The third synopsis makes an RPC call to procedure \f40\fP of
.I program
and
.I version
on the specified
.I host
and reports whether a response was received.
.I transport
is the transport which has to be used for contacting the
given service.
The remote address of the service is obtained by
making a call to remote
\f4rpcbind\f1.
.P
The other ways of using
\f4rpcinfo\f1
are described below.
See
EXAMPLES.
.P
The following options are available:
.TP 15
\f4\-T \f2transport\f1
Specify the transport on which the service is required.
If this option is not specified,
\f4rpcinfo\f1
uses the transport specified in the \f4NETPATH\fP
environment variable, or if that is unset or null, in the
netconfig database.
This is a generic option, 
and can be used in conjunction with any other option,
except the
\f4\-b\f1
option.
.TP
\f4\-a \f2serv_address\f1
Use
.I serv_address
as the (universal) address for the service on 
.IR transport ,
to ping procedure \f40\fP of the specified
.IR program
and report whether a response was received.
The use of
\f4\-T\f1
option is required with
\f4\-a\f1
option.
.IP
If version number is not specified,
\f4rpcinfo\fP tries to ping all the
available version numbers for that program number.
This option avoids calls to remote
\f4rpcbind\f1
to find the address of the service.
The
.I serv_address
is specified in universal address format of the given transport.
.TP
\f4\-b\f1
Make an
RPC
broadcast to procedure \f40\fP of the specified
.I program
and
.I version
and report all hosts that respond.
If
.I transport
is specified, it broadcasts its request only on the
transport specified through
.IR transport .
If broadcasting is not supported by any
transport,
an error message is printed.
Only UDP transports support broadcasting.
.TP
\f4\-d\f1
Delete registration for the 
RPC
service of the specified
.I program
and
.IR version .
If
\f2transport\f1
is specified,
unregister the service on only that transport,
otherwise unregister the services on all
the transports on which it was registered.
This option can be exercised only by the
privileged user.
.TP
\f4\-n\f1
Use
.I portnum
as the port number for the
\f4\-t\f1
and
\f4\-u\fP
options instead of the port number given by the portmapper.
Use of this option avoids a call to the remote
portmapper to find out the address of the service.
.TP
\f4\-p\f1
Probe the portmapper on
.IR host ,
and print a list of all registered RPC programs.
If
.I host
is not specified, it defaults to the local host.
.br
.ne 8
.TP
\f4\-t\f1
Make an RPC call to procedure 0 of
.I program
on the specified
.I host
using TCP,
and report whether a response was received.
.TP
\f4\-u\f1
Make an
RPC
call to procedure 0 of
.I program
on the specified
.I host
using UDP,
and report whether a response was received.
.P
The
.I program
argument is a number.
.P
If a
\f2version\f1
is specified,
\f4rpcinfo\f1
attempts to call that version of the specified
\f2program\f1.
Otherwise,
\f4rpcinfo\f1
attempts to find all the registered version
numbers for the specified
\f2program\f1
by calling version 0,
which is presumed not to exist; 
if it does exist,
\f4rpcinfo\f1
attempts to obtain this information by calling
an extremely high version number instead,
and attempts to call each registered version.
Note: 
the version number is required for 
\f4\-b\f1
and
\f4\-d\f1
options.
.SH EXAMPLES
To show all of the RPC
services registered on the local machine use:
.IP
.ft 4
$ rpcinfo\f1
.ft 1
.P
To show all of the RPC
services registered with rpcbind on the machine named
\f4klaxon\f1
use:
.IP
\f4$ rpcinfo klaxon\f1
.P
To show if the RPC
service with program number \f2prog_no\fP and version \f2vers\fP is
registered on the machine named \f4klaxon\f1
for the transport
\f4tcp\f1
use:
.IP
.ft 4
$ rpcinfo \-T tcp klaxon \f2prog_no\fP \f2vers\f1
.ft 1
.P
To show all of the
RPC
services registered with the portmapper on the local machine use:
.IP
\f4$ rpcinfo \-p\f1
.LP
To ping version \f42\fP of
\f4rpcbind\f1
(program number \f4100000\fP)
on host
\f4sparky\f1:
.IP
\f4$ rpcinfo -t sparky 100000 2\f1
.br
.ne 2.5i
.LP
To delete the registration for version \f41\fP of the
\f4walld\f1
(program number \f4100008\fP)
service for all transports use:
.IP
\f4# rpcinfo \-d 100008 1\f1
.SH "SEE ALSO"
\f4rpcbind\f1(1M),
\f4rpc\f1(4).
