Lines 43-48
Link Here
|
43 |
#define _RPC_XDR_H |
43 |
#define _RPC_XDR_H |
44 |
#include <sys/cdefs.h> |
44 |
#include <sys/cdefs.h> |
45 |
|
45 |
|
|
|
46 |
#ifdef __cplusplus |
47 |
extern "C" { |
48 |
#endif |
49 |
|
46 |
/* |
50 |
/* |
47 |
* XDR provides a conventional way for converting between C data |
51 |
* XDR provides a conventional way for converting between C data |
48 |
* types and an external bit-string representation. Library supplied |
52 |
* types and an external bit-string representation. Library supplied |
Lines 97-122
Link Here
|
97 |
* an operations vector for the particular implementation (e.g. see xdr_mem.c), |
101 |
* an operations vector for the particular implementation (e.g. see xdr_mem.c), |
98 |
* and two private fields for the use of the particular implementation. |
102 |
* and two private fields for the use of the particular implementation. |
99 |
*/ |
103 |
*/ |
100 |
typedef struct __rpc_xdr { |
104 |
typedef struct XDR { |
101 |
enum xdr_op x_op; /* operation; fast additional param */ |
105 |
enum xdr_op x_op; /* operation; fast additional param */ |
102 |
const struct xdr_ops { |
106 |
const struct xdr_ops { |
103 |
/* get a long from underlying stream */ |
107 |
/* get a long from underlying stream */ |
104 |
bool_t (*x_getlong)(struct __rpc_xdr *, long *); |
108 |
bool_t (*x_getlong)(struct XDR *, long *); |
105 |
/* put a long to " */ |
109 |
/* put a long to " */ |
106 |
bool_t (*x_putlong)(struct __rpc_xdr *, const long *); |
110 |
bool_t (*x_putlong)(struct XDR *, const long *); |
107 |
/* get some bytes from " */ |
111 |
/* get some bytes from " */ |
108 |
bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int); |
112 |
bool_t (*x_getbytes)(struct XDR *, char *, u_int); |
109 |
/* put some bytes to " */ |
113 |
/* put some bytes to " */ |
110 |
bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int); |
114 |
bool_t (*x_putbytes)(struct XDR *, const char *, u_int); |
111 |
/* returns bytes off from beginning */ |
115 |
/* returns bytes off from beginning */ |
112 |
u_int (*x_getpostn)(struct __rpc_xdr *); |
116 |
u_int (*x_getpostn)(struct XDR *); |
113 |
/* lets you reposition the stream */ |
117 |
/* lets you reposition the stream */ |
114 |
bool_t (*x_setpostn)(struct __rpc_xdr *, u_int); |
118 |
bool_t (*x_setpostn)(struct XDR *, u_int); |
115 |
/* buf quick ptr to buffered data */ |
119 |
/* buf quick ptr to buffered data */ |
116 |
int32_t *(*x_inline)(struct __rpc_xdr *, u_int); |
120 |
int32_t *(*x_inline)(struct XDR *, u_int); |
117 |
/* free privates of this xdr_stream */ |
121 |
/* free privates of this xdr_stream */ |
118 |
void (*x_destroy)(struct __rpc_xdr *); |
122 |
void (*x_destroy)(struct XDR *); |
119 |
bool_t (*x_control)(struct __rpc_xdr *, int, void *); |
123 |
bool_t (*x_control)(struct XDR *, int, void *); |
120 |
} *x_ops; |
124 |
} *x_ops; |
121 |
char * x_public; /* users' data */ |
125 |
char * x_public; /* users' data */ |
122 |
void * x_private; /* pointer to private data */ |
126 |
void * x_private; /* pointer to private data */ |
Lines 366-369
Link Here
|
366 |
extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int); |
370 |
extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int); |
367 |
__END_DECLS |
371 |
__END_DECLS |
368 |
|
372 |
|
|
|
373 |
#ifdef __cplusplus |
374 |
} |
375 |
#endif |
376 |
|
369 |
#endif /* !_RPC_XDR_H */ |
377 |
#endif /* !_RPC_XDR_H */ |