OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / getrpcport.3
1 .\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
2 .\"
3 .\" %%%LICENSE_START(BSD_ONELINE_CDROM)
4 .\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
5 .\" %%%LICENSE_END
6 .\"
7 .\" @(#)getrpcport.3r   2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
8 .TH GETRPCPORT 3 2014-05-28 "" "Linux Programmer's Manual"
9 .SH NAME
10 getrpcport \- get RPC port number
11 .SH SYNOPSIS
12 .nf
13 .B "#include <rpc/rpc.h>"
14 .sp
15 .BI "int getrpcport(const char *" host ", unsigned long " prognum \
16 ", unsigned long " versnum ", unsigned " proto );
17 .fi
18 .SH DESCRIPTION
19 .BR getrpcport ()
20 returns the port number for version
21 .I versnum
22 of the RPC program
23 .I prognum
24 running on
25 .I host
26 and using protocol
27 .IR proto .
28 It returns 0 if it cannot contact the portmapper, or if
29 .I prognum
30 is not registered.
31 If
32 .I prognum
33 is registered but not with version
34 .IR versnum ,
35 it will still return a port number (for some version of the program)
36 indicating that the program is indeed registered.
37 The version mismatch will be detected upon the first call to the service.
38 .SH CONFORMING TO
39 Not in POSIX.1-2001.
40 Present on the BSDs, Solaris, and many other systems.
41 .SH COLOPHON
42 This page is part of release 3.79 of the Linux
43 .I man-pages
44 project.
45 A description of the project,
46 information about reporting bugs,
47 and the latest version of this page,
48 can be found at
49 \%http://www.kernel.org/doc/man\-pages/.