1994-08-07 18:36:12 +00:00
|
|
|
.\" @(#)getrpcport.3r 2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
|
1996-12-21 22:56:48 +00:00
|
|
|
.Dd "October 6, 1987"
|
|
|
|
.Dt GETRPCPORT 3
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm getrpcport
|
|
|
|
.Nd get RPC port number
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Ft int
|
|
|
|
.Fn getrpcport "char *host" "int prognum" "int versnum" "int proto"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Fn getrpcport
|
1994-08-07 18:36:12 +00:00
|
|
|
returns the port number for version
|
1996-12-21 22:56:48 +00:00
|
|
|
.Fa versnum
|
1994-08-07 18:36:12 +00:00
|
|
|
of the RPC program
|
1996-12-21 22:56:48 +00:00
|
|
|
.Fa prognum
|
1994-08-07 18:36:12 +00:00
|
|
|
running on
|
1996-12-21 22:56:48 +00:00
|
|
|
.Fa host
|
1994-08-07 18:36:12 +00:00
|
|
|
and using protocol
|
1996-12-21 22:56:48 +00:00
|
|
|
.Fa proto .
|
1994-08-07 18:36:12 +00:00
|
|
|
It returns 0 if it cannot contact the portmapper, or if
|
1996-12-21 22:56:48 +00:00
|
|
|
.Fa prognum
|
1994-08-07 18:36:12 +00:00
|
|
|
is not registered. If
|
1996-12-21 22:56:48 +00:00
|
|
|
.Fa prognum
|
1994-08-07 18:36:12 +00:00
|
|
|
is registered but not with version
|
1996-12-21 22:56:48 +00:00
|
|
|
.Fa versnum ,
|
1994-08-07 18:36:12 +00:00
|
|
|
it will still return a port number (for some version of the program)
|
|
|
|
indicating that the program is indeed registered.
|
|
|
|
The version mismatch will be detected upon the first call to the service.
|