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