1GETRPCPORT(3) Linux Programmer's Manual GETRPCPORT(3)
2
3
4
6 getrpcport - get RPC port number
7
9 #include <rpc/rpc.h>
10
11 int getrpcport(const char *host, unsigned long prognum,
12 unsigned long versnum, unsigned proto);
13
15 getrpcport() returns the port number for version versnum of the RPC
16 program prognum running on host and using protocol proto. It returns 0
17 if it cannot contact the portmapper, or if prognum is not registered.
18 If prognum is registered but not with version versnum, it will still
19 return a port number (for some version of the program) indicating that
20 the program is indeed registered. The version mismatch will be
21 detected upon the first call to the service.
22
24 For an explanation of the terms used in this section, see
25 attributes(7).
26
27 ┌─────────────┬───────────────┬────────────────────┐
28 │Interface │ Attribute │ Value │
29 ├─────────────┼───────────────┼────────────────────┤
30 │getrpcport() │ Thread safety │ MT-Safe env locale │
31 └─────────────┴───────────────┴────────────────────┘
32
34 Not in POSIX.1. Present on the BSDs, Solaris, and many other systems.
35
37 This page is part of release 5.04 of the Linux man-pages project. A
38 description of the project, information about reporting bugs, and the
39 latest version of this page, can be found at
40 https://www.kernel.org/doc/man-pages/.
41
42
43
44 2017-09-15 GETRPCPORT(3)