]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/getrpcport.3
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
[thirdparty/man-pages.git] / 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 2017-09-15 "" "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 .PP
15 .BI "int getrpcport(const char *" host ", unsigned long " prognum ,
16 .BI " 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 ATTRIBUTES
39 For an explanation of the terms used in this section, see
40 .BR attributes (7).
41 .TS
42 allbox;
43 lb lb lb
44 l l l.
45 Interface Attribute Value
46 T{
47 .BR getrpcport ()
48 T} Thread safety MT-Safe env locale
49 .TE
50 .sp 1
51 .SH CONFORMING TO
52 Not in POSIX.1.
53 Present on the BSDs, Solaris, and many other systems.