]>
Commit | Line | Data |
---|---|---|
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 |
10 | getrpcport \- 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 |
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 | |
c13182ef MK |
30 | is not registered. |
31 | If | |
fea681da MK |
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. | |
bd172506 ZL |
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 | |
847e0d88 | 50 | .sp 1 |
47297adb | 51 | .SH CONFORMING TO |
fb8719f7 | 52 | Not in POSIX.1. |
a7fadb55 | 53 | Present on the BSDs, Solaris, and many other systems. |