| 1 |
.\" @(#)getrpcport.3r 2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI |
| 2 |
.\" |
| 3 |
.Dd October 6, 1987 |
| 4 |
.Dt GETRPCPORT 3 |
| 5 |
.Os |
| 6 |
.Sh NAME |
| 7 |
.Nm getrpcport |
| 8 |
.Nd get RPC port number |
| 9 |
.Sh SYNOPSIS |
| 10 |
.Ft int |
| 11 |
.Fn getrpcport "char *host" "int prognum" "int versnum" "int proto" |
| 12 |
.Sh DESCRIPTION |
| 13 |
The |
| 14 |
.Fn getrpcport |
| 15 |
function |
| 16 |
returns the port number for version |
| 17 |
.Fa versnum |
| 18 |
of the RPC program |
| 19 |
.Fa prognum |
| 20 |
running on |
| 21 |
.Fa host |
| 22 |
and using protocol |
| 23 |
.Fa proto . |
| 24 |
It returns 0 if it cannot contact the portmapper, or if |
| 25 |
.Fa prognum |
| 26 |
is not registered. If |
| 27 |
.Fa prognum |
| 28 |
is registered but not with version |
| 29 |
.Fa versnum , |
| 30 |
it will still return a port number (for some version of the program) |
| 31 |
indicating that the program is indeed registered. |
| 32 |
The version mismatch will be detected upon the first call to the service. |
| 33 |
.Sh AVAILABILITY |
| 34 |
The |
| 35 |
.Fn getrpcport |
| 36 |
function is part of libtirpc. |