xref: /netbsd/lib/libc/rpc/getrpcport.3 (revision bf9ec67e)
1.\"	@(#)getrpcport.3r	2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
2.\"	$NetBSD: getrpcport.3,v 1.3 1998/02/05 18:49:08 perry 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.  If
28.Fa prognum
29is registered but not with version
30.Fa versnum ,
31it will still return a port number (for some version of the program)
32indicating that the program is indeed registered.
33The version mismatch will be detected upon the first call to the service.
34