]> git.gag.com Git - debian/amanda/blob - ndmp-src/ndmp3_xdr.c
lintian doesn't like orphan packages with uploaders...
[debian/amanda] / ndmp-src / ndmp3_xdr.c
1 /*
2  * Please do not edit this file.
3  * It was generated using rpcgen.
4  */
5
6 #include "ndmp3.h"
7 #ifndef NDMOS_OPTION_NO_NDMP3
8 #define ndmp3_u_quad unsigned long long
9 extern bool_t xdr_ndmp3_u_quad();
10
11 bool_t
12 xdr__ndmp3_u_quad (XDR *xdrs, _ndmp3_u_quad *objp)
13 {
14         register int32_t *buf;
15
16          if (!xdr_u_long (xdrs, &objp->high))
17                  return FALSE;
18          if (!xdr_u_long (xdrs, &objp->low))
19                  return FALSE;
20         return TRUE;
21 }
22
23 bool_t
24 xdr_ndmp3_pval (XDR *xdrs, ndmp3_pval *objp)
25 {
26         register int32_t *buf;
27
28          if (!xdr_string (xdrs, &objp->name, ~0))
29                  return FALSE;
30          if (!xdr_string (xdrs, &objp->value, ~0))
31                  return FALSE;
32         return TRUE;
33 }
34
35 bool_t
36 xdr_ndmp3_error (XDR *xdrs, ndmp3_error *objp)
37 {
38         register int32_t *buf;
39
40          if (!xdr_enum (xdrs, (enum_t *) objp))
41                  return FALSE;
42         return TRUE;
43 }
44
45 bool_t
46 xdr_ndmp3_header_message_type (XDR *xdrs, ndmp3_header_message_type *objp)
47 {
48         register int32_t *buf;
49
50          if (!xdr_enum (xdrs, (enum_t *) objp))
51                  return FALSE;
52         return TRUE;
53 }
54
55 bool_t
56 xdr_ndmp3_message (XDR *xdrs, ndmp3_message *objp)
57 {
58         register int32_t *buf;
59
60          if (!xdr_enum (xdrs, (enum_t *) objp))
61                  return FALSE;
62         return TRUE;
63 }
64
65 bool_t
66 xdr_ndmp3_header (XDR *xdrs, ndmp3_header *objp)
67 {
68         register int32_t *buf;
69
70          if (!xdr_u_long (xdrs, &objp->sequence))
71                  return FALSE;
72          if (!xdr_u_long (xdrs, &objp->time_stamp))
73                  return FALSE;
74          if (!xdr_ndmp3_header_message_type (xdrs, &objp->message_type))
75                  return FALSE;
76          if (!xdr_ndmp3_message (xdrs, &objp->message))
77                  return FALSE;
78          if (!xdr_u_long (xdrs, &objp->reply_sequence))
79                  return FALSE;
80          if (!xdr_ndmp3_error (xdrs, &objp->error))
81                  return FALSE;
82         return TRUE;
83 }
84
85 bool_t
86 xdr_ndmp3_connect_open_request (XDR *xdrs, ndmp3_connect_open_request *objp)
87 {
88         register int32_t *buf;
89
90          if (!xdr_u_short (xdrs, &objp->protocol_version))
91                  return FALSE;
92         return TRUE;
93 }
94
95 bool_t
96 xdr_ndmp3_connect_open_reply (XDR *xdrs, ndmp3_connect_open_reply *objp)
97 {
98         register int32_t *buf;
99
100          if (!xdr_ndmp3_error (xdrs, &objp->error))
101                  return FALSE;
102         return TRUE;
103 }
104
105 bool_t
106 xdr_ndmp3_auth_type (XDR *xdrs, ndmp3_auth_type *objp)
107 {
108         register int32_t *buf;
109
110          if (!xdr_enum (xdrs, (enum_t *) objp))
111                  return FALSE;
112         return TRUE;
113 }
114
115 bool_t
116 xdr_ndmp3_auth_text (XDR *xdrs, ndmp3_auth_text *objp)
117 {
118         register int32_t *buf;
119
120          if (!xdr_string (xdrs, &objp->auth_id, ~0))
121                  return FALSE;
122          if (!xdr_string (xdrs, &objp->auth_password, ~0))
123                  return FALSE;
124         return TRUE;
125 }
126
127 bool_t
128 xdr_ndmp3_auth_md5 (XDR *xdrs, ndmp3_auth_md5 *objp)
129 {
130         register int32_t *buf;
131
132         int i;
133          if (!xdr_string (xdrs, &objp->auth_id, ~0))
134                  return FALSE;
135          if (!xdr_opaque (xdrs, objp->auth_digest, 16))
136                  return FALSE;
137         return TRUE;
138 }
139
140 bool_t
141 xdr_ndmp3_auth_data (XDR *xdrs, ndmp3_auth_data *objp)
142 {
143         register int32_t *buf;
144
145          if (!xdr_ndmp3_auth_type (xdrs, &objp->auth_type))
146                  return FALSE;
147         switch (objp->auth_type) {
148         case NDMP3_AUTH_NONE:
149                 break;
150         case NDMP3_AUTH_TEXT:
151                  if (!xdr_ndmp3_auth_text (xdrs, &objp->ndmp3_auth_data_u.auth_text))
152                          return FALSE;
153                 break;
154         case NDMP3_AUTH_MD5:
155                  if (!xdr_ndmp3_auth_md5 (xdrs, &objp->ndmp3_auth_data_u.auth_md5))
156                          return FALSE;
157                 break;
158         default:
159                 return FALSE;
160         }
161         return TRUE;
162 }
163
164 bool_t
165 xdr_ndmp3_connect_client_auth_request (XDR *xdrs, ndmp3_connect_client_auth_request *objp)
166 {
167         register int32_t *buf;
168
169          if (!xdr_ndmp3_auth_data (xdrs, &objp->auth_data))
170                  return FALSE;
171         return TRUE;
172 }
173
174 bool_t
175 xdr_ndmp3_connect_client_auth_reply (XDR *xdrs, ndmp3_connect_client_auth_reply *objp)
176 {
177         register int32_t *buf;
178
179          if (!xdr_ndmp3_error (xdrs, &objp->error))
180                  return FALSE;
181         return TRUE;
182 }
183
184 bool_t
185 xdr_ndmp3_auth_attr (XDR *xdrs, ndmp3_auth_attr *objp)
186 {
187         register int32_t *buf;
188
189          if (!xdr_ndmp3_auth_type (xdrs, &objp->auth_type))
190                  return FALSE;
191         switch (objp->auth_type) {
192         case NDMP3_AUTH_NONE:
193                 break;
194         case NDMP3_AUTH_TEXT:
195                 break;
196         case NDMP3_AUTH_MD5:
197                  if (!xdr_opaque (xdrs, objp->ndmp3_auth_attr_u.challenge, 64))
198                          return FALSE;
199                 break;
200         default:
201                 return FALSE;
202         }
203         return TRUE;
204 }
205
206 bool_t
207 xdr_ndmp3_connect_server_auth_request (XDR *xdrs, ndmp3_connect_server_auth_request *objp)
208 {
209         register int32_t *buf;
210
211          if (!xdr_ndmp3_auth_attr (xdrs, &objp->client_attr))
212                  return FALSE;
213         return TRUE;
214 }
215
216 bool_t
217 xdr_ndmp3_connect_server_auth_reply (XDR *xdrs, ndmp3_connect_server_auth_reply *objp)
218 {
219         register int32_t *buf;
220
221          if (!xdr_ndmp3_error (xdrs, &objp->error))
222                  return FALSE;
223          if (!xdr_ndmp3_auth_data (xdrs, &objp->server_result))
224                  return FALSE;
225         return TRUE;
226 }
227
228 bool_t
229 xdr_ndmp3_config_get_host_info_reply (XDR *xdrs, ndmp3_config_get_host_info_reply *objp)
230 {
231         register int32_t *buf;
232
233          if (!xdr_ndmp3_error (xdrs, &objp->error))
234                  return FALSE;
235          if (!xdr_string (xdrs, &objp->hostname, ~0))
236                  return FALSE;
237          if (!xdr_string (xdrs, &objp->os_type, ~0))
238                  return FALSE;
239          if (!xdr_string (xdrs, &objp->os_vers, ~0))
240                  return FALSE;
241          if (!xdr_string (xdrs, &objp->hostid, ~0))
242                  return FALSE;
243         return TRUE;
244 }
245
246 bool_t
247 xdr_ndmp3_addr_type (XDR *xdrs, ndmp3_addr_type *objp)
248 {
249         register int32_t *buf;
250
251          if (!xdr_enum (xdrs, (enum_t *) objp))
252                  return FALSE;
253         return TRUE;
254 }
255
256 bool_t
257 xdr_ndmp3_config_get_connection_type_reply (XDR *xdrs, ndmp3_config_get_connection_type_reply *objp)
258 {
259         register int32_t *buf;
260
261          if (!xdr_ndmp3_error (xdrs, &objp->error))
262                  return FALSE;
263          if (!xdr_array (xdrs, (char **)&objp->addr_types.addr_types_val, (u_int *) &objp->addr_types.addr_types_len, ~0,
264                 sizeof (ndmp3_addr_type), (xdrproc_t) xdr_ndmp3_addr_type))
265                  return FALSE;
266         return TRUE;
267 }
268
269 bool_t
270 xdr_ndmp3_config_get_auth_attr_request (XDR *xdrs, ndmp3_config_get_auth_attr_request *objp)
271 {
272         register int32_t *buf;
273
274          if (!xdr_ndmp3_auth_type (xdrs, &objp->auth_type))
275                  return FALSE;
276         return TRUE;
277 }
278
279 bool_t
280 xdr_ndmp3_config_get_auth_attr_reply (XDR *xdrs, ndmp3_config_get_auth_attr_reply *objp)
281 {
282         register int32_t *buf;
283
284          if (!xdr_ndmp3_error (xdrs, &objp->error))
285                  return FALSE;
286          if (!xdr_ndmp3_auth_attr (xdrs, &objp->server_attr))
287                  return FALSE;
288         return TRUE;
289 }
290
291 bool_t
292 xdr_ndmp3_config_get_server_info_reply (XDR *xdrs, ndmp3_config_get_server_info_reply *objp)
293 {
294         register int32_t *buf;
295
296          if (!xdr_ndmp3_error (xdrs, &objp->error))
297                  return FALSE;
298          if (!xdr_string (xdrs, &objp->vendor_name, ~0))
299                  return FALSE;
300          if (!xdr_string (xdrs, &objp->product_name, ~0))
301                  return FALSE;
302          if (!xdr_string (xdrs, &objp->revision_number, ~0))
303                  return FALSE;
304          if (!xdr_array (xdrs, (char **)&objp->auth_type.auth_type_val, (u_int *) &objp->auth_type.auth_type_len, ~0,
305                 sizeof (ndmp3_auth_type), (xdrproc_t) xdr_ndmp3_auth_type))
306                  return FALSE;
307         return TRUE;
308 }
309
310 bool_t
311 xdr_ndmp3_butype_info (XDR *xdrs, ndmp3_butype_info *objp)
312 {
313         register int32_t *buf;
314
315          if (!xdr_string (xdrs, &objp->butype_name, ~0))
316                  return FALSE;
317          if (!xdr_array (xdrs, (char **)&objp->default_env.default_env_val, (u_int *) &objp->default_env.default_env_len, ~0,
318                 sizeof (ndmp3_pval), (xdrproc_t) xdr_ndmp3_pval))
319                  return FALSE;
320          if (!xdr_u_long (xdrs, &objp->attrs))
321                  return FALSE;
322         return TRUE;
323 }
324
325 bool_t
326 xdr_ndmp3_config_get_butype_info_reply (XDR *xdrs, ndmp3_config_get_butype_info_reply *objp)
327 {
328         register int32_t *buf;
329
330          if (!xdr_ndmp3_error (xdrs, &objp->error))
331                  return FALSE;
332          if (!xdr_array (xdrs, (char **)&objp->butype_info.butype_info_val, (u_int *) &objp->butype_info.butype_info_len, ~0,
333                 sizeof (ndmp3_butype_info), (xdrproc_t) xdr_ndmp3_butype_info))
334                  return FALSE;
335         return TRUE;
336 }
337
338 bool_t
339 xdr_ndmp3_fs_info (XDR *xdrs, ndmp3_fs_info *objp)
340 {
341         register int32_t *buf;
342
343          if (!xdr_u_long (xdrs, &objp->invalid))
344                  return FALSE;
345          if (!xdr_string (xdrs, &objp->fs_type, ~0))
346                  return FALSE;
347          if (!xdr_string (xdrs, &objp->fs_logical_device, ~0))
348                  return FALSE;
349          if (!xdr_string (xdrs, &objp->fs_physical_device, ~0))
350                  return FALSE;
351          if (!xdr_ndmp3_u_quad (xdrs, &objp->total_size))
352                  return FALSE;
353          if (!xdr_ndmp3_u_quad (xdrs, &objp->used_size))
354                  return FALSE;
355          if (!xdr_ndmp3_u_quad (xdrs, &objp->avail_size))
356                  return FALSE;
357          if (!xdr_ndmp3_u_quad (xdrs, &objp->total_inodes))
358                  return FALSE;
359          if (!xdr_ndmp3_u_quad (xdrs, &objp->used_inodes))
360                  return FALSE;
361          if (!xdr_array (xdrs, (char **)&objp->fs_env.fs_env_val, (u_int *) &objp->fs_env.fs_env_len, ~0,
362                 sizeof (ndmp3_pval), (xdrproc_t) xdr_ndmp3_pval))
363                  return FALSE;
364          if (!xdr_string (xdrs, &objp->fs_status, ~0))
365                  return FALSE;
366         return TRUE;
367 }
368
369 bool_t
370 xdr_ndmp3_config_get_fs_info_reply (XDR *xdrs, ndmp3_config_get_fs_info_reply *objp)
371 {
372         register int32_t *buf;
373
374          if (!xdr_ndmp3_error (xdrs, &objp->error))
375                  return FALSE;
376          if (!xdr_array (xdrs, (char **)&objp->fs_info.fs_info_val, (u_int *) &objp->fs_info.fs_info_len, ~0,
377                 sizeof (ndmp3_fs_info), (xdrproc_t) xdr_ndmp3_fs_info))
378                  return FALSE;
379         return TRUE;
380 }
381
382 bool_t
383 xdr_ndmp3_device_capability (XDR *xdrs, ndmp3_device_capability *objp)
384 {
385         register int32_t *buf;
386
387          if (!xdr_string (xdrs, &objp->device, ~0))
388                  return FALSE;
389          if (!xdr_u_long (xdrs, &objp->attr))
390                  return FALSE;
391          if (!xdr_array (xdrs, (char **)&objp->capability.capability_val, (u_int *) &objp->capability.capability_len, ~0,
392                 sizeof (ndmp3_pval), (xdrproc_t) xdr_ndmp3_pval))
393                  return FALSE;
394         return TRUE;
395 }
396
397 bool_t
398 xdr_ndmp3_device_info (XDR *xdrs, ndmp3_device_info *objp)
399 {
400         register int32_t *buf;
401
402          if (!xdr_string (xdrs, &objp->model, ~0))
403                  return FALSE;
404          if (!xdr_array (xdrs, (char **)&objp->caplist.caplist_val, (u_int *) &objp->caplist.caplist_len, ~0,
405                 sizeof (ndmp3_device_capability), (xdrproc_t) xdr_ndmp3_device_capability))
406                  return FALSE;
407         return TRUE;
408 }
409
410 bool_t
411 xdr_ndmp3_config_get_tape_info_reply (XDR *xdrs, ndmp3_config_get_tape_info_reply *objp)
412 {
413         register int32_t *buf;
414
415          if (!xdr_ndmp3_error (xdrs, &objp->error))
416                  return FALSE;
417          if (!xdr_array (xdrs, (char **)&objp->tape_info.tape_info_val, (u_int *) &objp->tape_info.tape_info_len, ~0,
418                 sizeof (ndmp3_device_info), (xdrproc_t) xdr_ndmp3_device_info))
419                  return FALSE;
420         return TRUE;
421 }
422
423 bool_t
424 xdr_ndmp3_config_get_scsi_info_reply (XDR *xdrs, ndmp3_config_get_scsi_info_reply *objp)
425 {
426         register int32_t *buf;
427
428          if (!xdr_ndmp3_error (xdrs, &objp->error))
429                  return FALSE;
430          if (!xdr_array (xdrs, (char **)&objp->scsi_info.scsi_info_val, (u_int *) &objp->scsi_info.scsi_info_len, ~0,
431                 sizeof (ndmp3_device_info), (xdrproc_t) xdr_ndmp3_device_info))
432                  return FALSE;
433         return TRUE;
434 }
435
436 bool_t
437 xdr_ndmp3_scsi_open_request (XDR *xdrs, ndmp3_scsi_open_request *objp)
438 {
439         register int32_t *buf;
440
441          if (!xdr_string (xdrs, &objp->device, ~0))
442                  return FALSE;
443         return TRUE;
444 }
445
446 bool_t
447 xdr_ndmp3_scsi_open_reply (XDR *xdrs, ndmp3_scsi_open_reply *objp)
448 {
449         register int32_t *buf;
450
451          if (!xdr_ndmp3_error (xdrs, &objp->error))
452                  return FALSE;
453         return TRUE;
454 }
455
456 bool_t
457 xdr_ndmp3_scsi_close_reply (XDR *xdrs, ndmp3_scsi_close_reply *objp)
458 {
459         register int32_t *buf;
460
461          if (!xdr_ndmp3_error (xdrs, &objp->error))
462                  return FALSE;
463         return TRUE;
464 }
465
466 bool_t
467 xdr_ndmp3_scsi_get_state_reply (XDR *xdrs, ndmp3_scsi_get_state_reply *objp)
468 {
469         register int32_t *buf;
470
471          if (!xdr_ndmp3_error (xdrs, &objp->error))
472                  return FALSE;
473          if (!xdr_short (xdrs, &objp->target_controller))
474                  return FALSE;
475          if (!xdr_short (xdrs, &objp->target_id))
476                  return FALSE;
477          if (!xdr_short (xdrs, &objp->target_lun))
478                  return FALSE;
479         return TRUE;
480 }
481
482 bool_t
483 xdr_ndmp3_scsi_set_target_request (XDR *xdrs, ndmp3_scsi_set_target_request *objp)
484 {
485         register int32_t *buf;
486
487          if (!xdr_string (xdrs, &objp->device, ~0))
488                  return FALSE;
489          if (!xdr_u_short (xdrs, &objp->target_controller))
490                  return FALSE;
491          if (!xdr_u_short (xdrs, &objp->target_id))
492                  return FALSE;
493          if (!xdr_u_short (xdrs, &objp->target_lun))
494                  return FALSE;
495         return TRUE;
496 }
497
498 bool_t
499 xdr_ndmp3_scsi_set_target_reply (XDR *xdrs, ndmp3_scsi_set_target_reply *objp)
500 {
501         register int32_t *buf;
502
503          if (!xdr_ndmp3_error (xdrs, &objp->error))
504                  return FALSE;
505         return TRUE;
506 }
507
508 bool_t
509 xdr_ndmp3_scsi_reset_device_reply (XDR *xdrs, ndmp3_scsi_reset_device_reply *objp)
510 {
511         register int32_t *buf;
512
513          if (!xdr_ndmp3_error (xdrs, &objp->error))
514                  return FALSE;
515         return TRUE;
516 }
517
518 bool_t
519 xdr_ndmp3_scsi_reset_bus_reply (XDR *xdrs, ndmp3_scsi_reset_bus_reply *objp)
520 {
521         register int32_t *buf;
522
523          if (!xdr_ndmp3_error (xdrs, &objp->error))
524                  return FALSE;
525         return TRUE;
526 }
527
528 bool_t
529 xdr_ndmp3_execute_cdb_request (XDR *xdrs, ndmp3_execute_cdb_request *objp)
530 {
531         register int32_t *buf;
532
533
534         if (xdrs->x_op == XDR_ENCODE) {
535                 buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
536                 if (buf == NULL) {
537                          if (!xdr_u_long (xdrs, &objp->flags))
538                                  return FALSE;
539                          if (!xdr_u_long (xdrs, &objp->timeout))
540                                  return FALSE;
541                          if (!xdr_u_long (xdrs, &objp->datain_len))
542                                  return FALSE;
543
544                 } else {
545                 IXDR_PUT_U_LONG(buf, objp->flags);
546                 IXDR_PUT_U_LONG(buf, objp->timeout);
547                 IXDR_PUT_U_LONG(buf, objp->datain_len);
548                 }
549                  if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0))
550                          return FALSE;
551                  if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0))
552                          return FALSE;
553                 return TRUE;
554         } else if (xdrs->x_op == XDR_DECODE) {
555                 buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
556                 if (buf == NULL) {
557                          if (!xdr_u_long (xdrs, &objp->flags))
558                                  return FALSE;
559                          if (!xdr_u_long (xdrs, &objp->timeout))
560                                  return FALSE;
561                          if (!xdr_u_long (xdrs, &objp->datain_len))
562                                  return FALSE;
563
564                 } else {
565                 objp->flags = IXDR_GET_U_LONG(buf);
566                 objp->timeout = IXDR_GET_U_LONG(buf);
567                 objp->datain_len = IXDR_GET_U_LONG(buf);
568                 }
569                  if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0))
570                          return FALSE;
571                  if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0))
572                          return FALSE;
573          return TRUE;
574         }
575
576          if (!xdr_u_long (xdrs, &objp->flags))
577                  return FALSE;
578          if (!xdr_u_long (xdrs, &objp->timeout))
579                  return FALSE;
580          if (!xdr_u_long (xdrs, &objp->datain_len))
581                  return FALSE;
582          if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0))
583                  return FALSE;
584          if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0))
585                  return FALSE;
586         return TRUE;
587 }
588
589 bool_t
590 xdr_ndmp3_execute_cdb_reply (XDR *xdrs, ndmp3_execute_cdb_reply *objp)
591 {
592         register int32_t *buf;
593
594          if (!xdr_ndmp3_error (xdrs, &objp->error))
595                  return FALSE;
596          if (!xdr_u_char (xdrs, &objp->status))
597                  return FALSE;
598          if (!xdr_u_long (xdrs, &objp->dataout_len))
599                  return FALSE;
600          if (!xdr_bytes (xdrs, (char **)&objp->datain.datain_val, (u_int *) &objp->datain.datain_len, ~0))
601                  return FALSE;
602          if (!xdr_bytes (xdrs, (char **)&objp->ext_sense.ext_sense_val, (u_int *) &objp->ext_sense.ext_sense_len, ~0))
603                  return FALSE;
604         return TRUE;
605 }
606
607 bool_t
608 xdr_ndmp3_scsi_execute_cdb_request (XDR *xdrs, ndmp3_scsi_execute_cdb_request *objp)
609 {
610         register int32_t *buf;
611
612          if (!xdr_ndmp3_execute_cdb_request (xdrs, objp))
613                  return FALSE;
614         return TRUE;
615 }
616
617 bool_t
618 xdr_ndmp3_scsi_execute_cdb_reply (XDR *xdrs, ndmp3_scsi_execute_cdb_reply *objp)
619 {
620         register int32_t *buf;
621
622          if (!xdr_ndmp3_execute_cdb_reply (xdrs, objp))
623                  return FALSE;
624         return TRUE;
625 }
626
627 bool_t
628 xdr_ndmp3_tape_open_mode (XDR *xdrs, ndmp3_tape_open_mode *objp)
629 {
630         register int32_t *buf;
631
632          if (!xdr_enum (xdrs, (enum_t *) objp))
633                  return FALSE;
634         return TRUE;
635 }
636
637 bool_t
638 xdr_ndmp3_tape_open_request (XDR *xdrs, ndmp3_tape_open_request *objp)
639 {
640         register int32_t *buf;
641
642          if (!xdr_string (xdrs, &objp->device, ~0))
643                  return FALSE;
644          if (!xdr_ndmp3_tape_open_mode (xdrs, &objp->mode))
645                  return FALSE;
646         return TRUE;
647 }
648
649 bool_t
650 xdr_ndmp3_tape_open_reply (XDR *xdrs, ndmp3_tape_open_reply *objp)
651 {
652         register int32_t *buf;
653
654          if (!xdr_ndmp3_error (xdrs, &objp->error))
655                  return FALSE;
656         return TRUE;
657 }
658
659 bool_t
660 xdr_ndmp3_tape_close_reply (XDR *xdrs, ndmp3_tape_close_reply *objp)
661 {
662         register int32_t *buf;
663
664          if (!xdr_ndmp3_error (xdrs, &objp->error))
665                  return FALSE;
666         return TRUE;
667 }
668
669 bool_t
670 xdr_ndmp3_tape_get_state_reply (XDR *xdrs, ndmp3_tape_get_state_reply *objp)
671 {
672         register int32_t *buf;
673
674
675         if (xdrs->x_op == XDR_ENCODE) {
676                  if (!xdr_u_long (xdrs, &objp->invalid))
677                          return FALSE;
678                  if (!xdr_ndmp3_error (xdrs, &objp->error))
679                          return FALSE;
680                 buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
681                 if (buf == NULL) {
682                          if (!xdr_u_long (xdrs, &objp->flags))
683                                  return FALSE;
684                          if (!xdr_u_long (xdrs, &objp->file_num))
685                                  return FALSE;
686                          if (!xdr_u_long (xdrs, &objp->soft_errors))
687                                  return FALSE;
688                          if (!xdr_u_long (xdrs, &objp->block_size))
689                                  return FALSE;
690                          if (!xdr_u_long (xdrs, &objp->blockno))
691                                  return FALSE;
692
693                 } else {
694                 IXDR_PUT_U_LONG(buf, objp->flags);
695                 IXDR_PUT_U_LONG(buf, objp->file_num);
696                 IXDR_PUT_U_LONG(buf, objp->soft_errors);
697                 IXDR_PUT_U_LONG(buf, objp->block_size);
698                 IXDR_PUT_U_LONG(buf, objp->blockno);
699                 }
700                  if (!xdr_ndmp3_u_quad (xdrs, &objp->total_space))
701                          return FALSE;
702                  if (!xdr_ndmp3_u_quad (xdrs, &objp->space_remain))
703                          return FALSE;
704                  if (!xdr_u_long (xdrs, &objp->partition))
705                          return FALSE;
706                 return TRUE;
707         } else if (xdrs->x_op == XDR_DECODE) {
708                  if (!xdr_u_long (xdrs, &objp->invalid))
709                          return FALSE;
710                  if (!xdr_ndmp3_error (xdrs, &objp->error))
711                          return FALSE;
712                 buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
713                 if (buf == NULL) {
714                          if (!xdr_u_long (xdrs, &objp->flags))
715                                  return FALSE;
716                          if (!xdr_u_long (xdrs, &objp->file_num))
717                                  return FALSE;
718                          if (!xdr_u_long (xdrs, &objp->soft_errors))
719                                  return FALSE;
720                          if (!xdr_u_long (xdrs, &objp->block_size))
721                                  return FALSE;
722                          if (!xdr_u_long (xdrs, &objp->blockno))
723                                  return FALSE;
724
725                 } else {
726                 objp->flags = IXDR_GET_U_LONG(buf);
727                 objp->file_num = IXDR_GET_U_LONG(buf);
728                 objp->soft_errors = IXDR_GET_U_LONG(buf);
729                 objp->block_size = IXDR_GET_U_LONG(buf);
730                 objp->blockno = IXDR_GET_U_LONG(buf);
731                 }
732                  if (!xdr_ndmp3_u_quad (xdrs, &objp->total_space))
733                          return FALSE;
734                  if (!xdr_ndmp3_u_quad (xdrs, &objp->space_remain))
735                          return FALSE;
736                  if (!xdr_u_long (xdrs, &objp->partition))
737                          return FALSE;
738          return TRUE;
739         }
740
741          if (!xdr_u_long (xdrs, &objp->invalid))
742                  return FALSE;
743          if (!xdr_ndmp3_error (xdrs, &objp->error))
744                  return FALSE;
745          if (!xdr_u_long (xdrs, &objp->flags))
746                  return FALSE;
747          if (!xdr_u_long (xdrs, &objp->file_num))
748                  return FALSE;
749          if (!xdr_u_long (xdrs, &objp->soft_errors))
750                  return FALSE;
751          if (!xdr_u_long (xdrs, &objp->block_size))
752                  return FALSE;
753          if (!xdr_u_long (xdrs, &objp->blockno))
754                  return FALSE;
755          if (!xdr_ndmp3_u_quad (xdrs, &objp->total_space))
756                  return FALSE;
757          if (!xdr_ndmp3_u_quad (xdrs, &objp->space_remain))
758                  return FALSE;
759          if (!xdr_u_long (xdrs, &objp->partition))
760                  return FALSE;
761         return TRUE;
762 }
763
764 bool_t
765 xdr_ndmp3_tape_mtio_op (XDR *xdrs, ndmp3_tape_mtio_op *objp)
766 {
767         register int32_t *buf;
768
769          if (!xdr_enum (xdrs, (enum_t *) objp))
770                  return FALSE;
771         return TRUE;
772 }
773
774 bool_t
775 xdr_ndmp3_tape_mtio_request (XDR *xdrs, ndmp3_tape_mtio_request *objp)
776 {
777         register int32_t *buf;
778
779          if (!xdr_ndmp3_tape_mtio_op (xdrs, &objp->tape_op))
780                  return FALSE;
781          if (!xdr_u_long (xdrs, &objp->count))
782                  return FALSE;
783         return TRUE;
784 }
785
786 bool_t
787 xdr_ndmp3_tape_mtio_reply (XDR *xdrs, ndmp3_tape_mtio_reply *objp)
788 {
789         register int32_t *buf;
790
791          if (!xdr_ndmp3_error (xdrs, &objp->error))
792                  return FALSE;
793          if (!xdr_u_long (xdrs, &objp->resid_count))
794                  return FALSE;
795         return TRUE;
796 }
797
798 bool_t
799 xdr_ndmp3_tape_write_request (XDR *xdrs, ndmp3_tape_write_request *objp)
800 {
801         register int32_t *buf;
802
803          if (!xdr_bytes (xdrs, (char **)&objp->data_out.data_out_val, (u_int *) &objp->data_out.data_out_len, ~0))
804                  return FALSE;
805         return TRUE;
806 }
807
808 bool_t
809 xdr_ndmp3_tape_write_reply (XDR *xdrs, ndmp3_tape_write_reply *objp)
810 {
811         register int32_t *buf;
812
813          if (!xdr_ndmp3_error (xdrs, &objp->error))
814                  return FALSE;
815          if (!xdr_u_long (xdrs, &objp->count))
816                  return FALSE;
817         return TRUE;
818 }
819
820 bool_t
821 xdr_ndmp3_tape_read_request (XDR *xdrs, ndmp3_tape_read_request *objp)
822 {
823         register int32_t *buf;
824
825          if (!xdr_u_long (xdrs, &objp->count))
826                  return FALSE;
827         return TRUE;
828 }
829
830 bool_t
831 xdr_ndmp3_tape_read_reply (XDR *xdrs, ndmp3_tape_read_reply *objp)
832 {
833         register int32_t *buf;
834
835          if (!xdr_ndmp3_error (xdrs, &objp->error))
836                  return FALSE;
837          if (!xdr_bytes (xdrs, (char **)&objp->data_in.data_in_val, (u_int *) &objp->data_in.data_in_len, ~0))
838                  return FALSE;
839         return TRUE;
840 }
841
842 bool_t
843 xdr_ndmp3_tape_execute_cdb_request (XDR *xdrs, ndmp3_tape_execute_cdb_request *objp)
844 {
845         register int32_t *buf;
846
847          if (!xdr_ndmp3_execute_cdb_request (xdrs, objp))
848                  return FALSE;
849         return TRUE;
850 }
851
852 bool_t
853 xdr_ndmp3_tape_execute_cdb_reply (XDR *xdrs, ndmp3_tape_execute_cdb_reply *objp)
854 {
855         register int32_t *buf;
856
857          if (!xdr_ndmp3_execute_cdb_reply (xdrs, objp))
858                  return FALSE;
859         return TRUE;
860 }
861
862 bool_t
863 xdr_ndmp3_mover_state (XDR *xdrs, ndmp3_mover_state *objp)
864 {
865         register int32_t *buf;
866
867          if (!xdr_enum (xdrs, (enum_t *) objp))
868                  return FALSE;
869         return TRUE;
870 }
871
872 bool_t
873 xdr_ndmp3_mover_pause_reason (XDR *xdrs, ndmp3_mover_pause_reason *objp)
874 {
875         register int32_t *buf;
876
877          if (!xdr_enum (xdrs, (enum_t *) objp))
878                  return FALSE;
879         return TRUE;
880 }
881
882 bool_t
883 xdr_ndmp3_mover_halt_reason (XDR *xdrs, ndmp3_mover_halt_reason *objp)
884 {
885         register int32_t *buf;
886
887          if (!xdr_enum (xdrs, (enum_t *) objp))
888                  return FALSE;
889         return TRUE;
890 }
891
892 bool_t
893 xdr_ndmp3_mover_mode (XDR *xdrs, ndmp3_mover_mode *objp)
894 {
895         register int32_t *buf;
896
897          if (!xdr_enum (xdrs, (enum_t *) objp))
898                  return FALSE;
899         return TRUE;
900 }
901
902 bool_t
903 xdr_ndmp3_tcp_addr (XDR *xdrs, ndmp3_tcp_addr *objp)
904 {
905         register int32_t *buf;
906
907          if (!xdr_u_long (xdrs, &objp->ip_addr))
908                  return FALSE;
909          if (!xdr_u_short (xdrs, &objp->port))
910                  return FALSE;
911         return TRUE;
912 }
913
914 bool_t
915 xdr_ndmp3_fc_addr (XDR *xdrs, ndmp3_fc_addr *objp)
916 {
917         register int32_t *buf;
918
919          if (!xdr_u_long (xdrs, &objp->loop_id))
920                  return FALSE;
921         return TRUE;
922 }
923
924 bool_t
925 xdr_ndmp3_ipc_addr (XDR *xdrs, ndmp3_ipc_addr *objp)
926 {
927         register int32_t *buf;
928
929          if (!xdr_bytes (xdrs, (char **)&objp->comm_data.comm_data_val, (u_int *) &objp->comm_data.comm_data_len, ~0))
930                  return FALSE;
931         return TRUE;
932 }
933
934 bool_t
935 xdr_ndmp3_addr (XDR *xdrs, ndmp3_addr *objp)
936 {
937         register int32_t *buf;
938
939          if (!xdr_ndmp3_addr_type (xdrs, &objp->addr_type))
940                  return FALSE;
941         switch (objp->addr_type) {
942         case NDMP3_ADDR_LOCAL:
943                 break;
944         case NDMP3_ADDR_TCP:
945                  if (!xdr_ndmp3_tcp_addr (xdrs, &objp->ndmp3_addr_u.tcp_addr))
946                          return FALSE;
947                 break;
948         case NDMP3_ADDR_FC:
949                  if (!xdr_ndmp3_fc_addr (xdrs, &objp->ndmp3_addr_u.fc_addr))
950                          return FALSE;
951                 break;
952         case NDMP3_ADDR_IPC:
953                  if (!xdr_ndmp3_ipc_addr (xdrs, &objp->ndmp3_addr_u.ipc_addr))
954                          return FALSE;
955                 break;
956         default:
957                 return FALSE;
958         }
959         return TRUE;
960 }
961
962 bool_t
963 xdr_ndmp3_mover_get_state_reply (XDR *xdrs, ndmp3_mover_get_state_reply *objp)
964 {
965         register int32_t *buf;
966
967          if (!xdr_ndmp3_error (xdrs, &objp->error))
968                  return FALSE;
969          if (!xdr_ndmp3_mover_state (xdrs, &objp->state))
970                  return FALSE;
971          if (!xdr_ndmp3_mover_pause_reason (xdrs, &objp->pause_reason))
972                  return FALSE;
973          if (!xdr_ndmp3_mover_halt_reason (xdrs, &objp->halt_reason))
974                  return FALSE;
975          if (!xdr_u_long (xdrs, &objp->record_size))
976                  return FALSE;
977          if (!xdr_u_long (xdrs, &objp->record_num))
978                  return FALSE;
979          if (!xdr_ndmp3_u_quad (xdrs, &objp->data_written))
980                  return FALSE;
981          if (!xdr_ndmp3_u_quad (xdrs, &objp->seek_position))
982                  return FALSE;
983          if (!xdr_ndmp3_u_quad (xdrs, &objp->bytes_left_to_read))
984                  return FALSE;
985          if (!xdr_ndmp3_u_quad (xdrs, &objp->window_offset))
986                  return FALSE;
987          if (!xdr_ndmp3_u_quad (xdrs, &objp->window_length))
988                  return FALSE;
989          if (!xdr_ndmp3_addr (xdrs, &objp->data_connection_addr))
990                  return FALSE;
991         return TRUE;
992 }
993
994 bool_t
995 xdr_ndmp3_mover_listen_request (XDR *xdrs, ndmp3_mover_listen_request *objp)
996 {
997         register int32_t *buf;
998
999          if (!xdr_ndmp3_mover_mode (xdrs, &objp->mode))
1000                  return FALSE;
1001          if (!xdr_ndmp3_addr_type (xdrs, &objp->addr_type))
1002                  return FALSE;
1003         return TRUE;
1004 }
1005
1006 bool_t
1007 xdr_ndmp3_mover_listen_reply (XDR *xdrs, ndmp3_mover_listen_reply *objp)
1008 {
1009         register int32_t *buf;
1010
1011          if (!xdr_ndmp3_error (xdrs, &objp->error))
1012                  return FALSE;
1013          if (!xdr_ndmp3_addr (xdrs, &objp->data_connection_addr))
1014                  return FALSE;
1015         return TRUE;
1016 }
1017
1018 bool_t
1019 xdr_ndmp3_mover_connect_request (XDR *xdrs, ndmp3_mover_connect_request *objp)
1020 {
1021         register int32_t *buf;
1022
1023          if (!xdr_ndmp3_mover_mode (xdrs, &objp->mode))
1024                  return FALSE;
1025          if (!xdr_ndmp3_addr (xdrs, &objp->addr))
1026                  return FALSE;
1027         return TRUE;
1028 }
1029
1030 bool_t
1031 xdr_ndmp3_mover_connect_reply (XDR *xdrs, ndmp3_mover_connect_reply *objp)
1032 {
1033         register int32_t *buf;
1034
1035          if (!xdr_ndmp3_error (xdrs, &objp->error))
1036                  return FALSE;
1037         return TRUE;
1038 }
1039
1040 bool_t
1041 xdr_ndmp3_mover_set_record_size_request (XDR *xdrs, ndmp3_mover_set_record_size_request *objp)
1042 {
1043         register int32_t *buf;
1044
1045          if (!xdr_u_long (xdrs, &objp->len))
1046                  return FALSE;
1047         return TRUE;
1048 }
1049
1050 bool_t
1051 xdr_ndmp3_mover_set_record_size_reply (XDR *xdrs, ndmp3_mover_set_record_size_reply *objp)
1052 {
1053         register int32_t *buf;
1054
1055          if (!xdr_ndmp3_error (xdrs, &objp->error))
1056                  return FALSE;
1057         return TRUE;
1058 }
1059
1060 bool_t
1061 xdr_ndmp3_mover_set_window_request (XDR *xdrs, ndmp3_mover_set_window_request *objp)
1062 {
1063         register int32_t *buf;
1064
1065          if (!xdr_ndmp3_u_quad (xdrs, &objp->offset))
1066                  return FALSE;
1067          if (!xdr_ndmp3_u_quad (xdrs, &objp->length))
1068                  return FALSE;
1069         return TRUE;
1070 }
1071
1072 bool_t
1073 xdr_ndmp3_mover_set_window_reply (XDR *xdrs, ndmp3_mover_set_window_reply *objp)
1074 {
1075         register int32_t *buf;
1076
1077          if (!xdr_ndmp3_error (xdrs, &objp->error))
1078                  return FALSE;
1079         return TRUE;
1080 }
1081
1082 bool_t
1083 xdr_ndmp3_mover_continue_reply (XDR *xdrs, ndmp3_mover_continue_reply *objp)
1084 {
1085         register int32_t *buf;
1086
1087          if (!xdr_ndmp3_error (xdrs, &objp->error))
1088                  return FALSE;
1089         return TRUE;
1090 }
1091
1092 bool_t
1093 xdr_ndmp3_mover_abort_reply (XDR *xdrs, ndmp3_mover_abort_reply *objp)
1094 {
1095         register int32_t *buf;
1096
1097          if (!xdr_ndmp3_error (xdrs, &objp->error))
1098                  return FALSE;
1099         return TRUE;
1100 }
1101
1102 bool_t
1103 xdr_ndmp3_mover_stop_reply (XDR *xdrs, ndmp3_mover_stop_reply *objp)
1104 {
1105         register int32_t *buf;
1106
1107          if (!xdr_ndmp3_error (xdrs, &objp->error))
1108                  return FALSE;
1109         return TRUE;
1110 }
1111
1112 bool_t
1113 xdr_ndmp3_mover_read_request (XDR *xdrs, ndmp3_mover_read_request *objp)
1114 {
1115         register int32_t *buf;
1116
1117          if (!xdr_ndmp3_u_quad (xdrs, &objp->offset))
1118                  return FALSE;
1119          if (!xdr_ndmp3_u_quad (xdrs, &objp->length))
1120                  return FALSE;
1121         return TRUE;
1122 }
1123
1124 bool_t
1125 xdr_ndmp3_mover_read_reply (XDR *xdrs, ndmp3_mover_read_reply *objp)
1126 {
1127         register int32_t *buf;
1128
1129          if (!xdr_ndmp3_error (xdrs, &objp->error))
1130                  return FALSE;
1131         return TRUE;
1132 }
1133
1134 bool_t
1135 xdr_ndmp3_mover_close_reply (XDR *xdrs, ndmp3_mover_close_reply *objp)
1136 {
1137         register int32_t *buf;
1138
1139          if (!xdr_ndmp3_error (xdrs, &objp->error))
1140                  return FALSE;
1141         return TRUE;
1142 }
1143
1144 bool_t
1145 xdr_ndmp3_data_operation (XDR *xdrs, ndmp3_data_operation *objp)
1146 {
1147         register int32_t *buf;
1148
1149          if (!xdr_enum (xdrs, (enum_t *) objp))
1150                  return FALSE;
1151         return TRUE;
1152 }
1153
1154 bool_t
1155 xdr_ndmp3_data_state (XDR *xdrs, ndmp3_data_state *objp)
1156 {
1157         register int32_t *buf;
1158
1159          if (!xdr_enum (xdrs, (enum_t *) objp))
1160                  return FALSE;
1161         return TRUE;
1162 }
1163
1164 bool_t
1165 xdr_ndmp3_data_halt_reason (XDR *xdrs, ndmp3_data_halt_reason *objp)
1166 {
1167         register int32_t *buf;
1168
1169          if (!xdr_enum (xdrs, (enum_t *) objp))
1170                  return FALSE;
1171         return TRUE;
1172 }
1173
1174 bool_t
1175 xdr_ndmp3_data_get_state_reply (XDR *xdrs, ndmp3_data_get_state_reply *objp)
1176 {
1177         register int32_t *buf;
1178
1179          if (!xdr_u_long (xdrs, &objp->invalid))
1180                  return FALSE;
1181          if (!xdr_ndmp3_error (xdrs, &objp->error))
1182                  return FALSE;
1183          if (!xdr_ndmp3_data_operation (xdrs, &objp->operation))
1184                  return FALSE;
1185          if (!xdr_ndmp3_data_state (xdrs, &objp->state))
1186                  return FALSE;
1187          if (!xdr_ndmp3_data_halt_reason (xdrs, &objp->halt_reason))
1188                  return FALSE;
1189          if (!xdr_ndmp3_u_quad (xdrs, &objp->bytes_processed))
1190                  return FALSE;
1191          if (!xdr_ndmp3_u_quad (xdrs, &objp->est_bytes_remain))
1192                  return FALSE;
1193          if (!xdr_u_long (xdrs, &objp->est_time_remain))
1194                  return FALSE;
1195          if (!xdr_ndmp3_addr (xdrs, &objp->data_connection_addr))
1196                  return FALSE;
1197          if (!xdr_ndmp3_u_quad (xdrs, &objp->read_offset))
1198                  return FALSE;
1199          if (!xdr_ndmp3_u_quad (xdrs, &objp->read_length))
1200                  return FALSE;
1201         return TRUE;
1202 }
1203
1204 bool_t
1205 xdr_ndmp3_data_start_backup_request (XDR *xdrs, ndmp3_data_start_backup_request *objp)
1206 {
1207         register int32_t *buf;
1208
1209          if (!xdr_string (xdrs, &objp->bu_type, ~0))
1210                  return FALSE;
1211          if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
1212                 sizeof (ndmp3_pval), (xdrproc_t) xdr_ndmp3_pval))
1213                  return FALSE;
1214         return TRUE;
1215 }
1216
1217 bool_t
1218 xdr_ndmp3_data_start_backup_reply (XDR *xdrs, ndmp3_data_start_backup_reply *objp)
1219 {
1220         register int32_t *buf;
1221
1222          if (!xdr_ndmp3_error (xdrs, &objp->error))
1223                  return FALSE;
1224         return TRUE;
1225 }
1226
1227 bool_t
1228 xdr_ndmp3_name (XDR *xdrs, ndmp3_name *objp)
1229 {
1230         register int32_t *buf;
1231
1232          if (!xdr_string (xdrs, &objp->original_path, ~0))
1233                  return FALSE;
1234          if (!xdr_string (xdrs, &objp->destination_dir, ~0))
1235                  return FALSE;
1236          if (!xdr_string (xdrs, &objp->new_name, ~0))
1237                  return FALSE;
1238          if (!xdr_string (xdrs, &objp->other_name, ~0))
1239                  return FALSE;
1240          if (!xdr_ndmp3_u_quad (xdrs, &objp->node))
1241                  return FALSE;
1242          if (!xdr_ndmp3_u_quad (xdrs, &objp->fh_info))
1243                  return FALSE;
1244         return TRUE;
1245 }
1246
1247 bool_t
1248 xdr_ndmp3_data_start_recover_request (XDR *xdrs, ndmp3_data_start_recover_request *objp)
1249 {
1250         register int32_t *buf;
1251
1252          if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
1253                 sizeof (ndmp3_pval), (xdrproc_t) xdr_ndmp3_pval))
1254                  return FALSE;
1255          if (!xdr_array (xdrs, (char **)&objp->nlist.nlist_val, (u_int *) &objp->nlist.nlist_len, ~0,
1256                 sizeof (ndmp3_name), (xdrproc_t) xdr_ndmp3_name))
1257                  return FALSE;
1258          if (!xdr_string (xdrs, &objp->bu_type, ~0))
1259                  return FALSE;
1260         return TRUE;
1261 }
1262
1263 bool_t
1264 xdr_ndmp3_data_start_recover_reply (XDR *xdrs, ndmp3_data_start_recover_reply *objp)
1265 {
1266         register int32_t *buf;
1267
1268          if (!xdr_ndmp3_error (xdrs, &objp->error))
1269                  return FALSE;
1270         return TRUE;
1271 }
1272
1273 bool_t
1274 xdr_ndmp3_data_start_recover_filehist_request (XDR *xdrs, ndmp3_data_start_recover_filehist_request *objp)
1275 {
1276         register int32_t *buf;
1277
1278          if (!xdr_ndmp3_data_start_recover_request (xdrs, objp))
1279                  return FALSE;
1280         return TRUE;
1281 }
1282
1283 bool_t
1284 xdr_ndmp3_data_start_recover_filehist_reply (XDR *xdrs, ndmp3_data_start_recover_filehist_reply *objp)
1285 {
1286         register int32_t *buf;
1287
1288          if (!xdr_ndmp3_data_start_recover_reply (xdrs, objp))
1289                  return FALSE;
1290         return TRUE;
1291 }
1292
1293 bool_t
1294 xdr_ndmp3_data_abort_reply (XDR *xdrs, ndmp3_data_abort_reply *objp)
1295 {
1296         register int32_t *buf;
1297
1298          if (!xdr_ndmp3_error (xdrs, &objp->error))
1299                  return FALSE;
1300         return TRUE;
1301 }
1302
1303 bool_t
1304 xdr_ndmp3_data_stop_reply (XDR *xdrs, ndmp3_data_stop_reply *objp)
1305 {
1306         register int32_t *buf;
1307
1308          if (!xdr_ndmp3_error (xdrs, &objp->error))
1309                  return FALSE;
1310         return TRUE;
1311 }
1312
1313 bool_t
1314 xdr_ndmp3_data_get_env_reply (XDR *xdrs, ndmp3_data_get_env_reply *objp)
1315 {
1316         register int32_t *buf;
1317
1318          if (!xdr_ndmp3_error (xdrs, &objp->error))
1319                  return FALSE;
1320          if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
1321                 sizeof (ndmp3_pval), (xdrproc_t) xdr_ndmp3_pval))
1322                  return FALSE;
1323         return TRUE;
1324 }
1325
1326 bool_t
1327 xdr_ndmp3_data_listen_request (XDR *xdrs, ndmp3_data_listen_request *objp)
1328 {
1329         register int32_t *buf;
1330
1331          if (!xdr_ndmp3_addr_type (xdrs, &objp->addr_type))
1332                  return FALSE;
1333         return TRUE;
1334 }
1335
1336 bool_t
1337 xdr_ndmp3_data_listen_reply (XDR *xdrs, ndmp3_data_listen_reply *objp)
1338 {
1339         register int32_t *buf;
1340
1341          if (!xdr_ndmp3_error (xdrs, &objp->error))
1342                  return FALSE;
1343          if (!xdr_ndmp3_addr (xdrs, &objp->data_connection_addr))
1344                  return FALSE;
1345         return TRUE;
1346 }
1347
1348 bool_t
1349 xdr_ndmp3_data_connect_request (XDR *xdrs, ndmp3_data_connect_request *objp)
1350 {
1351         register int32_t *buf;
1352
1353          if (!xdr_ndmp3_addr (xdrs, &objp->addr))
1354                  return FALSE;
1355         return TRUE;
1356 }
1357
1358 bool_t
1359 xdr_ndmp3_data_connect_reply (XDR *xdrs, ndmp3_data_connect_reply *objp)
1360 {
1361         register int32_t *buf;
1362
1363          if (!xdr_ndmp3_error (xdrs, &objp->error))
1364                  return FALSE;
1365         return TRUE;
1366 }
1367
1368 bool_t
1369 xdr_ndmp3_notify_data_halted_request (XDR *xdrs, ndmp3_notify_data_halted_request *objp)
1370 {
1371         register int32_t *buf;
1372
1373          if (!xdr_ndmp3_data_halt_reason (xdrs, &objp->reason))
1374                  return FALSE;
1375          if (!xdr_string (xdrs, &objp->text_reason, ~0))
1376                  return FALSE;
1377         return TRUE;
1378 }
1379
1380 bool_t
1381 xdr_ndmp3_connect_reason (XDR *xdrs, ndmp3_connect_reason *objp)
1382 {
1383         register int32_t *buf;
1384
1385          if (!xdr_enum (xdrs, (enum_t *) objp))
1386                  return FALSE;
1387         return TRUE;
1388 }
1389
1390 bool_t
1391 xdr_ndmp3_notify_connected_request (XDR *xdrs, ndmp3_notify_connected_request *objp)
1392 {
1393         register int32_t *buf;
1394
1395          if (!xdr_ndmp3_connect_reason (xdrs, &objp->reason))
1396                  return FALSE;
1397          if (!xdr_u_short (xdrs, &objp->protocol_version))
1398                  return FALSE;
1399          if (!xdr_string (xdrs, &objp->text_reason, ~0))
1400                  return FALSE;
1401         return TRUE;
1402 }
1403
1404 bool_t
1405 xdr_ndmp3_notify_mover_paused_request (XDR *xdrs, ndmp3_notify_mover_paused_request *objp)
1406 {
1407         register int32_t *buf;
1408
1409          if (!xdr_ndmp3_mover_pause_reason (xdrs, &objp->reason))
1410                  return FALSE;
1411          if (!xdr_ndmp3_u_quad (xdrs, &objp->seek_position))
1412                  return FALSE;
1413         return TRUE;
1414 }
1415
1416 bool_t
1417 xdr_ndmp3_notify_mover_halted_request (XDR *xdrs, ndmp3_notify_mover_halted_request *objp)
1418 {
1419         register int32_t *buf;
1420
1421          if (!xdr_ndmp3_mover_halt_reason (xdrs, &objp->reason))
1422                  return FALSE;
1423          if (!xdr_string (xdrs, &objp->text_reason, ~0))
1424                  return FALSE;
1425         return TRUE;
1426 }
1427
1428 bool_t
1429 xdr_ndmp3_notify_data_read_request (XDR *xdrs, ndmp3_notify_data_read_request *objp)
1430 {
1431         register int32_t *buf;
1432
1433          if (!xdr_ndmp3_u_quad (xdrs, &objp->offset))
1434                  return FALSE;
1435          if (!xdr_ndmp3_u_quad (xdrs, &objp->length))
1436                  return FALSE;
1437         return TRUE;
1438 }
1439
1440 bool_t
1441 xdr_ndmp3_log_type (XDR *xdrs, ndmp3_log_type *objp)
1442 {
1443         register int32_t *buf;
1444
1445          if (!xdr_enum (xdrs, (enum_t *) objp))
1446                  return FALSE;
1447         return TRUE;
1448 }
1449
1450 bool_t
1451 xdr_ndmp3_log_message_request (XDR *xdrs, ndmp3_log_message_request *objp)
1452 {
1453         register int32_t *buf;
1454
1455          if (!xdr_ndmp3_log_type (xdrs, &objp->log_type))
1456                  return FALSE;
1457          if (!xdr_u_long (xdrs, &objp->message_id))
1458                  return FALSE;
1459          if (!xdr_string (xdrs, &objp->entry, ~0))
1460                  return FALSE;
1461         return TRUE;
1462 }
1463
1464 bool_t
1465 xdr_ndmp3_log_file_request (XDR *xdrs, ndmp3_log_file_request *objp)
1466 {
1467         register int32_t *buf;
1468
1469          if (!xdr_string (xdrs, &objp->name, ~0))
1470                  return FALSE;
1471          if (!xdr_ndmp3_error (xdrs, &objp->error))
1472                  return FALSE;
1473         return TRUE;
1474 }
1475
1476 bool_t
1477 xdr_ndmp3_fs_type (XDR *xdrs, ndmp3_fs_type *objp)
1478 {
1479         register int32_t *buf;
1480
1481          if (!xdr_enum (xdrs, (enum_t *) objp))
1482                  return FALSE;
1483         return TRUE;
1484 }
1485
1486 bool_t
1487 xdr_ndmp3_path (XDR *xdrs, ndmp3_path *objp)
1488 {
1489         register int32_t *buf;
1490
1491          if (!xdr_string (xdrs, objp, ~0))
1492                  return FALSE;
1493         return TRUE;
1494 }
1495
1496 bool_t
1497 xdr_ndmp3_nt_path (XDR *xdrs, ndmp3_nt_path *objp)
1498 {
1499         register int32_t *buf;
1500
1501          if (!xdr_ndmp3_path (xdrs, &objp->nt_path))
1502                  return FALSE;
1503          if (!xdr_ndmp3_path (xdrs, &objp->dos_path))
1504                  return FALSE;
1505         return TRUE;
1506 }
1507
1508 bool_t
1509 xdr_ndmp3_file_name (XDR *xdrs, ndmp3_file_name *objp)
1510 {
1511         register int32_t *buf;
1512
1513          if (!xdr_ndmp3_fs_type (xdrs, &objp->fs_type))
1514                  return FALSE;
1515         switch (objp->fs_type) {
1516         case NDMP3_FS_UNIX:
1517                  if (!xdr_ndmp3_path (xdrs, &objp->ndmp3_file_name_u.unix_name))
1518                          return FALSE;
1519                 break;
1520         case NDMP3_FS_NT:
1521                  if (!xdr_ndmp3_nt_path (xdrs, &objp->ndmp3_file_name_u.nt_name))
1522                          return FALSE;
1523                 break;
1524         default:
1525                  if (!xdr_ndmp3_path (xdrs, &objp->ndmp3_file_name_u.other_name))
1526                          return FALSE;
1527                 break;
1528         }
1529         return TRUE;
1530 }
1531
1532 bool_t
1533 xdr_ndmp3_file_type (XDR *xdrs, ndmp3_file_type *objp)
1534 {
1535         register int32_t *buf;
1536
1537          if (!xdr_enum (xdrs, (enum_t *) objp))
1538                  return FALSE;
1539         return TRUE;
1540 }
1541
1542 bool_t
1543 xdr_ndmp3_file_stat (XDR *xdrs, ndmp3_file_stat *objp)
1544 {
1545         register int32_t *buf;
1546
1547
1548         if (xdrs->x_op == XDR_ENCODE) {
1549                  if (!xdr_u_long (xdrs, &objp->invalid))
1550                          return FALSE;
1551                  if (!xdr_ndmp3_fs_type (xdrs, &objp->fs_type))
1552                          return FALSE;
1553                  if (!xdr_ndmp3_file_type (xdrs, &objp->ftype))
1554                          return FALSE;
1555                 buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
1556                 if (buf == NULL) {
1557                          if (!xdr_u_long (xdrs, &objp->mtime))
1558                                  return FALSE;
1559                          if (!xdr_u_long (xdrs, &objp->atime))
1560                                  return FALSE;
1561                          if (!xdr_u_long (xdrs, &objp->ctime))
1562                                  return FALSE;
1563                          if (!xdr_u_long (xdrs, &objp->owner))
1564                                  return FALSE;
1565                          if (!xdr_u_long (xdrs, &objp->group))
1566                                  return FALSE;
1567                          if (!xdr_u_long (xdrs, &objp->fattr))
1568                                  return FALSE;
1569
1570                 } else {
1571                 IXDR_PUT_U_LONG(buf, objp->mtime);
1572                 IXDR_PUT_U_LONG(buf, objp->atime);
1573                 IXDR_PUT_U_LONG(buf, objp->ctime);
1574                 IXDR_PUT_U_LONG(buf, objp->owner);
1575                 IXDR_PUT_U_LONG(buf, objp->group);
1576                 IXDR_PUT_U_LONG(buf, objp->fattr);
1577                 }
1578                  if (!xdr_ndmp3_u_quad (xdrs, &objp->size))
1579                          return FALSE;
1580                  if (!xdr_u_long (xdrs, &objp->links))
1581                          return FALSE;
1582                 return TRUE;
1583         } else if (xdrs->x_op == XDR_DECODE) {
1584                  if (!xdr_u_long (xdrs, &objp->invalid))
1585                          return FALSE;
1586                  if (!xdr_ndmp3_fs_type (xdrs, &objp->fs_type))
1587                          return FALSE;
1588                  if (!xdr_ndmp3_file_type (xdrs, &objp->ftype))
1589                          return FALSE;
1590                 buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
1591                 if (buf == NULL) {
1592                          if (!xdr_u_long (xdrs, &objp->mtime))
1593                                  return FALSE;
1594                          if (!xdr_u_long (xdrs, &objp->atime))
1595                                  return FALSE;
1596                          if (!xdr_u_long (xdrs, &objp->ctime))
1597                                  return FALSE;
1598                          if (!xdr_u_long (xdrs, &objp->owner))
1599                                  return FALSE;
1600                          if (!xdr_u_long (xdrs, &objp->group))
1601                                  return FALSE;
1602                          if (!xdr_u_long (xdrs, &objp->fattr))
1603                                  return FALSE;
1604
1605                 } else {
1606                 objp->mtime = IXDR_GET_U_LONG(buf);
1607                 objp->atime = IXDR_GET_U_LONG(buf);
1608                 objp->ctime = IXDR_GET_U_LONG(buf);
1609                 objp->owner = IXDR_GET_U_LONG(buf);
1610                 objp->group = IXDR_GET_U_LONG(buf);
1611                 objp->fattr = IXDR_GET_U_LONG(buf);
1612                 }
1613                  if (!xdr_ndmp3_u_quad (xdrs, &objp->size))
1614                          return FALSE;
1615                  if (!xdr_u_long (xdrs, &objp->links))
1616                          return FALSE;
1617          return TRUE;
1618         }
1619
1620          if (!xdr_u_long (xdrs, &objp->invalid))
1621                  return FALSE;
1622          if (!xdr_ndmp3_fs_type (xdrs, &objp->fs_type))
1623                  return FALSE;
1624          if (!xdr_ndmp3_file_type (xdrs, &objp->ftype))
1625                  return FALSE;
1626          if (!xdr_u_long (xdrs, &objp->mtime))
1627                  return FALSE;
1628          if (!xdr_u_long (xdrs, &objp->atime))
1629                  return FALSE;
1630          if (!xdr_u_long (xdrs, &objp->ctime))
1631                  return FALSE;
1632          if (!xdr_u_long (xdrs, &objp->owner))
1633                  return FALSE;
1634          if (!xdr_u_long (xdrs, &objp->group))
1635                  return FALSE;
1636          if (!xdr_u_long (xdrs, &objp->fattr))
1637                  return FALSE;
1638          if (!xdr_ndmp3_u_quad (xdrs, &objp->size))
1639                  return FALSE;
1640          if (!xdr_u_long (xdrs, &objp->links))
1641                  return FALSE;
1642         return TRUE;
1643 }
1644
1645 bool_t
1646 xdr_ndmp3_file (XDR *xdrs, ndmp3_file *objp)
1647 {
1648         register int32_t *buf;
1649
1650          if (!xdr_array (xdrs, (char **)&objp->names.names_val, (u_int *) &objp->names.names_len, ~0,
1651                 sizeof (ndmp3_file_name), (xdrproc_t) xdr_ndmp3_file_name))
1652                  return FALSE;
1653          if (!xdr_array (xdrs, (char **)&objp->stats.stats_val, (u_int *) &objp->stats.stats_len, ~0,
1654                 sizeof (ndmp3_file_stat), (xdrproc_t) xdr_ndmp3_file_stat))
1655                  return FALSE;
1656          if (!xdr_ndmp3_u_quad (xdrs, &objp->node))
1657                  return FALSE;
1658          if (!xdr_ndmp3_u_quad (xdrs, &objp->fh_info))
1659                  return FALSE;
1660         return TRUE;
1661 }
1662
1663 bool_t
1664 xdr_ndmp3_fh_add_file_request (XDR *xdrs, ndmp3_fh_add_file_request *objp)
1665 {
1666         register int32_t *buf;
1667
1668          if (!xdr_array (xdrs, (char **)&objp->files.files_val, (u_int *) &objp->files.files_len, ~0,
1669                 sizeof (ndmp3_file), (xdrproc_t) xdr_ndmp3_file))
1670                  return FALSE;
1671         return TRUE;
1672 }
1673
1674 bool_t
1675 xdr_ndmp3_dir (XDR *xdrs, ndmp3_dir *objp)
1676 {
1677         register int32_t *buf;
1678
1679          if (!xdr_array (xdrs, (char **)&objp->names.names_val, (u_int *) &objp->names.names_len, ~0,
1680                 sizeof (ndmp3_file_name), (xdrproc_t) xdr_ndmp3_file_name))
1681                  return FALSE;
1682          if (!xdr_ndmp3_u_quad (xdrs, &objp->node))
1683                  return FALSE;
1684          if (!xdr_ndmp3_u_quad (xdrs, &objp->parent))
1685                  return FALSE;
1686         return TRUE;
1687 }
1688
1689 bool_t
1690 xdr_ndmp3_fh_add_dir_request (XDR *xdrs, ndmp3_fh_add_dir_request *objp)
1691 {
1692         register int32_t *buf;
1693
1694          if (!xdr_array (xdrs, (char **)&objp->dirs.dirs_val, (u_int *) &objp->dirs.dirs_len, ~0,
1695                 sizeof (ndmp3_dir), (xdrproc_t) xdr_ndmp3_dir))
1696                  return FALSE;
1697         return TRUE;
1698 }
1699
1700 bool_t
1701 xdr_ndmp3_node (XDR *xdrs, ndmp3_node *objp)
1702 {
1703         register int32_t *buf;
1704
1705          if (!xdr_array (xdrs, (char **)&objp->stats.stats_val, (u_int *) &objp->stats.stats_len, ~0,
1706                 sizeof (ndmp3_file_stat), (xdrproc_t) xdr_ndmp3_file_stat))
1707                  return FALSE;
1708          if (!xdr_ndmp3_u_quad (xdrs, &objp->node))
1709                  return FALSE;
1710          if (!xdr_ndmp3_u_quad (xdrs, &objp->fh_info))
1711                  return FALSE;
1712         return TRUE;
1713 }
1714
1715 bool_t
1716 xdr_ndmp3_fh_add_node_request (XDR *xdrs, ndmp3_fh_add_node_request *objp)
1717 {
1718         register int32_t *buf;
1719
1720          if (!xdr_array (xdrs, (char **)&objp->nodes.nodes_val, (u_int *) &objp->nodes.nodes_len, ~0,
1721                 sizeof (ndmp3_node), (xdrproc_t) xdr_ndmp3_node))
1722                  return FALSE;
1723         return TRUE;
1724 }
1725 #endif /* !NDMOS_OPTION_NO_NDMP3 */