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. 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