[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 1


xdr_setpos Macro

Purpose

Changes the current position in the XDR stream.

Library

C Library (libc.a)

Syntax

#include <rpc/xdr.h>


xdr_setpos ( xdrs, pos)
XDR *xdrs;
u_int pos;

Description

The xdr_setpos macro invokes the set-position routine associated with the eXternal Data Representation (XDR) stream pointed to by the xdrs parameter. The new position setting is obtained from the xdr_getpos macro. The xdr_setpos macro returns a value of false if the set position is not valid or if the requested position is out of bounds.

A position cannot be set in some XDR streams. Trying to set a position in such streams causes the macro to fail. This macro also fails if the programmer requests a position that is not in the stream's boundaries.

Parameters


xdrs Points to the XDR stream handle.
pos Specifies a position value obtained from the xdr_getpos macro.

Return Values

Upon successful completion (if the stream is positioned successfully), this macro returns a value of 1. If unsuccessful, it returns a value of 0.

Implementation Specifics

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

Related Information

The xdr_getpos macro.

List of XDR Programming References.

eXternal Data Representation (XDR) Overview for Programming and Understanding XDR Non-Filter Primitives in AIX 5L Version 5.1 Communications Programming Concepts.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]