xref: /dragonfly/lib/libc/rpc/getrpcport.3 (revision cf89a63b)
1.\" @(#)getrpcport.3r	2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
2.\" $FreeBSD: src/lib/libc/rpc/getrpcport.3,v 1.6 1999/08/28 00:00:40 peter Exp $
3.\" $DragonFly: src/lib/libc/rpc/getrpcport.3,v 1.3 2007/08/18 20:48:47 swildner Exp $
4.\"
5.Dd October 6, 1987
6.Dt GETRPCPORT 3
7.Os
8.Sh NAME
9.Nm getrpcport
10.Nd get RPC port number
11.Sh LIBRARY
12.Lb libc
13.Sh SYNOPSIS
14.Ft int
15.Fn getrpcport "char *host" "int prognum" "int versnum" "int proto"
16.Sh DESCRIPTION
17.Fn getrpcport
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.  If
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