summaryrefslogtreecommitdiffstats
path: root/man3/xdr.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/xdr.3')
-rw-r--r--man3/xdr.379
1 files changed, 39 insertions, 40 deletions
diff --git a/man3/xdr.3 b/man3/xdr.3
index a3f9a02..b067348 100644
--- a/man3/xdr.3
+++ b/man3/xdr.3
@@ -9,7 +9,7 @@
.\"
.\" 2007-12-30, mtk, Convert function prototypes to modern C syntax
.\"
-.TH xdr 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH xdr 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
xdr \- library routines for external data representation
.SH LIBRARY
@@ -20,24 +20,24 @@ These routines allow C programmers to describe
arbitrary data structures in a machine-independent fashion.
Data for remote procedure calls are transmitted using these
routines.
-.PP
+.P
The prototypes below are declared in
.I <rpc/xdr.h>
and make use of the following types:
-.PP
+.P
.RS 4
.EX
.BI "typedef int " bool_t ;
-.PP
+.P
.BI "typedef bool_t (*" xdrproc_t ")(XDR *, void *,...);"
.EE
.RE
-.PP
+.P
For the declaration of the
.I XDR
type, see
.IR <rpc/xdr.h> .
-.PP
+.P
.nf
.BI "bool_t xdr_array(XDR *" xdrs ", char **" arrp ", unsigned int *" sizep ,
.BI " unsigned int " maxsize ", unsigned int " elsize ,
@@ -63,7 +63,7 @@ is an XDR filter that translates between
the array elements' C form, and their external
representation.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_bool(XDR *" xdrs ", bool_t *" bp );
.fi
@@ -74,7 +74,7 @@ and their external representations.
When encoding data, this
filter produces values of either one or zero.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_bytes(XDR *" xdrs ", char **" sp ", unsigned int *" sizep ,
.BI " unsigned int " maxsize );
@@ -91,7 +91,7 @@ string is located at address
strings cannot be longer than
.IR maxsize .
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_char(XDR *" xdrs ", char *" cp );
.fi
@@ -106,7 +106,7 @@ consider
.BR xdr_opaque (),
or
.BR xdr_string ().
-.PP
+.P
.nf
.BI "void xdr_destroy(XDR *" xdrs );
.fi
@@ -120,7 +120,7 @@ Using
after invoking
.BR xdr_destroy ()
is undefined.
-.PP
+.P
.nf
.BI "bool_t xdr_double(XDR *" xdrs ", double *" dp );
.fi
@@ -129,7 +129,7 @@ A filter primitive that translates between C
.I double
precision numbers and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_enum(XDR *" xdrs ", enum_t *" ep );
.fi
@@ -138,7 +138,7 @@ A filter primitive that translates between C
.IR enum s
(actually integers) and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_float(XDR *" xdrs ", float *" fp );
.fi
@@ -147,7 +147,7 @@ A filter primitive that translates between C
.IR float s
and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "void xdr_free(xdrproc_t " proc ", char *" objp );
.fi
@@ -160,7 +160,7 @@ Note: the pointer passed to this routine is
freed, but what it points to
.I is
freed (recursively).
-.PP
+.P
.nf
.BI "unsigned int xdr_getpos(XDR *" xdrs );
.fi
@@ -173,7 +173,7 @@ which indicates the position of the XDR byte stream.
A desirable feature of XDR
streams is that simple arithmetic works with this number,
although the XDR stream instances need not guarantee this.
-.PP
+.P
.nf
.BI "long *xdr_inline(XDR *" xdrs ", int " len );
.fi
@@ -193,7 +193,7 @@ may return NULL (0)
if it cannot allocate a contiguous piece of a buffer.
Therefore the behavior may vary among stream instances;
it exists for the sake of efficiency.
-.PP
+.P
.nf
.BI "bool_t xdr_int(XDR *" xdrs ", int *" ip );
.fi
@@ -201,7 +201,7 @@ it exists for the sake of efficiency.
A filter primitive that translates between C integers
and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_long(XDR *" xdrs ", long *" lp );
.fi
@@ -210,7 +210,7 @@ A filter primitive that translates between C
.I long
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "void xdrmem_create(XDR *" xdrs ", char *" addr ", unsigned int " size ,
.BI " enum xdr_op " op );
@@ -231,7 +231,7 @@ determines the direction of the XDR stream (either
.BR XDR_DECODE ,
or
.BR XDR_FREE ).
-.PP
+.P
.nf
.BI "bool_t xdr_opaque(XDR *" xdrs ", char *" cp ", unsigned int " cnt );
.fi
@@ -244,7 +244,7 @@ is the address of the opaque object, and
.I cnt
is its size in bytes.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_pointer(XDR *" xdrs ", char **" objpp ,
.BI " unsigned int " objsize ", xdrproc_t " xdrobj );
@@ -260,7 +260,7 @@ Thus,
can represent
recursive data structures, such as binary trees or
linked lists.
-.PP
+.P
.nf
.BI "void xdrrec_create(XDR *" xdrs ", unsigned int " sendsize ,
.BI " unsigned int " recvsize ", char *" handle ,
@@ -303,7 +303,7 @@ record boundary information.
Also, XDR streams created with different
.B xdr*_create
APIs are not compatible for the same reason.
-.PP
+.P
.nf
.BI "bool_t xdrrec_endofrecord(XDR *" xdrs ", int " sendnow );
.fi
@@ -315,7 +315,7 @@ and the output buffer is optionally written out if
.I sendnow
is nonzero.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdrrec_eof(XDR *" xdrs );
.fi
@@ -325,7 +325,7 @@ This routine can be invoked only on streams created by
After consuming the rest of the current record in the stream,
this routine returns one if the stream has no more input,
zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdrrec_skiprecord(XDR *" xdrs );
.fi
@@ -336,7 +336,7 @@ streams created by
It tells the XDR implementation that the rest of the current record
in the stream's input buffer should be discarded.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_reference(XDR *" xdrs ", char **" pp ", unsigned int " size ,
.BI " xdrproc_t " proc );
@@ -361,7 +361,7 @@ Warning: this routine does not understand null pointers.
Use
.BR xdr_pointer ()
instead.
-.PP
+.P
.nf
.BI "xdr_setpos(XDR *" xdrs ", unsigned int " pos );
.fi
@@ -379,7 +379,7 @@ and zero otherwise.
Warning: it is difficult to reposition some types of XDR
streams, so this routine may fail with one
type of stream and succeed with another.
-.PP
+.P
.nf
.BI "bool_t xdr_short(XDR *" xdrs ", short *" sp );
.fi
@@ -388,7 +388,7 @@ A filter primitive that translates between C
.I short
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "void xdrstdio_create(XDR *" xdrs ", FILE *" file ", enum xdr_op " op );
.fi
@@ -413,7 +413,7 @@ on the
.I file
stream, but never
.BR fclose (3).
-.PP
+.P
.nf
.BI "bool_t xdr_string(XDR *" xdrs ", char **" sp ", unsigned int " maxsize );
.fi
@@ -426,7 +426,7 @@ Note:
.I sp
is the address of the string's pointer.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_u_char(XDR *" xdrs ", unsigned char *" ucp );
.fi
@@ -435,7 +435,7 @@ A filter primitive that translates between
.I unsigned
C characters and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_u_int(XDR *" xdrs ", unsigned int *" up );
.fi
@@ -444,7 +444,7 @@ A filter primitive that translates between C
.I unsigned
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_u_long(XDR *" xdrs ", unsigned long *" ulp );
.fi
@@ -453,7 +453,7 @@ A filter primitive that translates between C
.I "unsigned long"
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_u_short(XDR *" xdrs ", unsigned short *" usp );
.fi
@@ -462,7 +462,7 @@ A filter primitive that translates between C
.I "unsigned short"
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_union(XDR *" xdrs ", enum_t *" dscmp ", char *" unp ,
.BI " const struct xdr_discrim *" choices ,
@@ -501,7 +501,7 @@ array, then the
.I defaultarm
procedure is called (if it is not NULL).
Returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.BI "bool_t xdr_vector(XDR *" xdrs ", char *" arrp ", unsigned int " size ,
.BI " unsigned int " elsize ", xdrproc_t " elproc );
@@ -524,7 +524,7 @@ is an XDR filter that translates between
the array elements' C form, and their external
representation.
This routine returns one if it succeeds, zero otherwise.
-.PP
+.P
.nf
.B bool_t xdr_void(void);
.fi
@@ -532,7 +532,7 @@ This routine returns one if it succeeds, zero otherwise.
This routine always returns one.
It may be passed to RPC routines that require a function argument,
where nothing is to be done.
-.PP
+.P
.nf
.BI "bool_t xdr_wrapstring(XDR *" xdrs ", char **" sp );
.fi
@@ -594,10 +594,9 @@ T{
.BR xdr_wrapstring ()
T} Thread safety MT-Safe
.TE
-.sp 1
.SH SEE ALSO
.BR rpc (3)
-.PP
+.P
The following manuals:
.RS
eXternal Data Representation Standard: Protocol Specification