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