]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/getrpcport.3
pow.3: Minor tweak to BUGS
[thirdparty/man-pages.git] / man3 / getrpcport.3
CommitLineData
2297bf0e
MK
1.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
2.\"
6d1cd1d7 3.\" %%%LICENSE_START(BSD_ONELINE_CDROM)
cc3832e9 4.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
8ff7380d 5.\" %%%LICENSE_END
cc3832e9 6.\"
fea681da 7.\" @(#)getrpcport.3r 2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
4b8c67d9 8.TH GETRPCPORT 3 2017-09-15 "" "Linux Programmer's Manual"
fea681da
MK
9.SH NAME
10getrpcport \- get RPC port number
11.SH SYNOPSIS
fea681da 12.nf
8c7d2f04 13.B "#include <rpc/rpc.h>"
68e4db0a 14.PP
af70d80c
MK
15.BI "int getrpcport(const char *" host ", unsigned long " prognum ,
16.BI " unsigned long " versnum ", unsigned " proto );
fea681da
MK
17.fi
18.SH DESCRIPTION
63aa9df0 19.BR getrpcport ()
fea681da
MK
20returns the port number for version
21.I versnum
22of the RPC program
23.I prognum
24running on
25.I host
26and using protocol
27.IR proto .
28It returns 0 if it cannot contact the portmapper, or if
29.I prognum
c13182ef
MK
30is not registered.
31If
fea681da
MK
32.I prognum
33is registered but not with version
34.IR versnum ,
35it will still return a port number (for some version of the program)
36indicating that the program is indeed registered.
37The version mismatch will be detected upon the first call to the service.
bd172506
ZL
38.SH ATTRIBUTES
39For an explanation of the terms used in this section, see
40.BR attributes (7).
41.TS
42allbox;
43lb lb lb
44l l l.
45Interface Attribute Value
46T{
47.BR getrpcport ()
48T} Thread safety MT-Safe env locale
49.TE
847e0d88 50.sp 1
47297adb 51.SH CONFORMING TO
fb8719f7 52Not in POSIX.1.
a7fadb55 53Present on the BSDs, Solaris, and many other systems.