1getrpcport(3) Library Functions Manual getrpcport(3)
2
3
4
6 getrpcport - get RPC port number
7
9 Standard C library (libc, -lc)
10
12 #include <rpc/rpc.h>
13
14 int getrpcport(const char *host, unsigned long prognum,
15 unsigned long versnum, unsigned int proto);
16
18 getrpcport() returns the port number for version versnum of the RPC
19 program prognum running on host and using protocol proto. It returns 0
20 if it cannot contact the portmapper, or if prognum is not registered.
21 If prognum is registered but not with version versnum, it will still
22 return a port number (for some version of the program) indicating that
23 the program is indeed registered. The version mismatch will be de‐
24 tected upon the first call to the service.
25
27 For an explanation of the terms used in this section, see at‐
28 tributes(7).
29
30 ┌─────────────────────────────────┬───────────────┬────────────────────┐
31 │Interface │ Attribute │ Value │
32 ├─────────────────────────────────┼───────────────┼────────────────────┤
33 │getrpcport() │ Thread safety │ MT-Safe env locale │
34 └─────────────────────────────────┴───────────────┴────────────────────┘
35
37 BSD.
38
40 BSD, Solaris.
41
42
43
44Linux man-pages 6.05 2023-07-20 getrpcport(3)