OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / man3 / getrpcport.3
1 .\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
2 .\"
3 .\" @(#)getrpcport.3r   2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
4 .TH GETRPCPORT 3 2007-12-23 "" "Linux Programmer's Manual"
5 .SH NAME
6 getrpcport \- get RPC port number
7 .SH SYNOPSIS
8 .nf
9 .BI "int getrpcport(char *" host ", int " prognum ", int " versnum \
10 ", int " proto );
11 .fi
12 .SH DESCRIPTION
13 .BR getrpcport ()
14 returns the port number for version
15 .I versnum
16 of the RPC program
17 .I prognum
18 running on
19 .I host
20 and using protocol
21 .IR proto .
22 It returns 0 if it cannot contact the portmapper, or if
23 .I prognum
24 is not registered.
25 If
26 .I prognum
27 is registered but not with version
28 .IR versnum ,
29 it will still return a port number (for some version of the program)
30 indicating that the program is indeed registered.
31 The version mismatch will be detected upon the first call to the service.
32 .SH "CONFORMING TO"
33 Not in POSIX.1-2001.
34 Present on the BSDs, Solaris, and many other systems.