hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP TCP/IP Services for OpenVMS

HP TCP/IP Services for OpenVMS
ONC RPC Programming


Previous Contents Index


xdr_int

Serializes and deserializes integers.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_int(XDR *xdrs, int *ip);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

ip

A pointer to the integer data.

Description

A filter primitive that translates between integers and their external representations.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_long

Serializes and deserializes long integers.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_long(XDR *xdrs, long *lp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

lp

A pointer to a long integer.

Description

A filter primitive that translates between long integers and their external representations.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_opaque

Serializes and deserializes opaque structures.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_opaque(XDR *xdrs, char *op, u_int cnt);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

op

A pointer to the opaque data.

cnt

The size of op in bytes.

Description

A filter primitive that translates between fixed-size opaque data and its external representation. This routine treats the data as a fixed length of bytes and does not attempt to convert the bytes.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_opaque_auth

Serializes and deserializes ONC RPC authentication information message.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *authp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

authp

A pointer to an opaque_auth structure describing authentication information. The pointer should reference data created by the authnone_create , authunix_create , or authunix_create_default routine.

Description

Translates ONC RPC authentication information messages. This routine is useful for users who want to generate messages without using the ONC RPC package.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_pmap

Serializes and deserializes Portmapper parameters.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

regs

A pointer to the pmap structure. This structure contains the program number, version number, protocol number, and port number.

Description

Describes parameters to various Portmapper procedures, externally. This routine is useful for users who want to generate these parameters without using the Portmapper interface.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_pmap_vms

Serializes and deserializes OpenVMS specific Portmapper parameters.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_pmap_vms(XDR *xdrs, struct pmap_vms *regs);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

regs

A pointer to the pmap_vms structure. This structure contains the program number, version number, protocol number, port number and the OpenVMS specific process identification.

Description

This routine is similar to xdr_pmap() , except it also includes the process identification in the pmap_vms structure.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_pmaplist

Serializes and deserializes a list of Portmapper port mappings.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rpp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

rpp

A pointer to a pointer to a pmaplist structure containing a list of Portmapper programs and their respective information. If the routine is used to decode a Portmapper listing, it sets rpp to the address of a newly allocated linked list of pmaplist structures.

Description

Describes a list of port mappings, externally. This routine is useful for users who want to generate these parameters without using the Portmapper interface.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_pmaplist_vms

Serializes and deserializes a list of Portmapper port mappings for OpenVMS systems.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_pmaplist_vms (XDR *xdrs, struct pmaplist_vms **rpp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

rpp

A pointer to a pointer to a pmaplist_vms structure containing a list of Portmapper programs and their respective information, including OpenVMS-specific information.

Description

This routine is similar to the xdr_pmaplist routine, except that it also includes the process identification in the pmaplist_vms structure.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_pointer

Serializes and deserializes indirect pointers and the data being pointed to.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_pointer(XDR *xdrs, char **objpp, u_int objsize, xdrproc_t objproc);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

objpp

A pointer to a pointer to the data being converted.

objsize

The size of the data structure in bytes.

objproc

The XDR procedure that filters the structure between its local form and its external representation.

Description

An XDR routine for translating data structures that contain pointers to other structures, such as a linked list. The xdr_pointer routine is similar to the xdr_reference routine. The differences are that the xdr_pointer routine handles pointers with the value NULL and that it translates the pointer values to a boolean. If the boolean is TRUE, the data follows the boolean.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_reference

Serializes and deserializes indirect pointers and the data being pointed to.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_reference(XDR *xdrs, char **objpp, u_int objsize, xdrproc_t objproc);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

objpp

A pointer to a pointer to the structure containing the data being converted. If objpp is zero, the xdr_reference routine allocates the necessary storage when decoding. This argument must be nonzero during encoding.

objsize

The size of the structure in bytes.

objproc

The XDR procedure that filters the structure between its local form and its external representation.

Description

A primitive that provides pointer chasing within structures.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_rejected_reply

Serializes and deserializes the remainder of an RPC reply message after the header indicates that the reply is rejected.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rrp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

rrp

A pointer to the rejected_reply structure describing the rejected reply message.

Description

Describes ONC RPC reply messages. This routine is useful for users who want to generate messages without using the ONC RPC package.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_replymsg

Serializes and deserializes the RPC reply header and then calls the appropriate routine to interpret the rest of the message.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsgp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

rmsgp

A pointer to the rpc_msg structure describing the reply message.

Description

Describes ONC RPC reply messages. This routine is useful for users who want to generate messages without using the ONC RPC package. This routine interprets the message header and then calls either the xdr_accepted_reply or the xdr_rejected_reply routine to interpret the body of the RPC message.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_short

Serializes and deserializes short integers.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_short(XDR *xdrs, short *sp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

sp

A pointer to a short integer.

Description

A filter primitive that translates between short integers and their external representations.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_string

Serializes and deserializes strings (arrays of bytes terminated by a NULL character).

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_string(XDR *xdrs, char **spp, u_int maxsize);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

spp

A pointer to a pointer to a character string.

maxsize

The maximum size of the string.

Description

A filter primitive that translates between strings and their corresponding external representations. Strings cannot be longer than the value specified with the maxsize parameter.

While decoding, if *spp is NULL , this routine allocates the necessary storage to hold the NULL -terminated string and sets *spp to point to the allocated storage.

This routine is the same as the xdr_wrapstring routine, except that this routine allows you to specify maxsize .


Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_u_char

Serializes and deserializes unsigned characters.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_u_char(XDR *xdrs, char *ucp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

ucp

A pointer to a character.

Description

A filter primitive that translates between internal representation of unsigned characters and their XDR representations.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_u_hyper

Serializes and deserializes unsigned VAX quadwords (known in XDR as hyperintegers).

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_u_hyper(XDR *xdrs, unsigned quad *uhp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

uhp

A pointer to the unsigned hyperinteger.

Description

A filter primitive that translates between unsigned hyperintegers and their external representations.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_u_int

Serializes and deserializes unsigned integers.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_u_int(XDR *xdrs, unsigned *uip);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

uip

A pointer to the unsigned integer.

Description

A filter primitive that translates between unsigned integers and their external representations.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_u_long

Serializes and deserializes unsigned long integers.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

ulp

A pointer to the unsigned long integer.

Description

A filter primitive that translates between unsigned long integers and their external representations.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_u_short

Serializes and deserializes unsigned short integers.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

usp

A pointer to the unsigned short integer.

Description

A filter primitive that translates between unsigned short integers and their external representations.

Return Values

TRUE Indicates success.
FALSE Indicates failure.

xdr_union

Serializes and deserializes discriminant unions.

Format

#include <tcpip$rpcxdr.h>

bool_t xdr_union(XDR *xdrs, enum *dscmp, char *unp, struct xdr_discrim *choices, xdrproc_t default);


Arguments

xdrs

A pointer to an XDR stream handle created by one of the XDR stream-handle creation routines.

dscmp

A pointer to the union's discriminant.

unp

A pointer to the union's data.

choices

A pointer to an array of xdr_discrim structures. Each structure contains an ordered pair of [value,proc] . The final structure in the array is denoted by a pointer with the value NULL .

default

The address of the default XDR routine to call if the dscmp argument is not found in the choices array.

Description

A filter primitive that translates between a discriminated union and its corresponding external representation. The xdr_union routine first translates the discriminant of the union located at dscmp . This discriminant is always of type enum_t .

Next, the routine translates the union data located at unp . To translate the union data the xdr_union routine first searches the structure pointed to by the choices argument for the union discriminant passed in the dscmp argument. If a match is found, the xdr_union routine calls proc to translate the union data.

The end of the xdr_discrim structure array must contain an entry with the value NULL for proc . If the xdr_union routine reaches this entry before finding a match, the routine calls the default procedure (if it is not NULL ).


Return Values

TRUE Indicates success.
FALSE Indicates failure.


Previous Next Contents Index