z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


getrpcport()

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

Format

#include <rpc.h>
u_short
getrpcport(host, prognum, versnum, protocol)
char *host;
u_long prognum;
u_long versnum;
int protocol;

Parameters

host
Specifies the pointer to the name of the foreign host.
prognum
Specifies the program number to be mapped.
versnum
Specifies the version number of the program to be mapped.
protocol
Specifies the transport protocol used by the program (IPPROTO_TCP or IPPROTO_UDP).

Usage

The getrpcport() call returns the port number associated with the remote program (prognum), the version (versnum), and the transport protocol (protocol).

Return codes

The value 1 indicates that the mapping does not exist or that the remote portmap could not be contacted. If portmapper cannot be contacted, rpc_createerr contains the RPC status.

Context

  • get_myaddress()
  • pmap_getmaps()
  • pmap_getport()
  • pmap_rmtcall()
  • pmap_set()
  • pmap_unset()

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014