tzfile.5, tzselect.8: sync from tzdb upstream
[man-pages.git] / man3 / getrpcport.3
blob52ea2f0d5949e6898aadfd2bb534ad5cc3aa61b5
1 '\" t
2 .\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
3 .\"
4 .\" %%%LICENSE_START(BSD_ONELINE_CDROM)
5 .\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
6 .\" %%%LICENSE_END
7 .\"
8 .\" @(#)getrpcport.3r   2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
9 .TH getrpcport 3 (date) "Linux man-pages (unreleased)"
10 .SH NAME
11 getrpcport \- get RPC port number
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ", " \-lc )
15 .SH SYNOPSIS
16 .nf
17 .B "#include <rpc/rpc.h>"
18 .PP
19 .BI "int getrpcport(const char *" host ", unsigned long " prognum ,
20 .BI "               unsigned long " versnum ", unsigned int " proto );
21 .fi
22 .SH DESCRIPTION
23 .BR getrpcport ()
24 returns the port number for version
25 .I versnum
26 of the RPC program
27 .I prognum
28 running on
29 .I host
30 and using protocol
31 .IR proto .
32 It returns 0 if it cannot contact the portmapper, or if
33 .I prognum
34 is not registered.
36 .I prognum
37 is registered but not with version
38 .IR versnum ,
39 it will still return a port number (for some version of the program)
40 indicating that the program is indeed registered.
41 The version mismatch will be detected upon the first call to the service.
42 .SH ATTRIBUTES
43 For an explanation of the terms used in this section, see
44 .BR attributes (7).
45 .ad l
46 .nh
47 .TS
48 allbox;
49 lbx lb lb
50 l l l.
51 Interface       Attribute       Value
53 .BR getrpcport ()
54 T}      Thread safety   MT-Safe env locale
55 .TE
56 .hy
57 .ad
58 .sp 1
59 .SH STANDARDS
60 Not in POSIX.1.
61 Present on the BSDs, Solaris, and many other systems.