xdr_int(3) CLIX xdr_int(3)
NAME
xdr_int, xdr_enum, xdr_u_char, xdr_bool, xdr_float, xdr_u_int, xdr_char,
xdr_long, xdr_u_long, xdr_double, xdr_short, xdr_u_short - Provide library
functions for external data representation
LIBRARY
Berkeley Software Distribution Library (libbsd.a)
SYNOPSIS
#include <rpc/xdr.h>
xdr_int(
XDR *xdrs ,
int *ip );
xdr_enum(
XDR *xdrs ,
enum_t *ep );
xdr_u_char(
XDR *xdrs ,
unsigned char *ucp );
xdr_bool(
XDR *xdrs ,
bool_t *bp );
xdr_float(
XDR *xdrs ,
float *fp );
xdr_u_int(
XDR *xdrs ,
unsigned *up );
xdr_char(
XDR *xdrs ,
char *cp );
xdr_long(
XDR *xdrs ,
long *lp );
xdr_u_long(
XDR *xdrs ,
unsigned long *ulp );
xdr_double(
2/94 - Intergraph Corporation 1
xdr_int(3) CLIX xdr_int(3)
XDR *xdrs ,
double *dp );
xdr_short(
XDR *xdrs ,
short *sp );
xdr_u_short(
XDR *xdrs ,
unsigned short *usp );
PARAMETERS
xdrs Specifies the address of the XDR handle.
ip Points to an integer value.
ep Points to an enum value.
ucp Points to an unsigned character value.
bp Points to a boolean value.
fp Points to a float value.
up Points to an unsigned integer value.
cp Points to a character value.
lp Points to a long value.
ulp Points to an unsigned long value.
dp Points to a double value.
sp Points to a short value.
usp Points to an unsigned short value.
DESCRIPTION
The xdr_int(), xdr_enum(), xdr_u_char(), xdr_bool(), xdr_float(),
xdr_u_int(), xdr_char(), xdr_long(), xdr_u_long(), xdr_double(),
xdr_short(), and xdr_u_short() functions allow C programmers to describe
arbitrary data structures in a machine-independent fashion. Data for
remote procedure calls are transmitted using these functions. These
functions are simple filters that allow translating between simple data
types and their xdr representations.
These filter primitives convert between an XDR (external data
representation) and the machine-specific named representation of various
2 Intergraph Corporation - 2/94
xdr_int(3) CLIX xdr_int(3)
primitive data types. The xdrs parameter is used to hold the data in XDR
format, and to specify whether the filter functions are to encode
(translate from normal to XDR format), decode (translate from XDR to
normal format), or free space associated with the XDR structure. The ip,
ep, etc. parameters represent the data in machine-dependent format.
The xdr_int() function is a filter primitive that translates between C
integers and their external representations.
The xdr_enum() function is a filter primitive that translates between C
enums (actually integers) and their external representations.
The xdr_u_char() function is a filter primitive that translates between
unsigned C characters and their external representations.
The xdr_bool() function is a filter primitive that translates between
booleans (C integers) and their external representations. When encoding
data, this filter produces values of either 1 or 0.
The xdr_float() function is a filter primitive that translates between C
floats and their external representations.
The xdr_u_int() function is a filter primitive that translates between C
unsigned integers and their external representations.
The xdr_char() function is a filter primitive that translates between C
characters and their external representations. Encoded characters are not
packed, and occupy 4 bytes each. For arrays of characters, it is
worthwhile to consider xdr_bytes, xdr_opaque, or xdr_string.
The xdr_long() function is a filter primitive that translates between C
long integers and their external representations.
The xdr_u_long() function is a filter primitive that translates between C
unsigned long integers and their external representations.
The xdr_double() function is a filter primitive that translates between C
double precision numbers and their external representations.
The xdr_short() function is a filter primitive that translates between C
short integers and their external representations.
The xdr_u_short() function is a filter primitive that translates between C
unsigned short integers and their external representations.
RETURN VALUES
All functions documented in this manpage return 1 if successful, and 0
otherwise.
RELATED INFORMATION
2/94 - Intergraph Corporation 3
xdr_int(3) CLIX xdr_int(3)
Functions: xdr_bytes(3), xdr_getpos(3), xdr_pointer(3), xdrrec_create(3),
xdr_array(3), xdr_destroy(3), xdr_free(3), xdr_inline(3),
xdrmem_create(3), xdr_opaque(3), xdr_union(3), xdr_vector(3), xdr_void(3),
authunix_create(3), clnt_pcreateerror(3), clnt_perrno(3), clnt_perror(3),
clntraw_create(3), clnttcp_create(3), pmap_set(3), svc_getargs(3),
svc_getreqset(3), svc_register(3), svcerr_auth(3), svctcp_create(3),
xprt_register(3), clnt_broadcast(3), clnt_call(3), clnt_create(3),
clnt_control(3), clnt_destroy(3), clnt_freeres(3), clnt_geterr(3),
clnt_getmyaddr(3), registerrpc(3), svc_destroy(3), svc_getcaller(3),
svc_run(3), svc_sendreply(3), xdr_accepted_reply(3),
xdr_authunix_parms(3), xdr_callhdr(3), xdr_callmsg(3), xdr_opaque_auth(3),
xdr_pmap(3), xdr_pmaplist(3), xdr_rejected_reply(3), xdr_replymsg(3)
CLIX Programming Guide
XDR: External Data Representation Standard, RFC1014, Sun Microsystems,
Inc., USC-ISI
4 Intergraph Corporation - 2/94