xref: /netbsd/lib/libc/rpc/getrpcport.3 (revision c4a72b64)
1.\"	@(#)getrpcport.3r	2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
2.\"	$NetBSD: getrpcport.3,v 1.4 2002/10/01 17:22:01 wiz Exp $
3.\"
4.Dd October 6, 1987
5.Dt GETRPCPORT 3
6.Os
7.Sh NAME
8.Nm getrpcport
9.Nd get RPC port number
10.Sh LIBRARY
11.Lb libc
12.Sh SYNOPSIS
13.Ft int
14.Fn getrpcport "char *host" "int prognum" "int versnum" "int proto"
15.Sh DESCRIPTION
16.Fn getrpcport
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