Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/tirpc/rpc
File: xdr.h
/* $NetBSD: xdr.h,v 1.19 2000/07/17 05:00:45 matt Exp $ */
[0] Fix | Delete
[1] Fix | Delete
/*
[2] Fix | Delete
* Copyright (c) 2009, Sun Microsystems, Inc.
[3] Fix | Delete
* All rights reserved.
[4] Fix | Delete
*
[5] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[6] Fix | Delete
* modification, are permitted provided that the following conditions are met:
[7] Fix | Delete
* - Redistributions of source code must retain the above copyright notice,
[8] Fix | Delete
* this list of conditions and the following disclaimer.
[9] Fix | Delete
* - Redistributions in binary form must reproduce the above copyright notice,
[10] Fix | Delete
* this list of conditions and the following disclaimer in the documentation
[11] Fix | Delete
* and/or other materials provided with the distribution.
[12] Fix | Delete
* - Neither the name of Sun Microsystems, Inc. nor the names of its
[13] Fix | Delete
* contributors may be used to endorse or promote products derived
[14] Fix | Delete
* from this software without specific prior written permission.
[15] Fix | Delete
*
[16] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
[17] Fix | Delete
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[18] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[19] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
[20] Fix | Delete
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
[21] Fix | Delete
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
[22] Fix | Delete
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
[23] Fix | Delete
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
[24] Fix | Delete
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
[25] Fix | Delete
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
[26] Fix | Delete
* POSSIBILITY OF SUCH DAMAGE.
[27] Fix | Delete
*
[28] Fix | Delete
* from: @(#)xdr.h 1.19 87/04/22 SMI
[29] Fix | Delete
* from: @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC
[30] Fix | Delete
* $FreeBSD: src/include/rpc/xdr.h,v 1.23 2003/03/07 13:19:40 nectar Exp $
[31] Fix | Delete
*/
[32] Fix | Delete
[33] Fix | Delete
/*
[34] Fix | Delete
* xdr.h, External Data Representation Serialization Routines.
[35] Fix | Delete
*
[36] Fix | Delete
* Copyright (C) 1984, Sun Microsystems, Inc.
[37] Fix | Delete
*/
[38] Fix | Delete
[39] Fix | Delete
#ifndef _TIRPC_XDR_H
[40] Fix | Delete
#define _TIRPC_XDR_H
[41] Fix | Delete
#include <stdio.h>
[42] Fix | Delete
#include <netinet/in.h>
[43] Fix | Delete
[44] Fix | Delete
#include <rpc/types.h>
[45] Fix | Delete
[46] Fix | Delete
/*
[47] Fix | Delete
* XDR provides a conventional way for converting between C data
[48] Fix | Delete
* types and an external bit-string representation. Library supplied
[49] Fix | Delete
* routines provide for the conversion on built-in C data types. These
[50] Fix | Delete
* routines and utility routines defined here are used to help implement
[51] Fix | Delete
* a type encode/decode routine for each user-defined type.
[52] Fix | Delete
*
[53] Fix | Delete
* Each data type provides a single procedure which takes two arguments:
[54] Fix | Delete
*
[55] Fix | Delete
* bool_t
[56] Fix | Delete
* xdrproc(xdrs, argresp)
[57] Fix | Delete
* XDR *xdrs;
[58] Fix | Delete
* <type> *argresp;
[59] Fix | Delete
*
[60] Fix | Delete
* xdrs is an instance of a XDR handle, to which or from which the data
[61] Fix | Delete
* type is to be converted. argresp is a pointer to the structure to be
[62] Fix | Delete
* converted. The XDR handle contains an operation field which indicates
[63] Fix | Delete
* which of the operations (ENCODE, DECODE * or FREE) is to be performed.
[64] Fix | Delete
*
[65] Fix | Delete
* XDR_DECODE may allocate space if the pointer argresp is null. This
[66] Fix | Delete
* data can be freed with the XDR_FREE operation.
[67] Fix | Delete
*
[68] Fix | Delete
* We write only one procedure per data type to make it easy
[69] Fix | Delete
* to keep the encode and decode procedures for a data type consistent.
[70] Fix | Delete
* In many cases the same code performs all operations on a user defined type,
[71] Fix | Delete
* because all the hard work is done in the component type routines.
[72] Fix | Delete
* decode as a series of calls on the nested data types.
[73] Fix | Delete
*/
[74] Fix | Delete
[75] Fix | Delete
/*
[76] Fix | Delete
* Xdr operations. XDR_ENCODE causes the type to be encoded into the
[77] Fix | Delete
* stream. XDR_DECODE causes the type to be extracted from the stream.
[78] Fix | Delete
* XDR_FREE can be used to release the space allocated by an XDR_DECODE
[79] Fix | Delete
* request.
[80] Fix | Delete
*/
[81] Fix | Delete
enum xdr_op {
[82] Fix | Delete
XDR_ENCODE=0,
[83] Fix | Delete
XDR_DECODE=1,
[84] Fix | Delete
XDR_FREE=2
[85] Fix | Delete
};
[86] Fix | Delete
[87] Fix | Delete
/*
[88] Fix | Delete
* This is the number of bytes per unit of external data.
[89] Fix | Delete
*/
[90] Fix | Delete
#define BYTES_PER_XDR_UNIT (4)
[91] Fix | Delete
#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \
[92] Fix | Delete
* BYTES_PER_XDR_UNIT)
[93] Fix | Delete
[94] Fix | Delete
/*
[95] Fix | Delete
* The XDR handle.
[96] Fix | Delete
* Contains operation which is being applied to the stream,
[97] Fix | Delete
* an operations vector for the particular implementation (e.g. see xdr_mem.c),
[98] Fix | Delete
* and two private fields for the use of the particular implementation.
[99] Fix | Delete
*/
[100] Fix | Delete
typedef struct __rpc_xdr {
[101] Fix | Delete
enum xdr_op x_op; /* operation; fast additional param */
[102] Fix | Delete
const struct xdr_ops {
[103] Fix | Delete
/* get a long from underlying stream */
[104] Fix | Delete
bool_t (*x_getlong)(struct __rpc_xdr *, long *);
[105] Fix | Delete
/* put a long to " */
[106] Fix | Delete
bool_t (*x_putlong)(struct __rpc_xdr *, const long *);
[107] Fix | Delete
/* get some bytes from " */
[108] Fix | Delete
bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int);
[109] Fix | Delete
/* put some bytes to " */
[110] Fix | Delete
bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int);
[111] Fix | Delete
/* returns bytes off from beginning */
[112] Fix | Delete
u_int (*x_getpostn)(struct __rpc_xdr *);
[113] Fix | Delete
/* lets you reposition the stream */
[114] Fix | Delete
bool_t (*x_setpostn)(struct __rpc_xdr *, u_int);
[115] Fix | Delete
/* buf quick ptr to buffered data */
[116] Fix | Delete
int32_t *(*x_inline)(struct __rpc_xdr *, u_int);
[117] Fix | Delete
/* free privates of this xdr_stream */
[118] Fix | Delete
void (*x_destroy)(struct __rpc_xdr *);
[119] Fix | Delete
bool_t (*x_control)(struct __rpc_xdr *, int, void *);
[120] Fix | Delete
} *x_ops;
[121] Fix | Delete
char * x_public; /* users' data */
[122] Fix | Delete
void * x_private; /* pointer to private data */
[123] Fix | Delete
char * x_base; /* private used for position info */
[124] Fix | Delete
u_int x_handy; /* extra private word */
[125] Fix | Delete
} XDR;
[126] Fix | Delete
[127] Fix | Delete
/*
[128] Fix | Delete
* A xdrproc_t exists for each data type which is to be encoded or decoded.
[129] Fix | Delete
*
[130] Fix | Delete
* The second argument to the xdrproc_t is a pointer to an opaque pointer.
[131] Fix | Delete
* The opaque pointer generally points to a structure of the data type
[132] Fix | Delete
* to be decoded. If this pointer is 0, then the type routines should
[133] Fix | Delete
* allocate dynamic storage of the appropriate size and return it.
[134] Fix | Delete
*/
[135] Fix | Delete
#ifdef _KERNEL
[136] Fix | Delete
typedef bool_t (*xdrproc_t)(XDR *, void *, u_int);
[137] Fix | Delete
#else
[138] Fix | Delete
/*
[139] Fix | Delete
* XXX can't actually prototype it, because some take three args!!!
[140] Fix | Delete
*/
[141] Fix | Delete
typedef bool_t (*xdrproc_t)(XDR *, ...);
[142] Fix | Delete
#endif
[143] Fix | Delete
[144] Fix | Delete
/*
[145] Fix | Delete
* Operations defined on a XDR handle
[146] Fix | Delete
*
[147] Fix | Delete
* XDR *xdrs;
[148] Fix | Delete
* long *longp;
[149] Fix | Delete
* char * addr;
[150] Fix | Delete
* u_int len;
[151] Fix | Delete
* u_int pos;
[152] Fix | Delete
*/
[153] Fix | Delete
#define XDR_GETLONG(xdrs, longp) \
[154] Fix | Delete
(*(xdrs)->x_ops->x_getlong)(xdrs, longp)
[155] Fix | Delete
#define xdr_getlong(xdrs, longp) \
[156] Fix | Delete
(*(xdrs)->x_ops->x_getlong)(xdrs, longp)
[157] Fix | Delete
[158] Fix | Delete
#define XDR_PUTLONG(xdrs, longp) \
[159] Fix | Delete
(*(xdrs)->x_ops->x_putlong)(xdrs, longp)
[160] Fix | Delete
#define xdr_putlong(xdrs, longp) \
[161] Fix | Delete
(*(xdrs)->x_ops->x_putlong)(xdrs, longp)
[162] Fix | Delete
[163] Fix | Delete
static __inline int
[164] Fix | Delete
xdr_getint32(XDR *xdrs, int32_t *ip)
[165] Fix | Delete
{
[166] Fix | Delete
long l;
[167] Fix | Delete
[168] Fix | Delete
if (!xdr_getlong(xdrs, &l))
[169] Fix | Delete
return (FALSE);
[170] Fix | Delete
*ip = (int32_t)l;
[171] Fix | Delete
return (TRUE);
[172] Fix | Delete
}
[173] Fix | Delete
[174] Fix | Delete
static __inline int
[175] Fix | Delete
xdr_putint32(XDR *xdrs, int32_t *ip)
[176] Fix | Delete
{
[177] Fix | Delete
long l;
[178] Fix | Delete
[179] Fix | Delete
l = (long)*ip;
[180] Fix | Delete
return xdr_putlong(xdrs, &l);
[181] Fix | Delete
}
[182] Fix | Delete
[183] Fix | Delete
#define XDR_GETINT32(xdrs, int32p) xdr_getint32(xdrs, int32p)
[184] Fix | Delete
#define XDR_PUTINT32(xdrs, int32p) xdr_putint32(xdrs, int32p)
[185] Fix | Delete
[186] Fix | Delete
#define XDR_GETBYTES(xdrs, addr, len) \
[187] Fix | Delete
(*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
[188] Fix | Delete
#define xdr_getbytes(xdrs, addr, len) \
[189] Fix | Delete
(*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
[190] Fix | Delete
[191] Fix | Delete
#define XDR_PUTBYTES(xdrs, addr, len) \
[192] Fix | Delete
(*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
[193] Fix | Delete
#define xdr_putbytes(xdrs, addr, len) \
[194] Fix | Delete
(*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
[195] Fix | Delete
[196] Fix | Delete
#define XDR_GETPOS(xdrs) \
[197] Fix | Delete
(*(xdrs)->x_ops->x_getpostn)(xdrs)
[198] Fix | Delete
#define xdr_getpos(xdrs) \
[199] Fix | Delete
(*(xdrs)->x_ops->x_getpostn)(xdrs)
[200] Fix | Delete
[201] Fix | Delete
#define XDR_SETPOS(xdrs, pos) \
[202] Fix | Delete
(*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
[203] Fix | Delete
#define xdr_setpos(xdrs, pos) \
[204] Fix | Delete
(*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
[205] Fix | Delete
[206] Fix | Delete
#define XDR_INLINE(xdrs, len) \
[207] Fix | Delete
(*(xdrs)->x_ops->x_inline)(xdrs, len)
[208] Fix | Delete
#define xdr_inline(xdrs, len) \
[209] Fix | Delete
(*(xdrs)->x_ops->x_inline)(xdrs, len)
[210] Fix | Delete
[211] Fix | Delete
#define XDR_DESTROY(xdrs) \
[212] Fix | Delete
if ((xdrs)->x_ops->x_destroy) \
[213] Fix | Delete
(*(xdrs)->x_ops->x_destroy)(xdrs)
[214] Fix | Delete
#define xdr_destroy(xdrs) \
[215] Fix | Delete
if ((xdrs)->x_ops->x_destroy) \
[216] Fix | Delete
(*(xdrs)->x_ops->x_destroy)(xdrs)
[217] Fix | Delete
[218] Fix | Delete
#define XDR_CONTROL(xdrs, req, op) \
[219] Fix | Delete
if ((xdrs)->x_ops->x_control) \
[220] Fix | Delete
(*(xdrs)->x_ops->x_control)(xdrs, req, op)
[221] Fix | Delete
#define xdr_control(xdrs, req, op) XDR_CONTROL(xdrs, req, op)
[222] Fix | Delete
[223] Fix | Delete
#define xdr_rpcvers(xdrs, versp) xdr_u_int32_t(xdrs, versp)
[224] Fix | Delete
#define xdr_rpcprog(xdrs, progp) xdr_u_int32_t(xdrs, progp)
[225] Fix | Delete
#define xdr_rpcproc(xdrs, procp) xdr_u_int32_t(xdrs, procp)
[226] Fix | Delete
#define xdr_rpcprot(xdrs, protp) xdr_u_int32_t(xdrs, protp)
[227] Fix | Delete
#define xdr_rpcport(xdrs, portp) xdr_u_int32_t(xdrs, portp)
[228] Fix | Delete
[229] Fix | Delete
/*
[230] Fix | Delete
* Support struct for discriminated unions.
[231] Fix | Delete
* You create an array of xdrdiscrim structures, terminated with
[232] Fix | Delete
* an entry with a null procedure pointer. The xdr_union routine gets
[233] Fix | Delete
* the discriminant value and then searches the array of structures
[234] Fix | Delete
* for a matching value. If a match is found the associated xdr routine
[235] Fix | Delete
* is called to handle that part of the union. If there is
[236] Fix | Delete
* no match, then a default routine may be called.
[237] Fix | Delete
* If there is no match and no default routine it is an error.
[238] Fix | Delete
*/
[239] Fix | Delete
#define NULL_xdrproc_t ((xdrproc_t)0)
[240] Fix | Delete
struct xdr_discrim {
[241] Fix | Delete
int value;
[242] Fix | Delete
xdrproc_t proc;
[243] Fix | Delete
};
[244] Fix | Delete
[245] Fix | Delete
/*
[246] Fix | Delete
* In-line routines for fast encode/decode of primitive data types.
[247] Fix | Delete
* Caveat emptor: these use single memory cycles to get the
[248] Fix | Delete
* data from the underlying buffer, and will fail to operate
[249] Fix | Delete
* properly if the data is not aligned. The standard way to use these
[250] Fix | Delete
* is to say:
[251] Fix | Delete
* if ((buf = XDR_INLINE(xdrs, count)) == NULL)
[252] Fix | Delete
* return (FALSE);
[253] Fix | Delete
* <<< macro calls >>>
[254] Fix | Delete
* where ``count'' is the number of bytes of data occupied
[255] Fix | Delete
* by the primitive data types.
[256] Fix | Delete
*
[257] Fix | Delete
* N.B. and frozen for all time: each data type here uses 4 bytes
[258] Fix | Delete
* of external representation.
[259] Fix | Delete
*/
[260] Fix | Delete
#define IXDR_GET_INT32(buf) ((int32_t)ntohl((u_int32_t)*(buf)++))
[261] Fix | Delete
#define IXDR_PUT_INT32(buf, v) (*(buf)++ =(int32_t)htonl((u_int32_t)v))
[262] Fix | Delete
#define IXDR_GET_U_INT32(buf) ((u_int32_t)IXDR_GET_INT32(buf))
[263] Fix | Delete
#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32((buf), ((int32_t)(v)))
[264] Fix | Delete
[265] Fix | Delete
#define IXDR_GET_LONG(buf) ((long)ntohl((u_int32_t)*(buf)++))
[266] Fix | Delete
#define IXDR_PUT_LONG(buf, v) (*(buf)++ =(int32_t)htonl((u_int32_t)v))
[267] Fix | Delete
[268] Fix | Delete
#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf))
[269] Fix | Delete
#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf))
[270] Fix | Delete
#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
[271] Fix | Delete
#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf))
[272] Fix | Delete
#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf))
[273] Fix | Delete
[274] Fix | Delete
#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), (v))
[275] Fix | Delete
#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), (v))
[276] Fix | Delete
#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), (v))
[277] Fix | Delete
#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), (v))
[278] Fix | Delete
#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), (v))
[279] Fix | Delete
[280] Fix | Delete
/*
[281] Fix | Delete
* These are the "generic" xdr routines.
[282] Fix | Delete
*/
[283] Fix | Delete
#ifdef __cplusplus
[284] Fix | Delete
extern "C" {
[285] Fix | Delete
#endif
[286] Fix | Delete
extern bool_t xdr_void(void);
[287] Fix | Delete
extern bool_t xdr_int(XDR *, int *);
[288] Fix | Delete
extern bool_t xdr_u_int(XDR *, u_int *);
[289] Fix | Delete
extern bool_t xdr_long(XDR *, long *);
[290] Fix | Delete
extern bool_t xdr_u_long(XDR *, u_long *);
[291] Fix | Delete
extern bool_t xdr_short(XDR *, short *);
[292] Fix | Delete
extern bool_t xdr_u_short(XDR *, u_short *);
[293] Fix | Delete
extern bool_t xdr_int8_t(XDR *, int8_t *);
[294] Fix | Delete
extern bool_t xdr_u_int8_t(XDR *, uint8_t *);
[295] Fix | Delete
extern bool_t xdr_uint8_t(XDR *, uint8_t *);
[296] Fix | Delete
extern bool_t xdr_int16_t(XDR *, int16_t *);
[297] Fix | Delete
extern bool_t xdr_u_int16_t(XDR *, u_int16_t *);
[298] Fix | Delete
extern bool_t xdr_uint16_t(XDR *, uint16_t *);
[299] Fix | Delete
extern bool_t xdr_int32_t(XDR *, int32_t *);
[300] Fix | Delete
extern bool_t xdr_u_int32_t(XDR *, u_int32_t *);
[301] Fix | Delete
extern bool_t xdr_uint32_t(XDR *, uint32_t *);
[302] Fix | Delete
extern bool_t xdr_int64_t(XDR *, int64_t *);
[303] Fix | Delete
extern bool_t xdr_u_int64_t(XDR *, u_int64_t *);
[304] Fix | Delete
extern bool_t xdr_uint64_t(XDR *, uint64_t *);
[305] Fix | Delete
extern bool_t xdr_quad_t(XDR *, int64_t *);
[306] Fix | Delete
extern bool_t xdr_u_quad_t(XDR *, u_int64_t *);
[307] Fix | Delete
extern bool_t xdr_bool(XDR *, bool_t *);
[308] Fix | Delete
extern bool_t xdr_enum(XDR *, enum_t *);
[309] Fix | Delete
extern bool_t xdr_array(XDR *, char **, u_int *, u_int, u_int, xdrproc_t);
[310] Fix | Delete
extern bool_t xdr_bytes(XDR *, char **, u_int *, u_int);
[311] Fix | Delete
extern bool_t xdr_opaque(XDR *, char *, u_int);
[312] Fix | Delete
extern bool_t xdr_string(XDR *, char **, u_int);
[313] Fix | Delete
extern bool_t xdr_union(XDR *, enum_t *, char *, const struct xdr_discrim *, xdrproc_t);
[314] Fix | Delete
extern bool_t xdr_char(XDR *, char *);
[315] Fix | Delete
extern bool_t xdr_u_char(XDR *, u_char *);
[316] Fix | Delete
extern bool_t xdr_vector(XDR *, char *, u_int, u_int, xdrproc_t);
[317] Fix | Delete
extern bool_t xdr_float(XDR *, float *);
[318] Fix | Delete
extern bool_t xdr_double(XDR *, double *);
[319] Fix | Delete
extern bool_t xdr_quadruple(XDR *, long double *);
[320] Fix | Delete
extern bool_t xdr_reference(XDR *, char **, u_int, xdrproc_t);
[321] Fix | Delete
extern bool_t xdr_pointer(XDR *, char **, u_int, xdrproc_t);
[322] Fix | Delete
extern bool_t xdr_wrapstring(XDR *, char **);
[323] Fix | Delete
extern void xdr_free(xdrproc_t, void *);
[324] Fix | Delete
extern bool_t xdr_hyper(XDR *, quad_t *);
[325] Fix | Delete
extern bool_t xdr_u_hyper(XDR *, u_quad_t *);
[326] Fix | Delete
extern bool_t xdr_longlong_t(XDR *, quad_t *);
[327] Fix | Delete
extern bool_t xdr_u_longlong_t(XDR *, u_quad_t *);
[328] Fix | Delete
extern u_long xdr_sizeof(xdrproc_t, void *);
[329] Fix | Delete
#ifdef __cplusplus
[330] Fix | Delete
}
[331] Fix | Delete
#endif
[332] Fix | Delete
[333] Fix | Delete
/*
[334] Fix | Delete
* Common opaque bytes objects used by many rpc protocols;
[335] Fix | Delete
* declared here due to commonality.
[336] Fix | Delete
*/
[337] Fix | Delete
#define MAX_NETOBJ_SZ 1024
[338] Fix | Delete
struct netobj {
[339] Fix | Delete
u_int n_len;
[340] Fix | Delete
char *n_bytes;
[341] Fix | Delete
};
[342] Fix | Delete
typedef struct netobj netobj;
[343] Fix | Delete
extern bool_t xdr_netobj(XDR *, struct netobj *);
[344] Fix | Delete
[345] Fix | Delete
/*
[346] Fix | Delete
* These are the public routines for the various implementations of
[347] Fix | Delete
* xdr streams.
[348] Fix | Delete
*/
[349] Fix | Delete
#ifdef __cplusplus
[350] Fix | Delete
extern "C" {
[351] Fix | Delete
#endif
[352] Fix | Delete
/* XDR using memory buffers */
[353] Fix | Delete
extern void xdrmem_create(XDR *, char *, u_int, enum xdr_op);
[354] Fix | Delete
[355] Fix | Delete
/* XDR using stdio library */
[356] Fix | Delete
extern void xdrstdio_create(XDR *, FILE *, enum xdr_op);
[357] Fix | Delete
[358] Fix | Delete
/* XDR pseudo records for tcp */
[359] Fix | Delete
extern void xdrrec_create(XDR *, u_int, u_int, void *,
[360] Fix | Delete
int (*)(void *, void *, int),
[361] Fix | Delete
int (*)(void *, void *, int));
[362] Fix | Delete
[363] Fix | Delete
/* make end of xdr record */
[364] Fix | Delete
extern bool_t xdrrec_endofrecord(XDR *, int);
[365] Fix | Delete
[366] Fix | Delete
/* move to beginning of next record */
[367] Fix | Delete
extern bool_t xdrrec_skiprecord(XDR *);
[368] Fix | Delete
[369] Fix | Delete
/* true if no more input */
[370] Fix | Delete
extern bool_t xdrrec_eof(XDR *);
[371] Fix | Delete
extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int);
[372] Fix | Delete
#ifdef __cplusplus
[373] Fix | Delete
}
[374] Fix | Delete
#endif
[375] Fix | Delete
[376] Fix | Delete
#endif /* !_TIRPC_XDR_H */
[377] Fix | Delete
[378] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function