xref: /freebsd/lib/libc/rpc/getrpcport.3 (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1.\"
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 LIBRARY
9.Lb libc
10.Sh SYNOPSIS
11.Ft int
12.Fn getrpcport "char *host" "int prognum" "int versnum" "int proto"
13.Sh DESCRIPTION
14The
15.Fn getrpcport
16function
17returns the port number for version
18.Fa versnum
19of the RPC program
20.Fa prognum
21running on
22.Fa host
23and using protocol
24.Fa proto .
25It returns 0 if it cannot contact the portmapper, or if
26.Fa prognum
27is not registered.
28If
29.Fa prognum
30is registered but not with version
31.Fa versnum ,
32it will still return a port number (for some version of the program)
33indicating that the program is indeed registered.
34The version mismatch will be detected upon the first call to the service.
35