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


pmap_getport()

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

Format

#include <rpc.h>
#include <pmap_pro.h>
#include <pmap_cln.h>
u_short
pmap_getport(addr, prognum,
versnum, protocol)
struct sockaddr_in *addr;
u_long prognum;
u_long versnum;
int protocol;

Parameters

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

Usage

The pmap_getport() 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

  • getrpcport()
  • pmap_getmaps()
  • pmap_rmtcall()
  • pmap_set()
  • pmap_unset()

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014