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