-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathxdr.h
502 lines (466 loc) · 24.3 KB
/
xdr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
#ifndef XDR_H
#define XDR_H
#include <stdio.h>
#include <stdint.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "proclib.h"
struct XDR_FieldDefinition;
#ifndef XDR_PRINT_STYLE_ENUM
#define XDR_PRINT_STYLE_ENUM
#ifdef __cplusplus
enum XDR_PRINT_STYLE : short { XDR_PRINT_HUMAN, XDR_PRINT_KVP, XDR_PRINT_CSV_HEA
DER, XDR_PRINT_CSV_DATA };
#else
enum XDR_PRINT_STYLE { XDR_PRINT_HUMAN, XDR_PRINT_KVP, XDR_PRINT_CSV_HEADER,
XDR_PRINT_CSV_DATA };
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct XDR_Dictionary;
typedef int (*XDR_Decoder)(char *src, void *dst, size_t *inc, size_t max,
void *len);
typedef int (*XDR_Encoder)(char *src, void *dst, size_t *inc, size_t max,
void *len);
typedef void (*XDR_print_func)(FILE *out, void *data, void *arg, const char *,
enum XDR_PRINT_STYLE style, int *line, int level);
typedef void (*XDR_print_field_func)(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
typedef double (*XDR_conversion_func)(double);
typedef void (*XDR_field_scanner)(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
typedef void (*XDR_tx_struct)(void *data, void *arg, uint32_t error);
typedef void (*XDR_populate_struct)(void *arg, XDR_tx_struct cb, void *cb_arg);
typedef int (*XDR_dict_itr_cb)(struct XDR_Dictionary *table, const char *key, void *value, void *arg);
#define XDR_HASH_LEN 29
struct XDR_Union {
uint32_t type;
void *data;
};
struct XDR_TypeFunctions {
XDR_Decoder decoder;
XDR_Encoder encoder;
XDR_print_field_func printer;
XDR_field_scanner scanner;
void (*field_dealloc)(void **, struct XDR_FieldDefinition *field);
};
struct XDR_Dictnode {
void *data;
struct XDR_Dictnode *next;
struct XDR_Dictionary *table;
char key[2];
};
struct XDR_Dictionary {
uint32_t length;
struct XDR_Dictnode *node[XDR_HASH_LEN];
};
struct XDR_FieldDefinition {
struct XDR_TypeFunctions *funcs;
size_t offset;
const char *key;
const char *name;
const char *unit;
XDR_conversion_func conversion;
XDR_conversion_func inverse_conv;
uint32_t struct_id;
const char *description;
size_t len_offset;
const char *true_label;
const char *false_label;
};
struct XDR_StructDefinition {
uint32_t type;
size_t in_memory_size;
int (*encoder)(void *src, char *dst, size_t *inc, size_t max,
uint32_t type, void *arg);
int (*decoder)(char *src, void *dst, size_t *used, size_t max, void *arg);
void *arg;
void *(*allocator)(struct XDR_StructDefinition *def);
void (*deallocator)(void **goner, struct XDR_StructDefinition *def);
XDR_print_func print_func;
XDR_populate_struct populate;
void *populate_arg;
};
extern void XDR_register_structs(struct XDR_StructDefinition*);
extern void XDR_register_struct(struct XDR_StructDefinition*);
extern void XDR_register_populator(XDR_populate_struct cb,
void *arg, uint32_t type);
extern void XDR_replace_populator(XDR_populate_struct cb, void *arg,
uint32_t type, XDR_populate_struct *cbOut, void **argOut);
extern struct XDR_StructDefinition *XDR_definition_for_type(uint32_t type);
extern void XDR_set_struct_print_function(XDR_print_func func, uint32_t type);
extern void XDR_set_field_print_function(XDR_print_field_func func,
uint32_t struct_type, uint32_t field);
extern int XDR_array_encoder(char *src, void *dst, size_t *used, size_t max,
int len, size_t increment, XDR_Encoder enc, void *enc_arg);
extern int XDR_array_decoder(char *src, void *dst, size_t *used, size_t max,
int len, size_t increment, XDR_Decoder dec, void *dec_arg);
extern int XDR_struct_encoder(void *src, char *dst, size_t *encoded_size,
size_t max, uint32_t type, void *arg);
extern int XDR_bitfield_struct_encoder(void *src, char *dst,
size_t *encoded_size, size_t max, uint32_t type, void *arg);
extern void XDR_print_structure(uint32_t type,
struct XDR_StructDefinition *str, char *buff, size_t len, void *arg1,
int arg2, const char *parent);
extern void XDR_array_field_printer(FILE *out, void *src_ptr,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
void *len_ptr, XDR_print_field_func print, size_t increment,
const char *parent, int *line, int level);
extern void XDR_array_field_scanner(const char *in, void *dst_ptr, void *arg,
void *len_ptr, XDR_field_scanner scan, void *enc_arg,
size_t increment, XDR_conversion_func conv);
extern void XDR_print_fields_func(FILE *out, void *data, void *arg,
const char*, enum XDR_PRINT_STYLE style, int *line, int level);
extern int XDR_dictionary_encoder(struct XDR_Dictionary *src, void *dst,
size_t *used, size_t max, XDR_Encoder enc, size_t ent_size, void *enc_arg);
extern int XDR_dictionary_decoder(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, XDR_Decoder dec, size_t ent_size, void *dec_arg);
extern void XDR_dictionary_field_printer(FILE *out, void *src_ptr,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
void *len_ptr, XDR_print_field_func print, size_t increment,
const char *parent, int *line, int level);
// All decoder functions take the exact same set of parameters to
// permit more efficient, generic parsing code
//
// The parameters are:
// char *src -- The address to start decoding from
// void *dst -- The address to store the decoded data. The structure of this
// memory will be type dependent
// size_t *used -- Out parameter that returns the number of bytes used from
// the src buffer
// size_t max -- The total number of bytes available in the src buffer
//
// Returns negative number on error, or 0 on success. Positive numbers are
// reserved for future use
extern int XDR_struct_decoder(char *src, void *dst, size_t *used,
size_t max, void *arg);
extern int XDR_bitfield_struct_decoder(char *src, void *dst, size_t *used,
size_t max, void *arg);
extern int XDR_decodebf_int32(char *src, int32_t *dst, size_t *used,
size_t max, void *len);
extern int XDR_decodebf_uint32(char *src, uint32_t *dst, size_t *used,
size_t max, void *len);
extern int XDR_decode_int32(char *src, int32_t *dst, size_t *used, size_t max,
void *len);
extern int XDR_decode_uint32(char *src, uint32_t *dst, size_t *used,
size_t max, void *len);
extern int XDR_decode_int64(char *src, int64_t *dst, size_t *used, size_t max,
void *len);
extern int XDR_decode_uint64(char *src, uint64_t *dst, size_t *used,
size_t max, void *len);
extern int XDR_decode_float(char *src, float *dst, size_t *used, size_t max,
void *len);
extern int XDR_decode_double(char *src, double *dst, size_t *used, size_t max,
void *len);
extern int XDR_decode_union(char *src, struct XDR_Union *dst, size_t *used,
size_t max, void *len);
extern int XDR_decode_string(char *src, char **dst, size_t *used,
size_t max, void *len);
extern int XDR_decode_byte_array(char *src, char **dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_uint32_array(char *src, uint32_t **dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_int32_array(char *src, int32_t **dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_int64_array(char *src, int64_t **dst, size_t *used,
size_t max, void *len);
extern int XDR_decode_uint64_array(char *src, uint64_t **dst, size_t *used,
size_t max, void *len);
extern int XDR_decode_float_array(char *src, float **dst, size_t *used,
size_t max, void *len);
extern int XDR_decode_double_array(char *src, double **dst, size_t *used,
size_t max, void *len);
extern int XDR_decode_union_array(char *src, struct XDR_Union **dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_string_array(char *src, char **dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_uint32_dictionary(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_int32_dictionary(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_int64_dictionary(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_uint64_dictionary(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_float_dictionary(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_double_dictionary(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_union_dictionary(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_byte_arr_dictionary(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, void *len);
extern int XDR_decode_string_arr_dictionary(char *src, struct XDR_Dictionary *dst,
size_t *used, size_t max, void *len);
// Encode functions
extern int XDR_encodebf_uint32(uint32_t *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_uint32(uint32_t *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_int32(int32_t *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_int64(int64_t *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_uint64(uint64_t *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_union(struct XDR_Union *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_string(const char *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_float(float *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_double(double *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_byte_array(char **src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_uint32_array(uint32_t **src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_int32_array(int32_t **src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_int64_array(int64_t **src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_uint64_array(uint64_t **src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_union_array(struct XDR_Union **src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_float_array(float **src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_double_array(double **src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_string_array(const char **src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_uint32_dictionary(struct XDR_Dictionary *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_int32_dictionary(struct XDR_Dictionary *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_int64_dictionary(struct XDR_Dictionary *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_uint64_dictionary(struct XDR_Dictionary *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_union_dictionary(struct XDR_Dictionary *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_float_dictionary(struct XDR_Dictionary *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_double_dictionary(struct XDR_Dictionary *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_byte_arr_dictionary(struct XDR_Dictionary *src, char *dst,
size_t *used, size_t max, void *len);
extern int XDR_encode_string_arr_dictionary(struct XDR_Dictionary *src, char *dst,
size_t *used, size_t max, void *len);
extern void *XDR_malloc_allocator(struct XDR_StructDefinition*);
extern void XDR_free_deallocator(void **goner, struct XDR_StructDefinition *);
extern void XDR_struct_free_deallocator(void **goner,
struct XDR_StructDefinition *def);
extern void XDR_struct_free_fields(void **goner,
struct XDR_StructDefinition *def);
extern void XDR_struct_field_deallocator(void **goner,
struct XDR_FieldDefinition *field);
extern void XDR_struct_array_field_deallocator(void **goner,
struct XDR_FieldDefinition *field);
extern void XDR_array_field_deallocator(void **goner,
struct XDR_FieldDefinition *field);
extern void XDR_union_field_deallocator(void **goner,
struct XDR_FieldDefinition *field);
extern void XDR_union_array_field_deallocator(void **goner,
struct XDR_FieldDefinition *field);
extern void XDR_dictionary_field_deallocator(void **goner,
struct XDR_FieldDefinition *field);
extern void XDR_free_union(struct XDR_Union *goner);
extern void XDR_print_field_char(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_int32(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_uint32(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_int64(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_uint64(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_union(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_byte_string(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_string(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_float(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_double(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_structure(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_int32_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_uint32_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_int64_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_uint64_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_union_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_string_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_float_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_double_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_structure_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_byte_arr_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_string_arr_dictionary(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_structure_array(FILE *out, void *src_ptr,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
void *len_ptr, size_t increment, const char *parent, int *line, int level);
extern void XDR_print_field_char_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_int32_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_uint32_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_int64_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_uint64_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_union_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_byte_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *, int *line, int level);
extern void XDR_print_field_float_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_double_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_print_field_string_array(FILE *out, void *data,
struct XDR_FieldDefinition *field, enum XDR_PRINT_STYLE style,
const char *parent, void *len, int *line, int level);
extern void XDR_scan_float(const char *in, void *dst, void *arg, void *len,
XDR_conversion_func conv);
extern void XDR_scan_double(const char *in, void *dst, void *arg, void *len,
XDR_conversion_func conv);
extern void XDR_scan_char(const char *in, void *dst, void *arg, void *len,
XDR_conversion_func conv);
extern void XDR_scan_int32(const char *in, void *dst, void *arg, void *len,
XDR_conversion_func conv);
extern void XDR_scan_uint32(const char *in, void *dst, void *arg, void *len,
XDR_conversion_func conv);
extern void XDR_scan_int64(const char *in, void *dst, void *arg, void *len,
XDR_conversion_func conv);
extern void XDR_scan_uint64(const char *in, void *dst, void *arg, void *len,
XDR_conversion_func conv);
extern void XDR_scan_string(const char *in, void *dst, void *arg, void *len,
XDR_conversion_func conv);
extern void XDR_scan_byte(const char *in, void *dst, void *arg, void *len,
XDR_conversion_func conv);
extern void XDR_scan_float_dictionary(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_double_dictionary(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_int32_dictionary(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_uint32_dictionary(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_int64_dictionary(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_uint64_dictionary(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_string_arr_dictionary(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_byte_arr_dictionary(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_float_array(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_double_array(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_char_array(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_int32_array(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_uint32_array(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_int64_array(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_uint64_array(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_string_array(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern void XDR_scan_byte_array(const char *in, void *dst, void *arg,
void *len, XDR_conversion_func conv);
extern struct XDR_Dictnode **XDR_dict_lookup_node(struct XDR_Dictionary *table, const char *key);
extern void *XDR_dict_lookup(struct XDR_Dictionary *table, const char *key);
extern void *XDR_dict_remove(struct XDR_Dictionary *table, const char *key);
extern int XDR_dict_remove_all(struct XDR_Dictionary *table, XDR_dict_itr_cb freeCB, void *arg);
extern int XDR_dict_add(struct XDR_Dictionary *table, const char *key, void *value);
extern void XDR_dict_iterate(struct XDR_Dictionary *table, XDR_dict_itr_cb cb, void *arg);
extern char *XDR_dict_lookup_value(struct XDR_Dictionary *table, void *val);
extern int XDR_dict_bucket(const char * key);
int XDR_dictionary_free_cb(struct XDR_Dictionary *table, const char *key,
void *value, void *arg);
extern struct XDR_TypeFunctions xdr_float_functions;
extern struct XDR_TypeFunctions xdr_float_arr_functions;
extern struct XDR_TypeFunctions xdr_float_dict_functions;
extern struct XDR_TypeFunctions xdr_double_functions;
extern struct XDR_TypeFunctions xdr_double_arr_functions;
extern struct XDR_TypeFunctions xdr_double_dict_functions;
extern struct XDR_TypeFunctions xdr_char_functions;
extern struct XDR_TypeFunctions xdr_char_arr_functions;
extern struct XDR_TypeFunctions xdr_int32_functions;
extern struct XDR_TypeFunctions xdr_int32_arr_functions;
extern struct XDR_TypeFunctions xdr_int32_dict_functions;
extern struct XDR_TypeFunctions xdr_uint32_functions;
extern struct XDR_TypeFunctions xdr_uint32_arr_functions;
extern struct XDR_TypeFunctions xdr_uint32_dict_functions;
extern struct XDR_TypeFunctions xdr_int64_functions;
extern struct XDR_TypeFunctions xdr_int64_arr_functions;
extern struct XDR_TypeFunctions xdr_int64_dict_functions;
extern struct XDR_TypeFunctions xdr_uint64_functions;
extern struct XDR_TypeFunctions xdr_uint64_arr_functions;
extern struct XDR_TypeFunctions xdr_uint64_dict_functions;
extern struct XDR_TypeFunctions xdr_string_functions;
extern struct XDR_TypeFunctions xdr_string_arr_functions;
extern struct XDR_TypeFunctions xdr_string_arr_dict_functions;
extern struct XDR_TypeFunctions xdr_byte_arr_functions;
extern struct XDR_TypeFunctions xdr_byte_arr_dict_functions;
extern struct XDR_TypeFunctions xdr_union_functions;
extern struct XDR_TypeFunctions xdr_union_arr_functions;
extern struct XDR_TypeFunctions xdr_union_dict_functions;
extern struct XDR_TypeFunctions xdr_int32_bitfield_functions;
extern struct XDR_TypeFunctions xdr_uint32_bitfield_functions;
#ifdef __cplusplus
}
#endif
#endif