[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Communications Technical Reference, Volume 1

pmap_getport Subroutine

Purpose

Requests the port number on which a service waits.

Library

C Library (libc.a)

Syntax

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

Description

The pmap_getport subroutine acts as a user interface to the portmap daemon in order to return the port number on which a service waits.

Parameters

addr Points to the Internet Protocol (IP) address of the host where the remote program supporting the waiting service resides.
prognum Specifies the program number of the remote program.
versnum Specifies the version number of the remote program.
protocol Specifies the transport protocol the service recognizes.

Return Values

If the mapping does not exist or the Remote Procedure Call (RPC) system could not contact the remote portmap daemon, this subroutine returns a value of 0. If the remote portmap daemon could not be contacted, the rpc_createerr subroutine contains the RPC status.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The portmap daemon.

List of RPC Programming References.

TCP/IP Protocols in AIX Version 4.3 System Management Guide: Communications and Networks.

Remote Procedure Call (RPC) Overview for Programming in AIX Version 4.3 Communications Programming Concepts.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]