[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 1

svc_register Subroutine

Purpose

Maps a remote procedure.

Library

C Library (libc.a)

Syntax

#include <rpc/rpc.h>
svc_register (xprt, prognum, versnum, dispatch, protocol)
SVCXPRT *xprt;
u_long prognum, versnum;
void (*dispatch) ();
int protocol;

Description

The svc_register subroutine maps a remote procedure with a service dispatch procedure pointed to by the dispatch parameter. If the protocol parameter has a value of 0, the service is not registered with the portmap daemon. If the protocol parameter does not have a value of 0 (or if it is IPPROTO_UDP or IPPROTO_TCP), the remote procedure triple (prognum, versnum, and protocol parameters) is mapped to the xprt->xp_port port.

The dispatch procedure takes the following form:

dispatch (request, xprt)
struct svc_req *request;
SVCXPRT *xprt;

Parameters

xprt Points to a Remote Procedure Call (RPC) service transport handle.
prognum Specifies the program number of the remote program.
versnum Specifies the version number of the remote program.
dispatch Points to the service dispatch procedure.
protocol Specifies the data transport used by the service.

Return Values

Upon successful completion, this subroutine returns a value of 1. If unsuccessful, it returns a value of 0.

Implementation Specifics

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

Related Information

The pmap_set subroutine, pmap_getmaps subroutine, svc_unregister subroutine.

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.


[ Previous | Next | Contents | Glossary | Home | Search ]