1 /*
2  * Please do not edit this file.
3  * It was generated using rpcgen.
4  */
5 
6 #include "config.h"
7 #include "ndmp4.h"
8 #ifndef NDMOS_OPTION_NO_NDMP4
9 #define ndmp4_u_quad unsigned long long
10 extern bool_t xdr_ndmp4_u_quad();
11 
12 bool_t
xdr__ndmp4_u_quad(XDR * xdrs,_ndmp4_u_quad * objp)13 xdr__ndmp4_u_quad (XDR *xdrs, _ndmp4_u_quad *objp)
14 {
15 	register int32_t *buf;
16 
17 	 if (!xdr_u_long (xdrs, &objp->high))
18 		 return FALSE;
19 	 if (!xdr_u_long (xdrs, &objp->low))
20 		 return FALSE;
21 	return TRUE;
22 }
23 
24 bool_t
xdr_ndmp4_header_message_type(XDR * xdrs,ndmp4_header_message_type * objp)25 xdr_ndmp4_header_message_type (XDR *xdrs, ndmp4_header_message_type *objp)
26 {
27 	register int32_t *buf;
28 
29 	 if (!xdr_enum (xdrs, (enum_t *) objp))
30 		 return FALSE;
31 	return TRUE;
32 }
33 
34 bool_t
xdr_ndmp4_error(XDR * xdrs,ndmp4_error * objp)35 xdr_ndmp4_error (XDR *xdrs, ndmp4_error *objp)
36 {
37 	register int32_t *buf;
38 
39 	 if (!xdr_enum (xdrs, (enum_t *) objp))
40 		 return FALSE;
41 	return TRUE;
42 }
43 
44 bool_t
xdr_ndmp4_message(XDR * xdrs,ndmp4_message * objp)45 xdr_ndmp4_message (XDR *xdrs, ndmp4_message *objp)
46 {
47 	register int32_t *buf;
48 
49 	 if (!xdr_enum (xdrs, (enum_t *) objp))
50 		 return FALSE;
51 	return TRUE;
52 }
53 
54 bool_t
xdr_ndmp4_header(XDR * xdrs,ndmp4_header * objp)55 xdr_ndmp4_header (XDR *xdrs, ndmp4_header *objp)
56 {
57 	register int32_t *buf;
58 
59 	 if (!xdr_u_long (xdrs, &objp->sequence))
60 		 return FALSE;
61 	 if (!xdr_u_long (xdrs, &objp->time_stamp))
62 		 return FALSE;
63 	 if (!xdr_ndmp4_header_message_type (xdrs, &objp->message_type))
64 		 return FALSE;
65 	 if (!xdr_ndmp4_message (xdrs, &objp->message_code))
66 		 return FALSE;
67 	 if (!xdr_u_long (xdrs, &objp->reply_sequence))
68 		 return FALSE;
69 	 if (!xdr_ndmp4_error (xdrs, &objp->error_code))
70 		 return FALSE;
71 	return TRUE;
72 }
73 
74 bool_t
xdr_ndmp4_pval(XDR * xdrs,ndmp4_pval * objp)75 xdr_ndmp4_pval (XDR *xdrs, ndmp4_pval *objp)
76 {
77 	register int32_t *buf;
78 
79 	 if (!xdr_string (xdrs, &objp->name, ~0))
80 		 return FALSE;
81 	 if (!xdr_string (xdrs, &objp->value, ~0))
82 		 return FALSE;
83 	return TRUE;
84 }
85 
86 bool_t
xdr_ndmp4_connect_open_request(XDR * xdrs,ndmp4_connect_open_request * objp)87 xdr_ndmp4_connect_open_request (XDR *xdrs, ndmp4_connect_open_request *objp)
88 {
89 	register int32_t *buf;
90 
91 	 if (!xdr_u_short (xdrs, &objp->protocol_version))
92 		 return FALSE;
93 	return TRUE;
94 }
95 
96 bool_t
xdr_ndmp4_connect_open_reply(XDR * xdrs,ndmp4_connect_open_reply * objp)97 xdr_ndmp4_connect_open_reply (XDR *xdrs, ndmp4_connect_open_reply *objp)
98 {
99 	register int32_t *buf;
100 
101 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
102 		 return FALSE;
103 	return TRUE;
104 }
105 
106 bool_t
xdr_ndmp4_auth_type(XDR * xdrs,ndmp4_auth_type * objp)107 xdr_ndmp4_auth_type (XDR *xdrs, ndmp4_auth_type *objp)
108 {
109 	register int32_t *buf;
110 
111 	 if (!xdr_enum (xdrs, (enum_t *) objp))
112 		 return FALSE;
113 	return TRUE;
114 }
115 
116 bool_t
xdr_ndmp4_auth_text(XDR * xdrs,ndmp4_auth_text * objp)117 xdr_ndmp4_auth_text (XDR *xdrs, ndmp4_auth_text *objp)
118 {
119 	register int32_t *buf;
120 
121 	 if (!xdr_string (xdrs, &objp->auth_id, ~0))
122 		 return FALSE;
123 	 if (!xdr_string (xdrs, &objp->auth_password, ~0))
124 		 return FALSE;
125 	return TRUE;
126 }
127 
128 bool_t
xdr_ndmp4_auth_md5(XDR * xdrs,ndmp4_auth_md5 * objp)129 xdr_ndmp4_auth_md5 (XDR *xdrs, ndmp4_auth_md5 *objp)
130 {
131 	register int32_t *buf;
132 
133 	int i;
134 	 if (!xdr_string (xdrs, &objp->auth_id, ~0))
135 		 return FALSE;
136 	 if (!xdr_opaque (xdrs, objp->auth_digest, 16))
137 		 return FALSE;
138 	return TRUE;
139 }
140 
141 bool_t
xdr_ndmp4_auth_data(XDR * xdrs,ndmp4_auth_data * objp)142 xdr_ndmp4_auth_data (XDR *xdrs, ndmp4_auth_data *objp)
143 {
144 	register int32_t *buf;
145 
146 	 if (!xdr_ndmp4_auth_type (xdrs, &objp->auth_type))
147 		 return FALSE;
148 	switch (objp->auth_type) {
149 	case NDMP4_AUTH_NONE:
150 		break;
151 	case NDMP4_AUTH_TEXT:
152 		 if (!xdr_ndmp4_auth_text (xdrs, &objp->ndmp4_auth_data_u.auth_text))
153 			 return FALSE;
154 		break;
155 	case NDMP4_AUTH_MD5:
156 		 if (!xdr_ndmp4_auth_md5 (xdrs, &objp->ndmp4_auth_data_u.auth_md5))
157 			 return FALSE;
158 		break;
159 	default:
160 		return FALSE;
161 	}
162 	return TRUE;
163 }
164 
165 bool_t
xdr_ndmp4_auth_attr(XDR * xdrs,ndmp4_auth_attr * objp)166 xdr_ndmp4_auth_attr (XDR *xdrs, ndmp4_auth_attr *objp)
167 {
168 	register int32_t *buf;
169 
170 	 if (!xdr_ndmp4_auth_type (xdrs, &objp->auth_type))
171 		 return FALSE;
172 	switch (objp->auth_type) {
173 	case NDMP4_AUTH_NONE:
174 		break;
175 	case NDMP4_AUTH_TEXT:
176 		break;
177 	case NDMP4_AUTH_MD5:
178 		 if (!xdr_opaque (xdrs, objp->ndmp4_auth_attr_u.challenge, 64))
179 			 return FALSE;
180 		break;
181 	default:
182 		return FALSE;
183 	}
184 	return TRUE;
185 }
186 
187 bool_t
xdr_ndmp4_connect_client_auth_request(XDR * xdrs,ndmp4_connect_client_auth_request * objp)188 xdr_ndmp4_connect_client_auth_request (XDR *xdrs, ndmp4_connect_client_auth_request *objp)
189 {
190 	register int32_t *buf;
191 
192 	 if (!xdr_ndmp4_auth_data (xdrs, &objp->auth_data))
193 		 return FALSE;
194 	return TRUE;
195 }
196 
197 bool_t
xdr_ndmp4_connect_client_auth_reply(XDR * xdrs,ndmp4_connect_client_auth_reply * objp)198 xdr_ndmp4_connect_client_auth_reply (XDR *xdrs, ndmp4_connect_client_auth_reply *objp)
199 {
200 	register int32_t *buf;
201 
202 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
203 		 return FALSE;
204 	return TRUE;
205 }
206 
207 bool_t
xdr_ndmp4_connect_server_auth_request(XDR * xdrs,ndmp4_connect_server_auth_request * objp)208 xdr_ndmp4_connect_server_auth_request (XDR *xdrs, ndmp4_connect_server_auth_request *objp)
209 {
210 	register int32_t *buf;
211 
212 	 if (!xdr_ndmp4_auth_attr (xdrs, &objp->client_attr))
213 		 return FALSE;
214 	return TRUE;
215 }
216 
217 bool_t
xdr_ndmp4_connect_server_auth_reply(XDR * xdrs,ndmp4_connect_server_auth_reply * objp)218 xdr_ndmp4_connect_server_auth_reply (XDR *xdrs, ndmp4_connect_server_auth_reply *objp)
219 {
220 	register int32_t *buf;
221 
222 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
223 		 return FALSE;
224 	 if (!xdr_ndmp4_auth_data (xdrs, &objp->server_result))
225 		 return FALSE;
226 	return TRUE;
227 }
228 
229 bool_t
xdr_ndmp4_config_get_host_info_reply(XDR * xdrs,ndmp4_config_get_host_info_reply * objp)230 xdr_ndmp4_config_get_host_info_reply (XDR *xdrs, ndmp4_config_get_host_info_reply *objp)
231 {
232 	register int32_t *buf;
233 
234 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
235 		 return FALSE;
236 	 if (!xdr_string (xdrs, &objp->hostname, ~0))
237 		 return FALSE;
238 	 if (!xdr_string (xdrs, &objp->os_type, ~0))
239 		 return FALSE;
240 	 if (!xdr_string (xdrs, &objp->os_vers, ~0))
241 		 return FALSE;
242 	 if (!xdr_string (xdrs, &objp->hostid, ~0))
243 		 return FALSE;
244 	return TRUE;
245 }
246 
247 bool_t
xdr_ndmp4_config_get_server_info_reply(XDR * xdrs,ndmp4_config_get_server_info_reply * objp)248 xdr_ndmp4_config_get_server_info_reply (XDR *xdrs, ndmp4_config_get_server_info_reply *objp)
249 {
250 	register int32_t *buf;
251 
252 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
253 		 return FALSE;
254 	 if (!xdr_string (xdrs, &objp->vendor_name, ~0))
255 		 return FALSE;
256 	 if (!xdr_string (xdrs, &objp->product_name, ~0))
257 		 return FALSE;
258 	 if (!xdr_string (xdrs, &objp->revision_number, ~0))
259 		 return FALSE;
260 	 if (!xdr_array (xdrs, (char **)&objp->auth_type.auth_type_val, (u_int *) &objp->auth_type.auth_type_len, ~0,
261 		sizeof (ndmp4_auth_type), (xdrproc_t) xdr_ndmp4_auth_type))
262 		 return FALSE;
263 	return TRUE;
264 }
265 
266 bool_t
xdr_ndmp4_addr_type(XDR * xdrs,ndmp4_addr_type * objp)267 xdr_ndmp4_addr_type (XDR *xdrs, ndmp4_addr_type *objp)
268 {
269 	register int32_t *buf;
270 
271 	 if (!xdr_enum (xdrs, (enum_t *) objp))
272 		 return FALSE;
273 	return TRUE;
274 }
275 
276 bool_t
xdr_ndmp4_config_get_connection_type_reply(XDR * xdrs,ndmp4_config_get_connection_type_reply * objp)277 xdr_ndmp4_config_get_connection_type_reply (XDR *xdrs, ndmp4_config_get_connection_type_reply *objp)
278 {
279 	register int32_t *buf;
280 
281 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
282 		 return FALSE;
283 	 if (!xdr_array (xdrs, (char **)&objp->addr_types.addr_types_val, (u_int *) &objp->addr_types.addr_types_len, ~0,
284 		sizeof (ndmp4_addr_type), (xdrproc_t) xdr_ndmp4_addr_type))
285 		 return FALSE;
286 	return TRUE;
287 }
288 
289 bool_t
xdr_ndmp4_config_get_auth_attr_request(XDR * xdrs,ndmp4_config_get_auth_attr_request * objp)290 xdr_ndmp4_config_get_auth_attr_request (XDR *xdrs, ndmp4_config_get_auth_attr_request *objp)
291 {
292 	register int32_t *buf;
293 
294 	 if (!xdr_ndmp4_auth_type (xdrs, &objp->auth_type))
295 		 return FALSE;
296 	return TRUE;
297 }
298 
299 bool_t
xdr_ndmp4_config_get_auth_attr_reply(XDR * xdrs,ndmp4_config_get_auth_attr_reply * objp)300 xdr_ndmp4_config_get_auth_attr_reply (XDR *xdrs, ndmp4_config_get_auth_attr_reply *objp)
301 {
302 	register int32_t *buf;
303 
304 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
305 		 return FALSE;
306 	 if (!xdr_ndmp4_auth_attr (xdrs, &objp->server_attr))
307 		 return FALSE;
308 	return TRUE;
309 }
310 
311 bool_t
xdr_ndmp4_butype_info(XDR * xdrs,ndmp4_butype_info * objp)312 xdr_ndmp4_butype_info (XDR *xdrs, ndmp4_butype_info *objp)
313 {
314 	register int32_t *buf;
315 
316 	 if (!xdr_string (xdrs, &objp->butype_name, ~0))
317 		 return FALSE;
318 	 if (!xdr_array (xdrs, (char **)&objp->default_env.default_env_val, (u_int *) &objp->default_env.default_env_len, ~0,
319 		sizeof (ndmp4_pval), (xdrproc_t) xdr_ndmp4_pval))
320 		 return FALSE;
321 	 if (!xdr_u_long (xdrs, &objp->attrs))
322 		 return FALSE;
323 	return TRUE;
324 }
325 
326 bool_t
xdr_ndmp4_config_get_butype_info_reply(XDR * xdrs,ndmp4_config_get_butype_info_reply * objp)327 xdr_ndmp4_config_get_butype_info_reply (XDR *xdrs, ndmp4_config_get_butype_info_reply *objp)
328 {
329 	register int32_t *buf;
330 
331 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
332 		 return FALSE;
333 	 if (!xdr_array (xdrs, (char **)&objp->butype_info.butype_info_val, (u_int *) &objp->butype_info.butype_info_len, ~0,
334 		sizeof (ndmp4_butype_info), (xdrproc_t) xdr_ndmp4_butype_info))
335 		 return FALSE;
336 	return TRUE;
337 }
338 
339 bool_t
xdr_ndmp4_fs_info(XDR * xdrs,ndmp4_fs_info * objp)340 xdr_ndmp4_fs_info (XDR *xdrs, ndmp4_fs_info *objp)
341 {
342 	register int32_t *buf;
343 
344 	 if (!xdr_u_long (xdrs, &objp->unsupported))
345 		 return FALSE;
346 	 if (!xdr_string (xdrs, &objp->fs_type, ~0))
347 		 return FALSE;
348 	 if (!xdr_string (xdrs, &objp->fs_logical_device, ~0))
349 		 return FALSE;
350 	 if (!xdr_string (xdrs, &objp->fs_physical_device, ~0))
351 		 return FALSE;
352 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->total_size))
353 		 return FALSE;
354 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->used_size))
355 		 return FALSE;
356 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->avail_size))
357 		 return FALSE;
358 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->total_inodes))
359 		 return FALSE;
360 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->used_inodes))
361 		 return FALSE;
362 	 if (!xdr_array (xdrs, (char **)&objp->fs_env.fs_env_val, (u_int *) &objp->fs_env.fs_env_len, ~0,
363 		sizeof (ndmp4_pval), (xdrproc_t) xdr_ndmp4_pval))
364 		 return FALSE;
365 	 if (!xdr_string (xdrs, &objp->fs_status, ~0))
366 		 return FALSE;
367 	return TRUE;
368 }
369 
370 bool_t
xdr_ndmp4_config_get_fs_info_reply(XDR * xdrs,ndmp4_config_get_fs_info_reply * objp)371 xdr_ndmp4_config_get_fs_info_reply (XDR *xdrs, ndmp4_config_get_fs_info_reply *objp)
372 {
373 	register int32_t *buf;
374 
375 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
376 		 return FALSE;
377 	 if (!xdr_array (xdrs, (char **)&objp->fs_info.fs_info_val, (u_int *) &objp->fs_info.fs_info_len, ~0,
378 		sizeof (ndmp4_fs_info), (xdrproc_t) xdr_ndmp4_fs_info))
379 		 return FALSE;
380 	return TRUE;
381 }
382 
383 bool_t
xdr_ndmp4_device_capability(XDR * xdrs,ndmp4_device_capability * objp)384 xdr_ndmp4_device_capability (XDR *xdrs, ndmp4_device_capability *objp)
385 {
386 	register int32_t *buf;
387 
388 	 if (!xdr_string (xdrs, &objp->device, ~0))
389 		 return FALSE;
390 	 if (!xdr_u_long (xdrs, &objp->attr))
391 		 return FALSE;
392 	 if (!xdr_array (xdrs, (char **)&objp->capability.capability_val, (u_int *) &objp->capability.capability_len, ~0,
393 		sizeof (ndmp4_pval), (xdrproc_t) xdr_ndmp4_pval))
394 		 return FALSE;
395 	return TRUE;
396 }
397 
398 bool_t
xdr_ndmp4_device_info(XDR * xdrs,ndmp4_device_info * objp)399 xdr_ndmp4_device_info (XDR *xdrs, ndmp4_device_info *objp)
400 {
401 	register int32_t *buf;
402 
403 	 if (!xdr_string (xdrs, &objp->model, ~0))
404 		 return FALSE;
405 	 if (!xdr_array (xdrs, (char **)&objp->caplist.caplist_val, (u_int *) &objp->caplist.caplist_len, ~0,
406 		sizeof (ndmp4_device_capability), (xdrproc_t) xdr_ndmp4_device_capability))
407 		 return FALSE;
408 	return TRUE;
409 }
410 
411 bool_t
xdr_ndmp4_config_get_tape_info_reply(XDR * xdrs,ndmp4_config_get_tape_info_reply * objp)412 xdr_ndmp4_config_get_tape_info_reply (XDR *xdrs, ndmp4_config_get_tape_info_reply *objp)
413 {
414 	register int32_t *buf;
415 
416 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
417 		 return FALSE;
418 	 if (!xdr_array (xdrs, (char **)&objp->tape_info.tape_info_val, (u_int *) &objp->tape_info.tape_info_len, ~0,
419 		sizeof (ndmp4_device_info), (xdrproc_t) xdr_ndmp4_device_info))
420 		 return FALSE;
421 	return TRUE;
422 }
423 
424 bool_t
xdr_ndmp4_config_get_scsi_info_reply(XDR * xdrs,ndmp4_config_get_scsi_info_reply * objp)425 xdr_ndmp4_config_get_scsi_info_reply (XDR *xdrs, ndmp4_config_get_scsi_info_reply *objp)
426 {
427 	register int32_t *buf;
428 
429 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
430 		 return FALSE;
431 	 if (!xdr_array (xdrs, (char **)&objp->scsi_info.scsi_info_val, (u_int *) &objp->scsi_info.scsi_info_len, ~0,
432 		sizeof (ndmp4_device_info), (xdrproc_t) xdr_ndmp4_device_info))
433 		 return FALSE;
434 	return TRUE;
435 }
436 
437 bool_t
xdr_ndmp4_class_list(XDR * xdrs,ndmp4_class_list * objp)438 xdr_ndmp4_class_list (XDR *xdrs, ndmp4_class_list *objp)
439 {
440 	register int32_t *buf;
441 
442 	 if (!xdr_u_short (xdrs, &objp->class_id))
443 		 return FALSE;
444 	 if (!xdr_array (xdrs, (char **)&objp->class_version.class_version_val, (u_int *) &objp->class_version.class_version_len, ~0,
445 		sizeof (u_short), (xdrproc_t) xdr_u_short))
446 		 return FALSE;
447 	return TRUE;
448 }
449 
450 bool_t
xdr_ndmp4_class_version(XDR * xdrs,ndmp4_class_version * objp)451 xdr_ndmp4_class_version (XDR *xdrs, ndmp4_class_version *objp)
452 {
453 	register int32_t *buf;
454 
455 	 if (!xdr_u_short (xdrs, &objp->class_id))
456 		 return FALSE;
457 	 if (!xdr_u_short (xdrs, &objp->class_version))
458 		 return FALSE;
459 	return TRUE;
460 }
461 
462 bool_t
xdr_ndmp4_config_get_ext_list_reply(XDR * xdrs,ndmp4_config_get_ext_list_reply * objp)463 xdr_ndmp4_config_get_ext_list_reply (XDR *xdrs, ndmp4_config_get_ext_list_reply *objp)
464 {
465 	register int32_t *buf;
466 
467 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
468 		 return FALSE;
469 	 if (!xdr_array (xdrs, (char **)&objp->class_list.class_list_val, (u_int *) &objp->class_list.class_list_len, ~0,
470 		sizeof (ndmp4_class_list), (xdrproc_t) xdr_ndmp4_class_list))
471 		 return FALSE;
472 	return TRUE;
473 }
474 
475 bool_t
xdr_ndmp4_config_set_ext_list_request(XDR * xdrs,ndmp4_config_set_ext_list_request * objp)476 xdr_ndmp4_config_set_ext_list_request (XDR *xdrs, ndmp4_config_set_ext_list_request *objp)
477 {
478 	register int32_t *buf;
479 
480 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
481 		 return FALSE;
482 	 if (!xdr_array (xdrs, (char **)&objp->ndmp4_accepted_ext.ndmp4_accepted_ext_val, (u_int *) &objp->ndmp4_accepted_ext.ndmp4_accepted_ext_len, ~0,
483 		sizeof (ndmp4_class_list), (xdrproc_t) xdr_ndmp4_class_list))
484 		 return FALSE;
485 	return TRUE;
486 }
487 
488 bool_t
xdr_ndmp4_config_set_ext_list_reply(XDR * xdrs,ndmp4_config_set_ext_list_reply * objp)489 xdr_ndmp4_config_set_ext_list_reply (XDR *xdrs, ndmp4_config_set_ext_list_reply *objp)
490 {
491 	register int32_t *buf;
492 
493 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
494 		 return FALSE;
495 	return TRUE;
496 }
497 
498 bool_t
xdr_ndmp4_scsi_open_request(XDR * xdrs,ndmp4_scsi_open_request * objp)499 xdr_ndmp4_scsi_open_request (XDR *xdrs, ndmp4_scsi_open_request *objp)
500 {
501 	register int32_t *buf;
502 
503 	 if (!xdr_string (xdrs, &objp->device, ~0))
504 		 return FALSE;
505 	return TRUE;
506 }
507 
508 bool_t
xdr_ndmp4_scsi_open_reply(XDR * xdrs,ndmp4_scsi_open_reply * objp)509 xdr_ndmp4_scsi_open_reply (XDR *xdrs, ndmp4_scsi_open_reply *objp)
510 {
511 	register int32_t *buf;
512 
513 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
514 		 return FALSE;
515 	return TRUE;
516 }
517 
518 bool_t
xdr_ndmp4_scsi_close_reply(XDR * xdrs,ndmp4_scsi_close_reply * objp)519 xdr_ndmp4_scsi_close_reply (XDR *xdrs, ndmp4_scsi_close_reply *objp)
520 {
521 	register int32_t *buf;
522 
523 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
524 		 return FALSE;
525 	return TRUE;
526 }
527 
528 bool_t
xdr_ndmp4_scsi_get_state_reply(XDR * xdrs,ndmp4_scsi_get_state_reply * objp)529 xdr_ndmp4_scsi_get_state_reply (XDR *xdrs, ndmp4_scsi_get_state_reply *objp)
530 {
531 	register int32_t *buf;
532 
533 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
534 		 return FALSE;
535 	 if (!xdr_short (xdrs, &objp->target_controller))
536 		 return FALSE;
537 	 if (!xdr_short (xdrs, &objp->target_id))
538 		 return FALSE;
539 	 if (!xdr_short (xdrs, &objp->target_lun))
540 		 return FALSE;
541 	return TRUE;
542 }
543 
544 bool_t
xdr_ndmp4_scsi_reset_device_reply(XDR * xdrs,ndmp4_scsi_reset_device_reply * objp)545 xdr_ndmp4_scsi_reset_device_reply (XDR *xdrs, ndmp4_scsi_reset_device_reply *objp)
546 {
547 	register int32_t *buf;
548 
549 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
550 		 return FALSE;
551 	return TRUE;
552 }
553 
554 bool_t
xdr_ndmp4_execute_cdb_request(XDR * xdrs,ndmp4_execute_cdb_request * objp)555 xdr_ndmp4_execute_cdb_request (XDR *xdrs, ndmp4_execute_cdb_request *objp)
556 {
557 	register int32_t *buf;
558 
559 
560 	if (xdrs->x_op == XDR_ENCODE) {
561 		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
562 		if (buf == NULL) {
563 			 if (!xdr_u_long (xdrs, &objp->flags))
564 				 return FALSE;
565 			 if (!xdr_u_long (xdrs, &objp->timeout))
566 				 return FALSE;
567 			 if (!xdr_u_long (xdrs, &objp->datain_len))
568 				 return FALSE;
569 
570 		} else {
571 		IXDR_PUT_U_LONG(buf, objp->flags);
572 		IXDR_PUT_U_LONG(buf, objp->timeout);
573 		IXDR_PUT_U_LONG(buf, objp->datain_len);
574 		}
575 		 if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0))
576 			 return FALSE;
577 		 if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0))
578 			 return FALSE;
579 		return TRUE;
580 	} else if (xdrs->x_op == XDR_DECODE) {
581 		buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
582 		if (buf == NULL) {
583 			 if (!xdr_u_long (xdrs, &objp->flags))
584 				 return FALSE;
585 			 if (!xdr_u_long (xdrs, &objp->timeout))
586 				 return FALSE;
587 			 if (!xdr_u_long (xdrs, &objp->datain_len))
588 				 return FALSE;
589 
590 		} else {
591 		objp->flags = IXDR_GET_U_LONG(buf);
592 		objp->timeout = IXDR_GET_U_LONG(buf);
593 		objp->datain_len = IXDR_GET_U_LONG(buf);
594 		}
595 		 if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0))
596 			 return FALSE;
597 		 if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0))
598 			 return FALSE;
599 	 return TRUE;
600 	}
601 
602 	 if (!xdr_u_long (xdrs, &objp->flags))
603 		 return FALSE;
604 	 if (!xdr_u_long (xdrs, &objp->timeout))
605 		 return FALSE;
606 	 if (!xdr_u_long (xdrs, &objp->datain_len))
607 		 return FALSE;
608 	 if (!xdr_bytes (xdrs, (char **)&objp->cdb.cdb_val, (u_int *) &objp->cdb.cdb_len, ~0))
609 		 return FALSE;
610 	 if (!xdr_bytes (xdrs, (char **)&objp->dataout.dataout_val, (u_int *) &objp->dataout.dataout_len, ~0))
611 		 return FALSE;
612 	return TRUE;
613 }
614 
615 bool_t
xdr_ndmp4_execute_cdb_reply(XDR * xdrs,ndmp4_execute_cdb_reply * objp)616 xdr_ndmp4_execute_cdb_reply (XDR *xdrs, ndmp4_execute_cdb_reply *objp)
617 {
618 	register int32_t *buf;
619 
620 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
621 		 return FALSE;
622 	 if (!xdr_u_char (xdrs, &objp->status))
623 		 return FALSE;
624 	 if (!xdr_u_long (xdrs, &objp->dataout_len))
625 		 return FALSE;
626 	 if (!xdr_bytes (xdrs, (char **)&objp->datain.datain_val, (u_int *) &objp->datain.datain_len, ~0))
627 		 return FALSE;
628 	 if (!xdr_bytes (xdrs, (char **)&objp->ext_sense.ext_sense_val, (u_int *) &objp->ext_sense.ext_sense_len, ~0))
629 		 return FALSE;
630 	return TRUE;
631 }
632 
633 bool_t
xdr_ndmp4_scsi_execute_cdb_request(XDR * xdrs,ndmp4_scsi_execute_cdb_request * objp)634 xdr_ndmp4_scsi_execute_cdb_request (XDR *xdrs, ndmp4_scsi_execute_cdb_request *objp)
635 {
636 	register int32_t *buf;
637 
638 	 if (!xdr_ndmp4_execute_cdb_request (xdrs, objp))
639 		 return FALSE;
640 	return TRUE;
641 }
642 
643 bool_t
xdr_ndmp4_scsi_execute_cdb_reply(XDR * xdrs,ndmp4_scsi_execute_cdb_reply * objp)644 xdr_ndmp4_scsi_execute_cdb_reply (XDR *xdrs, ndmp4_scsi_execute_cdb_reply *objp)
645 {
646 	register int32_t *buf;
647 
648 	 if (!xdr_ndmp4_execute_cdb_reply (xdrs, objp))
649 		 return FALSE;
650 	return TRUE;
651 }
652 
653 bool_t
xdr_ndmp4_tape_open_mode(XDR * xdrs,ndmp4_tape_open_mode * objp)654 xdr_ndmp4_tape_open_mode (XDR *xdrs, ndmp4_tape_open_mode *objp)
655 {
656 	register int32_t *buf;
657 
658 	 if (!xdr_enum (xdrs, (enum_t *) objp))
659 		 return FALSE;
660 	return TRUE;
661 }
662 
663 bool_t
xdr_ndmp4_tape_open_request(XDR * xdrs,ndmp4_tape_open_request * objp)664 xdr_ndmp4_tape_open_request (XDR *xdrs, ndmp4_tape_open_request *objp)
665 {
666 	register int32_t *buf;
667 
668 	 if (!xdr_string (xdrs, &objp->device, ~0))
669 		 return FALSE;
670 	 if (!xdr_ndmp4_tape_open_mode (xdrs, &objp->mode))
671 		 return FALSE;
672 	return TRUE;
673 }
674 
675 bool_t
xdr_ndmp4_tape_open_reply(XDR * xdrs,ndmp4_tape_open_reply * objp)676 xdr_ndmp4_tape_open_reply (XDR *xdrs, ndmp4_tape_open_reply *objp)
677 {
678 	register int32_t *buf;
679 
680 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
681 		 return FALSE;
682 	return TRUE;
683 }
684 
685 bool_t
xdr_ndmp4_tape_close_reply(XDR * xdrs,ndmp4_tape_close_reply * objp)686 xdr_ndmp4_tape_close_reply (XDR *xdrs, ndmp4_tape_close_reply *objp)
687 {
688 	register int32_t *buf;
689 
690 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
691 		 return FALSE;
692 	return TRUE;
693 }
694 
695 bool_t
xdr_ndmp4_tape_get_state_reply(XDR * xdrs,ndmp4_tape_get_state_reply * objp)696 xdr_ndmp4_tape_get_state_reply (XDR *xdrs, ndmp4_tape_get_state_reply *objp)
697 {
698 	register int32_t *buf;
699 
700 
701 	if (xdrs->x_op == XDR_ENCODE) {
702 		 if (!xdr_u_long (xdrs, &objp->unsupported))
703 			 return FALSE;
704 		 if (!xdr_ndmp4_error (xdrs, &objp->error))
705 			 return FALSE;
706 		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
707 		if (buf == NULL) {
708 			 if (!xdr_u_long (xdrs, &objp->flags))
709 				 return FALSE;
710 			 if (!xdr_u_long (xdrs, &objp->file_num))
711 				 return FALSE;
712 			 if (!xdr_u_long (xdrs, &objp->soft_errors))
713 				 return FALSE;
714 			 if (!xdr_u_long (xdrs, &objp->block_size))
715 				 return FALSE;
716 			 if (!xdr_u_long (xdrs, &objp->blockno))
717 				 return FALSE;
718 
719 		} else {
720 		IXDR_PUT_U_LONG(buf, objp->flags);
721 		IXDR_PUT_U_LONG(buf, objp->file_num);
722 		IXDR_PUT_U_LONG(buf, objp->soft_errors);
723 		IXDR_PUT_U_LONG(buf, objp->block_size);
724 		IXDR_PUT_U_LONG(buf, objp->blockno);
725 		}
726 		 if (!xdr_ndmp4_u_quad (xdrs, &objp->total_space))
727 			 return FALSE;
728 		 if (!xdr_ndmp4_u_quad (xdrs, &objp->space_remain))
729 			 return FALSE;
730 		return TRUE;
731 	} else if (xdrs->x_op == XDR_DECODE) {
732 		 if (!xdr_u_long (xdrs, &objp->unsupported))
733 			 return FALSE;
734 		 if (!xdr_ndmp4_error (xdrs, &objp->error))
735 			 return FALSE;
736 		buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
737 		if (buf == NULL) {
738 			 if (!xdr_u_long (xdrs, &objp->flags))
739 				 return FALSE;
740 			 if (!xdr_u_long (xdrs, &objp->file_num))
741 				 return FALSE;
742 			 if (!xdr_u_long (xdrs, &objp->soft_errors))
743 				 return FALSE;
744 			 if (!xdr_u_long (xdrs, &objp->block_size))
745 				 return FALSE;
746 			 if (!xdr_u_long (xdrs, &objp->blockno))
747 				 return FALSE;
748 
749 		} else {
750 		objp->flags = IXDR_GET_U_LONG(buf);
751 		objp->file_num = IXDR_GET_U_LONG(buf);
752 		objp->soft_errors = IXDR_GET_U_LONG(buf);
753 		objp->block_size = IXDR_GET_U_LONG(buf);
754 		objp->blockno = IXDR_GET_U_LONG(buf);
755 		}
756 		 if (!xdr_ndmp4_u_quad (xdrs, &objp->total_space))
757 			 return FALSE;
758 		 if (!xdr_ndmp4_u_quad (xdrs, &objp->space_remain))
759 			 return FALSE;
760 	 return TRUE;
761 	}
762 
763 	 if (!xdr_u_long (xdrs, &objp->unsupported))
764 		 return FALSE;
765 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
766 		 return FALSE;
767 	 if (!xdr_u_long (xdrs, &objp->flags))
768 		 return FALSE;
769 	 if (!xdr_u_long (xdrs, &objp->file_num))
770 		 return FALSE;
771 	 if (!xdr_u_long (xdrs, &objp->soft_errors))
772 		 return FALSE;
773 	 if (!xdr_u_long (xdrs, &objp->block_size))
774 		 return FALSE;
775 	 if (!xdr_u_long (xdrs, &objp->blockno))
776 		 return FALSE;
777 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->total_space))
778 		 return FALSE;
779 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->space_remain))
780 		 return FALSE;
781 	return TRUE;
782 }
783 
784 bool_t
xdr_ndmp4_tape_mtio_op(XDR * xdrs,ndmp4_tape_mtio_op * objp)785 xdr_ndmp4_tape_mtio_op (XDR *xdrs, ndmp4_tape_mtio_op *objp)
786 {
787 	register int32_t *buf;
788 
789 	 if (!xdr_enum (xdrs, (enum_t *) objp))
790 		 return FALSE;
791 	return TRUE;
792 }
793 
794 bool_t
xdr_ndmp4_tape_mtio_request(XDR * xdrs,ndmp4_tape_mtio_request * objp)795 xdr_ndmp4_tape_mtio_request (XDR *xdrs, ndmp4_tape_mtio_request *objp)
796 {
797 	register int32_t *buf;
798 
799 	 if (!xdr_ndmp4_tape_mtio_op (xdrs, &objp->tape_op))
800 		 return FALSE;
801 	 if (!xdr_u_long (xdrs, &objp->count))
802 		 return FALSE;
803 	return TRUE;
804 }
805 
806 bool_t
xdr_ndmp4_tape_mtio_reply(XDR * xdrs,ndmp4_tape_mtio_reply * objp)807 xdr_ndmp4_tape_mtio_reply (XDR *xdrs, ndmp4_tape_mtio_reply *objp)
808 {
809 	register int32_t *buf;
810 
811 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
812 		 return FALSE;
813 	 if (!xdr_u_long (xdrs, &objp->resid_count))
814 		 return FALSE;
815 	return TRUE;
816 }
817 
818 bool_t
xdr_ndmp4_tape_write_request(XDR * xdrs,ndmp4_tape_write_request * objp)819 xdr_ndmp4_tape_write_request (XDR *xdrs, ndmp4_tape_write_request *objp)
820 {
821 	register int32_t *buf;
822 
823 	 if (!xdr_bytes (xdrs, (char **)&objp->data_out.data_out_val, (u_int *) &objp->data_out.data_out_len, ~0))
824 		 return FALSE;
825 	return TRUE;
826 }
827 
828 bool_t
xdr_ndmp4_tape_write_reply(XDR * xdrs,ndmp4_tape_write_reply * objp)829 xdr_ndmp4_tape_write_reply (XDR *xdrs, ndmp4_tape_write_reply *objp)
830 {
831 	register int32_t *buf;
832 
833 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
834 		 return FALSE;
835 	 if (!xdr_u_long (xdrs, &objp->count))
836 		 return FALSE;
837 	return TRUE;
838 }
839 
840 bool_t
xdr_ndmp4_tape_read_request(XDR * xdrs,ndmp4_tape_read_request * objp)841 xdr_ndmp4_tape_read_request (XDR *xdrs, ndmp4_tape_read_request *objp)
842 {
843 	register int32_t *buf;
844 
845 	 if (!xdr_u_long (xdrs, &objp->count))
846 		 return FALSE;
847 	return TRUE;
848 }
849 
850 bool_t
xdr_ndmp4_tape_read_reply(XDR * xdrs,ndmp4_tape_read_reply * objp)851 xdr_ndmp4_tape_read_reply (XDR *xdrs, ndmp4_tape_read_reply *objp)
852 {
853 	register int32_t *buf;
854 
855 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
856 		 return FALSE;
857 	 if (!xdr_bytes (xdrs, (char **)&objp->data_in.data_in_val, (u_int *) &objp->data_in.data_in_len, ~0))
858 		 return FALSE;
859 	return TRUE;
860 }
861 
862 bool_t
xdr_ndmp4_tape_execute_cdb_request(XDR * xdrs,ndmp4_tape_execute_cdb_request * objp)863 xdr_ndmp4_tape_execute_cdb_request (XDR *xdrs, ndmp4_tape_execute_cdb_request *objp)
864 {
865 	register int32_t *buf;
866 
867 	 if (!xdr_ndmp4_scsi_execute_cdb_request (xdrs, objp))
868 		 return FALSE;
869 	return TRUE;
870 }
871 
872 bool_t
xdr_ndmp4_tape_execute_cdb_reply(XDR * xdrs,ndmp4_tape_execute_cdb_reply * objp)873 xdr_ndmp4_tape_execute_cdb_reply (XDR *xdrs, ndmp4_tape_execute_cdb_reply *objp)
874 {
875 	register int32_t *buf;
876 
877 	 if (!xdr_ndmp4_scsi_execute_cdb_reply (xdrs, objp))
878 		 return FALSE;
879 	return TRUE;
880 }
881 
882 bool_t
xdr_ndmp4_data_operation(XDR * xdrs,ndmp4_data_operation * objp)883 xdr_ndmp4_data_operation (XDR *xdrs, ndmp4_data_operation *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
xdr_ndmp4_data_state(XDR * xdrs,ndmp4_data_state * objp)893 xdr_ndmp4_data_state (XDR *xdrs, ndmp4_data_state *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
xdr_ndmp4_data_halt_reason(XDR * xdrs,ndmp4_data_halt_reason * objp)903 xdr_ndmp4_data_halt_reason (XDR *xdrs, ndmp4_data_halt_reason *objp)
904 {
905 	register int32_t *buf;
906 
907 	 if (!xdr_enum (xdrs, (enum_t *) objp))
908 		 return FALSE;
909 	return TRUE;
910 }
911 
912 bool_t
xdr_ndmp4_tcp_addr(XDR * xdrs,ndmp4_tcp_addr * objp)913 xdr_ndmp4_tcp_addr (XDR *xdrs, ndmp4_tcp_addr *objp)
914 {
915 	register int32_t *buf;
916 
917 	 if (!xdr_u_long (xdrs, &objp->ip_addr))
918 		 return FALSE;
919 	 if (!xdr_u_short (xdrs, &objp->port))
920 		 return FALSE;
921 	 if (!xdr_array (xdrs, (char **)&objp->addr_env.addr_env_val, (u_int *) &objp->addr_env.addr_env_len, ~0,
922 		sizeof (ndmp4_pval), (xdrproc_t) xdr_ndmp4_pval))
923 		 return FALSE;
924 	return TRUE;
925 }
926 
927 bool_t
xdr_ndmp4_ipc_addr(XDR * xdrs,ndmp4_ipc_addr * objp)928 xdr_ndmp4_ipc_addr (XDR *xdrs, ndmp4_ipc_addr *objp)
929 {
930 	register int32_t *buf;
931 
932 	 if (!xdr_bytes (xdrs, (char **)&objp->comm_data.comm_data_val, (u_int *) &objp->comm_data.comm_data_len, ~0))
933 		 return FALSE;
934 	return TRUE;
935 }
936 
937 bool_t
xdr_ndmp4_addr(XDR * xdrs,ndmp4_addr * objp)938 xdr_ndmp4_addr (XDR *xdrs, ndmp4_addr *objp)
939 {
940 	register int32_t *buf;
941 
942 	 if (!xdr_ndmp4_addr_type (xdrs, &objp->addr_type))
943 		 return FALSE;
944 	switch (objp->addr_type) {
945 	case NDMP4_ADDR_LOCAL:
946 		break;
947 	case NDMP4_ADDR_TCP:
948 		 if (!xdr_array (xdrs, (char **)&objp->ndmp4_addr_u.tcp_addr.tcp_addr_val, (u_int *) &objp->ndmp4_addr_u.tcp_addr.tcp_addr_len, ~0,
949 			sizeof (ndmp4_tcp_addr), (xdrproc_t) xdr_ndmp4_tcp_addr))
950 			 return FALSE;
951 		break;
952 	case NDMP4_ADDR_IPC:
953 		 if (!xdr_ndmp4_ipc_addr (xdrs, &objp->ndmp4_addr_u.ipc_addr))
954 			 return FALSE;
955 		break;
956 	default:
957 		return FALSE;
958 	}
959 	return TRUE;
960 }
961 
962 bool_t
xdr_ndmp4_data_get_state_reply(XDR * xdrs,ndmp4_data_get_state_reply * objp)963 xdr_ndmp4_data_get_state_reply (XDR *xdrs, ndmp4_data_get_state_reply *objp)
964 {
965 	register int32_t *buf;
966 
967 	 if (!xdr_u_long (xdrs, &objp->unsupported))
968 		 return FALSE;
969 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
970 		 return FALSE;
971 	 if (!xdr_ndmp4_data_operation (xdrs, &objp->operation))
972 		 return FALSE;
973 	 if (!xdr_ndmp4_data_state (xdrs, &objp->state))
974 		 return FALSE;
975 	 if (!xdr_ndmp4_data_halt_reason (xdrs, &objp->halt_reason))
976 		 return FALSE;
977 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->bytes_processed))
978 		 return FALSE;
979 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->est_bytes_remain))
980 		 return FALSE;
981 	 if (!xdr_u_long (xdrs, &objp->est_time_remain))
982 		 return FALSE;
983 	 if (!xdr_ndmp4_addr (xdrs, &objp->data_connection_addr))
984 		 return FALSE;
985 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->read_offset))
986 		 return FALSE;
987 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->read_length))
988 		 return FALSE;
989 	return TRUE;
990 }
991 
992 bool_t
xdr_ndmp4_data_listen_request(XDR * xdrs,ndmp4_data_listen_request * objp)993 xdr_ndmp4_data_listen_request (XDR *xdrs, ndmp4_data_listen_request *objp)
994 {
995 	register int32_t *buf;
996 
997 	 if (!xdr_ndmp4_addr_type (xdrs, &objp->addr_type))
998 		 return FALSE;
999 	return TRUE;
1000 }
1001 
1002 bool_t
xdr_ndmp4_data_listen_reply(XDR * xdrs,ndmp4_data_listen_reply * objp)1003 xdr_ndmp4_data_listen_reply (XDR *xdrs, ndmp4_data_listen_reply *objp)
1004 {
1005 	register int32_t *buf;
1006 
1007 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1008 		 return FALSE;
1009 	 if (!xdr_ndmp4_addr (xdrs, &objp->connect_addr))
1010 		 return FALSE;
1011 	return TRUE;
1012 }
1013 
1014 bool_t
xdr_ndmp4_data_connect_request(XDR * xdrs,ndmp4_data_connect_request * objp)1015 xdr_ndmp4_data_connect_request (XDR *xdrs, ndmp4_data_connect_request *objp)
1016 {
1017 	register int32_t *buf;
1018 
1019 	 if (!xdr_ndmp4_addr (xdrs, &objp->addr))
1020 		 return FALSE;
1021 	return TRUE;
1022 }
1023 
1024 bool_t
xdr_ndmp4_data_connect_reply(XDR * xdrs,ndmp4_data_connect_reply * objp)1025 xdr_ndmp4_data_connect_reply (XDR *xdrs, ndmp4_data_connect_reply *objp)
1026 {
1027 	register int32_t *buf;
1028 
1029 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1030 		 return FALSE;
1031 	return TRUE;
1032 }
1033 
1034 bool_t
xdr_ndmp4_data_start_backup_request(XDR * xdrs,ndmp4_data_start_backup_request * objp)1035 xdr_ndmp4_data_start_backup_request (XDR *xdrs, ndmp4_data_start_backup_request *objp)
1036 {
1037 	register int32_t *buf;
1038 
1039 	 if (!xdr_string (xdrs, &objp->butype_name, ~0))
1040 		 return FALSE;
1041 	 if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
1042 		sizeof (ndmp4_pval), (xdrproc_t) xdr_ndmp4_pval))
1043 		 return FALSE;
1044 	return TRUE;
1045 }
1046 
1047 bool_t
xdr_ndmp4_data_start_backup_reply(XDR * xdrs,ndmp4_data_start_backup_reply * objp)1048 xdr_ndmp4_data_start_backup_reply (XDR *xdrs, ndmp4_data_start_backup_reply *objp)
1049 {
1050 	register int32_t *buf;
1051 
1052 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1053 		 return FALSE;
1054 	return TRUE;
1055 }
1056 
1057 bool_t
xdr_ndmp4_name(XDR * xdrs,ndmp4_name * objp)1058 xdr_ndmp4_name (XDR *xdrs, ndmp4_name *objp)
1059 {
1060 	register int32_t *buf;
1061 
1062 	 if (!xdr_string (xdrs, &objp->original_path, ~0))
1063 		 return FALSE;
1064 	 if (!xdr_string (xdrs, &objp->destination_path, ~0))
1065 		 return FALSE;
1066 	 if (!xdr_string (xdrs, &objp->name, ~0))
1067 		 return FALSE;
1068 	 if (!xdr_string (xdrs, &objp->other_name, ~0))
1069 		 return FALSE;
1070 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->node))
1071 		 return FALSE;
1072 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->fh_info))
1073 		 return FALSE;
1074 	return TRUE;
1075 }
1076 
1077 bool_t
xdr_ndmp4_data_start_recover_request(XDR * xdrs,ndmp4_data_start_recover_request * objp)1078 xdr_ndmp4_data_start_recover_request (XDR *xdrs, ndmp4_data_start_recover_request *objp)
1079 {
1080 	register int32_t *buf;
1081 
1082 	 if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
1083 		sizeof (ndmp4_pval), (xdrproc_t) xdr_ndmp4_pval))
1084 		 return FALSE;
1085 	 if (!xdr_array (xdrs, (char **)&objp->nlist.nlist_val, (u_int *) &objp->nlist.nlist_len, ~0,
1086 		sizeof (ndmp4_name), (xdrproc_t) xdr_ndmp4_name))
1087 		 return FALSE;
1088 	 if (!xdr_string (xdrs, &objp->butype_name, ~0))
1089 		 return FALSE;
1090 	return TRUE;
1091 }
1092 
1093 bool_t
xdr_ndmp4_data_start_recover_reply(XDR * xdrs,ndmp4_data_start_recover_reply * objp)1094 xdr_ndmp4_data_start_recover_reply (XDR *xdrs, ndmp4_data_start_recover_reply *objp)
1095 {
1096 	register int32_t *buf;
1097 
1098 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1099 		 return FALSE;
1100 	return TRUE;
1101 }
1102 
1103 bool_t
xdr_ndmp4_data_start_recover_filehist_request(XDR * xdrs,ndmp4_data_start_recover_filehist_request * objp)1104 xdr_ndmp4_data_start_recover_filehist_request (XDR *xdrs, ndmp4_data_start_recover_filehist_request *objp)
1105 {
1106 	register int32_t *buf;
1107 
1108 	 if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
1109 		sizeof (ndmp4_pval), (xdrproc_t) xdr_ndmp4_pval))
1110 		 return FALSE;
1111 	 if (!xdr_array (xdrs, (char **)&objp->nlist.nlist_val, (u_int *) &objp->nlist.nlist_len, ~0,
1112 		sizeof (ndmp4_name), (xdrproc_t) xdr_ndmp4_name))
1113 		 return FALSE;
1114 	 if (!xdr_string (xdrs, &objp->butype_name, ~0))
1115 		 return FALSE;
1116 	return TRUE;
1117 }
1118 
1119 bool_t
xdr_ndmp4_data_start_recover_filehist_reply(XDR * xdrs,ndmp4_data_start_recover_filehist_reply * objp)1120 xdr_ndmp4_data_start_recover_filehist_reply (XDR *xdrs, ndmp4_data_start_recover_filehist_reply *objp)
1121 {
1122 	register int32_t *buf;
1123 
1124 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1125 		 return FALSE;
1126 	return TRUE;
1127 }
1128 
1129 bool_t
xdr_ndmp4_data_abort_reply(XDR * xdrs,ndmp4_data_abort_reply * objp)1130 xdr_ndmp4_data_abort_reply (XDR *xdrs, ndmp4_data_abort_reply *objp)
1131 {
1132 	register int32_t *buf;
1133 
1134 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1135 		 return FALSE;
1136 	return TRUE;
1137 }
1138 
1139 bool_t
xdr_ndmp4_data_stop_reply(XDR * xdrs,ndmp4_data_stop_reply * objp)1140 xdr_ndmp4_data_stop_reply (XDR *xdrs, ndmp4_data_stop_reply *objp)
1141 {
1142 	register int32_t *buf;
1143 
1144 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1145 		 return FALSE;
1146 	return TRUE;
1147 }
1148 
1149 bool_t
xdr_ndmp4_data_get_env_reply(XDR * xdrs,ndmp4_data_get_env_reply * objp)1150 xdr_ndmp4_data_get_env_reply (XDR *xdrs, ndmp4_data_get_env_reply *objp)
1151 {
1152 	register int32_t *buf;
1153 
1154 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1155 		 return FALSE;
1156 	 if (!xdr_array (xdrs, (char **)&objp->env.env_val, (u_int *) &objp->env.env_len, ~0,
1157 		sizeof (ndmp4_pval), (xdrproc_t) xdr_ndmp4_pval))
1158 		 return FALSE;
1159 	return TRUE;
1160 }
1161 
1162 bool_t
xdr_ndmp4_mover_mode(XDR * xdrs,ndmp4_mover_mode * objp)1163 xdr_ndmp4_mover_mode (XDR *xdrs, ndmp4_mover_mode *objp)
1164 {
1165 	register int32_t *buf;
1166 
1167 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1168 		 return FALSE;
1169 	return TRUE;
1170 }
1171 
1172 bool_t
xdr_ndmp4_mover_state(XDR * xdrs,ndmp4_mover_state * objp)1173 xdr_ndmp4_mover_state (XDR *xdrs, ndmp4_mover_state *objp)
1174 {
1175 	register int32_t *buf;
1176 
1177 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1178 		 return FALSE;
1179 	return TRUE;
1180 }
1181 
1182 bool_t
xdr_ndmp4_mover_pause_reason(XDR * xdrs,ndmp4_mover_pause_reason * objp)1183 xdr_ndmp4_mover_pause_reason (XDR *xdrs, ndmp4_mover_pause_reason *objp)
1184 {
1185 	register int32_t *buf;
1186 
1187 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1188 		 return FALSE;
1189 	return TRUE;
1190 }
1191 
1192 bool_t
xdr_ndmp4_mover_halt_reason(XDR * xdrs,ndmp4_mover_halt_reason * objp)1193 xdr_ndmp4_mover_halt_reason (XDR *xdrs, ndmp4_mover_halt_reason *objp)
1194 {
1195 	register int32_t *buf;
1196 
1197 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1198 		 return FALSE;
1199 	return TRUE;
1200 }
1201 
1202 bool_t
xdr_ndmp4_mover_set_record_size_request(XDR * xdrs,ndmp4_mover_set_record_size_request * objp)1203 xdr_ndmp4_mover_set_record_size_request (XDR *xdrs, ndmp4_mover_set_record_size_request *objp)
1204 {
1205 	register int32_t *buf;
1206 
1207 	 if (!xdr_u_long (xdrs, &objp->len))
1208 		 return FALSE;
1209 	return TRUE;
1210 }
1211 
1212 bool_t
xdr_ndmp4_mover_set_record_size_reply(XDR * xdrs,ndmp4_mover_set_record_size_reply * objp)1213 xdr_ndmp4_mover_set_record_size_reply (XDR *xdrs, ndmp4_mover_set_record_size_reply *objp)
1214 {
1215 	register int32_t *buf;
1216 
1217 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1218 		 return FALSE;
1219 	return TRUE;
1220 }
1221 
1222 bool_t
xdr_ndmp4_mover_set_window_request(XDR * xdrs,ndmp4_mover_set_window_request * objp)1223 xdr_ndmp4_mover_set_window_request (XDR *xdrs, ndmp4_mover_set_window_request *objp)
1224 {
1225 	register int32_t *buf;
1226 
1227 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->offset))
1228 		 return FALSE;
1229 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->length))
1230 		 return FALSE;
1231 	return TRUE;
1232 }
1233 
1234 bool_t
xdr_ndmp4_mover_set_window_reply(XDR * xdrs,ndmp4_mover_set_window_reply * objp)1235 xdr_ndmp4_mover_set_window_reply (XDR *xdrs, ndmp4_mover_set_window_reply *objp)
1236 {
1237 	register int32_t *buf;
1238 
1239 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1240 		 return FALSE;
1241 	return TRUE;
1242 }
1243 
1244 bool_t
xdr_ndmp4_mover_connect_request(XDR * xdrs,ndmp4_mover_connect_request * objp)1245 xdr_ndmp4_mover_connect_request (XDR *xdrs, ndmp4_mover_connect_request *objp)
1246 {
1247 	register int32_t *buf;
1248 
1249 	 if (!xdr_ndmp4_mover_mode (xdrs, &objp->mode))
1250 		 return FALSE;
1251 	 if (!xdr_ndmp4_addr (xdrs, &objp->addr))
1252 		 return FALSE;
1253 	return TRUE;
1254 }
1255 
1256 bool_t
xdr_ndmp4_mover_connect_reply(XDR * xdrs,ndmp4_mover_connect_reply * objp)1257 xdr_ndmp4_mover_connect_reply (XDR *xdrs, ndmp4_mover_connect_reply *objp)
1258 {
1259 	register int32_t *buf;
1260 
1261 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1262 		 return FALSE;
1263 	return TRUE;
1264 }
1265 
1266 bool_t
xdr_ndmp4_mover_listen_request(XDR * xdrs,ndmp4_mover_listen_request * objp)1267 xdr_ndmp4_mover_listen_request (XDR *xdrs, ndmp4_mover_listen_request *objp)
1268 {
1269 	register int32_t *buf;
1270 
1271 	 if (!xdr_ndmp4_mover_mode (xdrs, &objp->mode))
1272 		 return FALSE;
1273 	 if (!xdr_ndmp4_addr_type (xdrs, &objp->addr_type))
1274 		 return FALSE;
1275 	return TRUE;
1276 }
1277 
1278 bool_t
xdr_ndmp4_mover_listen_reply(XDR * xdrs,ndmp4_mover_listen_reply * objp)1279 xdr_ndmp4_mover_listen_reply (XDR *xdrs, ndmp4_mover_listen_reply *objp)
1280 {
1281 	register int32_t *buf;
1282 
1283 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1284 		 return FALSE;
1285 	 if (!xdr_ndmp4_addr (xdrs, &objp->connect_addr))
1286 		 return FALSE;
1287 	return TRUE;
1288 }
1289 
1290 bool_t
xdr_ndmp4_mover_read_request(XDR * xdrs,ndmp4_mover_read_request * objp)1291 xdr_ndmp4_mover_read_request (XDR *xdrs, ndmp4_mover_read_request *objp)
1292 {
1293 	register int32_t *buf;
1294 
1295 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->offset))
1296 		 return FALSE;
1297 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->length))
1298 		 return FALSE;
1299 	return TRUE;
1300 }
1301 
1302 bool_t
xdr_ndmp4_mover_read_reply(XDR * xdrs,ndmp4_mover_read_reply * objp)1303 xdr_ndmp4_mover_read_reply (XDR *xdrs, ndmp4_mover_read_reply *objp)
1304 {
1305 	register int32_t *buf;
1306 
1307 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1308 		 return FALSE;
1309 	return TRUE;
1310 }
1311 
1312 bool_t
xdr_ndmp4_mover_get_state_reply(XDR * xdrs,ndmp4_mover_get_state_reply * objp)1313 xdr_ndmp4_mover_get_state_reply (XDR *xdrs, ndmp4_mover_get_state_reply *objp)
1314 {
1315 	register int32_t *buf;
1316 
1317 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1318 		 return FALSE;
1319 	 if (!xdr_ndmp4_mover_mode (xdrs, &objp->mode))
1320 		 return FALSE;
1321 	 if (!xdr_ndmp4_mover_state (xdrs, &objp->state))
1322 		 return FALSE;
1323 	 if (!xdr_ndmp4_mover_pause_reason (xdrs, &objp->pause_reason))
1324 		 return FALSE;
1325 	 if (!xdr_ndmp4_mover_halt_reason (xdrs, &objp->halt_reason))
1326 		 return FALSE;
1327 	 if (!xdr_u_long (xdrs, &objp->record_size))
1328 		 return FALSE;
1329 	 if (!xdr_u_long (xdrs, &objp->record_num))
1330 		 return FALSE;
1331 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->bytes_moved))
1332 		 return FALSE;
1333 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->seek_position))
1334 		 return FALSE;
1335 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->bytes_left_to_read))
1336 		 return FALSE;
1337 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->window_offset))
1338 		 return FALSE;
1339 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->window_length))
1340 		 return FALSE;
1341 	 if (!xdr_ndmp4_addr (xdrs, &objp->data_connection_addr))
1342 		 return FALSE;
1343 	return TRUE;
1344 }
1345 
1346 bool_t
xdr_ndmp4_mover_continue_reply(XDR * xdrs,ndmp4_mover_continue_reply * objp)1347 xdr_ndmp4_mover_continue_reply (XDR *xdrs, ndmp4_mover_continue_reply *objp)
1348 {
1349 	register int32_t *buf;
1350 
1351 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1352 		 return FALSE;
1353 	return TRUE;
1354 }
1355 
1356 bool_t
xdr_ndmp4_mover_close_reply(XDR * xdrs,ndmp4_mover_close_reply * objp)1357 xdr_ndmp4_mover_close_reply (XDR *xdrs, ndmp4_mover_close_reply *objp)
1358 {
1359 	register int32_t *buf;
1360 
1361 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1362 		 return FALSE;
1363 	return TRUE;
1364 }
1365 
1366 bool_t
xdr_ndmp4_mover_abort_reply(XDR * xdrs,ndmp4_mover_abort_reply * objp)1367 xdr_ndmp4_mover_abort_reply (XDR *xdrs, ndmp4_mover_abort_reply *objp)
1368 {
1369 	register int32_t *buf;
1370 
1371 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1372 		 return FALSE;
1373 	return TRUE;
1374 }
1375 
1376 bool_t
xdr_ndmp4_mover_stop_reply(XDR * xdrs,ndmp4_mover_stop_reply * objp)1377 xdr_ndmp4_mover_stop_reply (XDR *xdrs, ndmp4_mover_stop_reply *objp)
1378 {
1379 	register int32_t *buf;
1380 
1381 	 if (!xdr_ndmp4_error (xdrs, &objp->error))
1382 		 return FALSE;
1383 	return TRUE;
1384 }
1385 
1386 bool_t
xdr_ndmp4_notify_data_halted_post(XDR * xdrs,ndmp4_notify_data_halted_post * objp)1387 xdr_ndmp4_notify_data_halted_post (XDR *xdrs, ndmp4_notify_data_halted_post *objp)
1388 {
1389 	register int32_t *buf;
1390 
1391 	 if (!xdr_ndmp4_data_halt_reason (xdrs, &objp->reason))
1392 		 return FALSE;
1393 	return TRUE;
1394 }
1395 
1396 bool_t
xdr_ndmp4_connection_status_reason(XDR * xdrs,ndmp4_connection_status_reason * objp)1397 xdr_ndmp4_connection_status_reason (XDR *xdrs, ndmp4_connection_status_reason *objp)
1398 {
1399 	register int32_t *buf;
1400 
1401 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1402 		 return FALSE;
1403 	return TRUE;
1404 }
1405 
1406 bool_t
xdr_ndmp4_notify_connection_status_post(XDR * xdrs,ndmp4_notify_connection_status_post * objp)1407 xdr_ndmp4_notify_connection_status_post (XDR *xdrs, ndmp4_notify_connection_status_post *objp)
1408 {
1409 	register int32_t *buf;
1410 
1411 	 if (!xdr_ndmp4_connection_status_reason (xdrs, &objp->reason))
1412 		 return FALSE;
1413 	 if (!xdr_u_short (xdrs, &objp->protocol_version))
1414 		 return FALSE;
1415 	 if (!xdr_string (xdrs, &objp->text_reason, ~0))
1416 		 return FALSE;
1417 	return TRUE;
1418 }
1419 
1420 bool_t
xdr_ndmp4_notify_mover_halted_post(XDR * xdrs,ndmp4_notify_mover_halted_post * objp)1421 xdr_ndmp4_notify_mover_halted_post (XDR *xdrs, ndmp4_notify_mover_halted_post *objp)
1422 {
1423 	register int32_t *buf;
1424 
1425 	 if (!xdr_ndmp4_mover_halt_reason (xdrs, &objp->reason))
1426 		 return FALSE;
1427 	return TRUE;
1428 }
1429 
1430 bool_t
xdr_ndmp4_notify_mover_paused_post(XDR * xdrs,ndmp4_notify_mover_paused_post * objp)1431 xdr_ndmp4_notify_mover_paused_post (XDR *xdrs, ndmp4_notify_mover_paused_post *objp)
1432 {
1433 	register int32_t *buf;
1434 
1435 	 if (!xdr_ndmp4_mover_pause_reason (xdrs, &objp->reason))
1436 		 return FALSE;
1437 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->seek_position))
1438 		 return FALSE;
1439 	return TRUE;
1440 }
1441 
1442 bool_t
xdr_ndmp4_notify_data_read_post(XDR * xdrs,ndmp4_notify_data_read_post * objp)1443 xdr_ndmp4_notify_data_read_post (XDR *xdrs, ndmp4_notify_data_read_post *objp)
1444 {
1445 	register int32_t *buf;
1446 
1447 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->offset))
1448 		 return FALSE;
1449 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->length))
1450 		 return FALSE;
1451 	return TRUE;
1452 }
1453 
1454 bool_t
xdr_ndmp4_has_associated_message(XDR * xdrs,ndmp4_has_associated_message * objp)1455 xdr_ndmp4_has_associated_message (XDR *xdrs, ndmp4_has_associated_message *objp)
1456 {
1457 	register int32_t *buf;
1458 
1459 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1460 		 return FALSE;
1461 	return TRUE;
1462 }
1463 
1464 bool_t
xdr_ndmp4_log_type(XDR * xdrs,ndmp4_log_type * objp)1465 xdr_ndmp4_log_type (XDR *xdrs, ndmp4_log_type *objp)
1466 {
1467 	register int32_t *buf;
1468 
1469 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1470 		 return FALSE;
1471 	return TRUE;
1472 }
1473 
1474 bool_t
xdr_ndmp4_log_message_post(XDR * xdrs,ndmp4_log_message_post * objp)1475 xdr_ndmp4_log_message_post (XDR *xdrs, ndmp4_log_message_post *objp)
1476 {
1477 	register int32_t *buf;
1478 
1479 	 if (!xdr_ndmp4_log_type (xdrs, &objp->log_type))
1480 		 return FALSE;
1481 	 if (!xdr_u_long (xdrs, &objp->message_id))
1482 		 return FALSE;
1483 	 if (!xdr_string (xdrs, &objp->entry, ~0))
1484 		 return FALSE;
1485 	 if (!xdr_ndmp4_has_associated_message (xdrs, &objp->associated_message_valid))
1486 		 return FALSE;
1487 	 if (!xdr_u_long (xdrs, &objp->associated_message_sequence))
1488 		 return FALSE;
1489 	return TRUE;
1490 }
1491 
1492 bool_t
xdr_ndmp4_recovery_status(XDR * xdrs,ndmp4_recovery_status * objp)1493 xdr_ndmp4_recovery_status (XDR *xdrs, ndmp4_recovery_status *objp)
1494 {
1495 	register int32_t *buf;
1496 
1497 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1498 		 return FALSE;
1499 	return TRUE;
1500 }
1501 
1502 bool_t
xdr_ndmp4_log_file_post(XDR * xdrs,ndmp4_log_file_post * objp)1503 xdr_ndmp4_log_file_post (XDR *xdrs, ndmp4_log_file_post *objp)
1504 {
1505 	register int32_t *buf;
1506 
1507 	 if (!xdr_string (xdrs, &objp->name, ~0))
1508 		 return FALSE;
1509 	 if (!xdr_ndmp4_recovery_status (xdrs, &objp->recovery_status))
1510 		 return FALSE;
1511 	return TRUE;
1512 }
1513 
1514 bool_t
xdr_ndmp4_fs_type(XDR * xdrs,ndmp4_fs_type * objp)1515 xdr_ndmp4_fs_type (XDR *xdrs, ndmp4_fs_type *objp)
1516 {
1517 	register int32_t *buf;
1518 
1519 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1520 		 return FALSE;
1521 	return TRUE;
1522 }
1523 
1524 bool_t
xdr_ndmp4_path(XDR * xdrs,ndmp4_path * objp)1525 xdr_ndmp4_path (XDR *xdrs, ndmp4_path *objp)
1526 {
1527 	register int32_t *buf;
1528 
1529 	 if (!xdr_string (xdrs, objp, ~0))
1530 		 return FALSE;
1531 	return TRUE;
1532 }
1533 
1534 bool_t
xdr_ndmp4_nt_path(XDR * xdrs,ndmp4_nt_path * objp)1535 xdr_ndmp4_nt_path (XDR *xdrs, ndmp4_nt_path *objp)
1536 {
1537 	register int32_t *buf;
1538 
1539 	 if (!xdr_ndmp4_path (xdrs, &objp->nt_path))
1540 		 return FALSE;
1541 	 if (!xdr_ndmp4_path (xdrs, &objp->dos_path))
1542 		 return FALSE;
1543 	return TRUE;
1544 }
1545 
1546 bool_t
xdr_ndmp4_file_name(XDR * xdrs,ndmp4_file_name * objp)1547 xdr_ndmp4_file_name (XDR *xdrs, ndmp4_file_name *objp)
1548 {
1549 	register int32_t *buf;
1550 
1551 	 if (!xdr_ndmp4_fs_type (xdrs, &objp->fs_type))
1552 		 return FALSE;
1553 	switch (objp->fs_type) {
1554 	case NDMP4_FS_UNIX:
1555 		 if (!xdr_ndmp4_path (xdrs, &objp->ndmp4_file_name_u.unix_name))
1556 			 return FALSE;
1557 		break;
1558 	case NDMP4_FS_NT:
1559 		 if (!xdr_ndmp4_nt_path (xdrs, &objp->ndmp4_file_name_u.nt_name))
1560 			 return FALSE;
1561 		break;
1562 	default:
1563 		 if (!xdr_ndmp4_path (xdrs, &objp->ndmp4_file_name_u.other_name))
1564 			 return FALSE;
1565 		break;
1566 	}
1567 	return TRUE;
1568 }
1569 
1570 bool_t
xdr_ndmp4_file_type(XDR * xdrs,ndmp4_file_type * objp)1571 xdr_ndmp4_file_type (XDR *xdrs, ndmp4_file_type *objp)
1572 {
1573 	register int32_t *buf;
1574 
1575 	 if (!xdr_enum (xdrs, (enum_t *) objp))
1576 		 return FALSE;
1577 	return TRUE;
1578 }
1579 
1580 bool_t
xdr_ndmp4_file_stat(XDR * xdrs,ndmp4_file_stat * objp)1581 xdr_ndmp4_file_stat (XDR *xdrs, ndmp4_file_stat *objp)
1582 {
1583 	register int32_t *buf;
1584 
1585 
1586 	if (xdrs->x_op == XDR_ENCODE) {
1587 		 if (!xdr_u_long (xdrs, &objp->unsupported))
1588 			 return FALSE;
1589 		 if (!xdr_ndmp4_fs_type (xdrs, &objp->fs_type))
1590 			 return FALSE;
1591 		 if (!xdr_ndmp4_file_type (xdrs, &objp->ftype))
1592 			 return FALSE;
1593 		buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
1594 		if (buf == NULL) {
1595 			 if (!xdr_u_long (xdrs, &objp->mtime))
1596 				 return FALSE;
1597 			 if (!xdr_u_long (xdrs, &objp->atime))
1598 				 return FALSE;
1599 			 if (!xdr_u_long (xdrs, &objp->ctime))
1600 				 return FALSE;
1601 			 if (!xdr_u_long (xdrs, &objp->owner))
1602 				 return FALSE;
1603 			 if (!xdr_u_long (xdrs, &objp->group))
1604 				 return FALSE;
1605 			 if (!xdr_u_long (xdrs, &objp->fattr))
1606 				 return FALSE;
1607 
1608 		} else {
1609 		IXDR_PUT_U_LONG(buf, objp->mtime);
1610 		IXDR_PUT_U_LONG(buf, objp->atime);
1611 		IXDR_PUT_U_LONG(buf, objp->ctime);
1612 		IXDR_PUT_U_LONG(buf, objp->owner);
1613 		IXDR_PUT_U_LONG(buf, objp->group);
1614 		IXDR_PUT_U_LONG(buf, objp->fattr);
1615 		}
1616 		 if (!xdr_ndmp4_u_quad (xdrs, &objp->size))
1617 			 return FALSE;
1618 		 if (!xdr_u_long (xdrs, &objp->links))
1619 			 return FALSE;
1620 		return TRUE;
1621 	} else if (xdrs->x_op == XDR_DECODE) {
1622 		 if (!xdr_u_long (xdrs, &objp->unsupported))
1623 			 return FALSE;
1624 		 if (!xdr_ndmp4_fs_type (xdrs, &objp->fs_type))
1625 			 return FALSE;
1626 		 if (!xdr_ndmp4_file_type (xdrs, &objp->ftype))
1627 			 return FALSE;
1628 		buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
1629 		if (buf == NULL) {
1630 			 if (!xdr_u_long (xdrs, &objp->mtime))
1631 				 return FALSE;
1632 			 if (!xdr_u_long (xdrs, &objp->atime))
1633 				 return FALSE;
1634 			 if (!xdr_u_long (xdrs, &objp->ctime))
1635 				 return FALSE;
1636 			 if (!xdr_u_long (xdrs, &objp->owner))
1637 				 return FALSE;
1638 			 if (!xdr_u_long (xdrs, &objp->group))
1639 				 return FALSE;
1640 			 if (!xdr_u_long (xdrs, &objp->fattr))
1641 				 return FALSE;
1642 
1643 		} else {
1644 		objp->mtime = IXDR_GET_U_LONG(buf);
1645 		objp->atime = IXDR_GET_U_LONG(buf);
1646 		objp->ctime = IXDR_GET_U_LONG(buf);
1647 		objp->owner = IXDR_GET_U_LONG(buf);
1648 		objp->group = IXDR_GET_U_LONG(buf);
1649 		objp->fattr = IXDR_GET_U_LONG(buf);
1650 		}
1651 		 if (!xdr_ndmp4_u_quad (xdrs, &objp->size))
1652 			 return FALSE;
1653 		 if (!xdr_u_long (xdrs, &objp->links))
1654 			 return FALSE;
1655 	 return TRUE;
1656 	}
1657 
1658 	 if (!xdr_u_long (xdrs, &objp->unsupported))
1659 		 return FALSE;
1660 	 if (!xdr_ndmp4_fs_type (xdrs, &objp->fs_type))
1661 		 return FALSE;
1662 	 if (!xdr_ndmp4_file_type (xdrs, &objp->ftype))
1663 		 return FALSE;
1664 	 if (!xdr_u_long (xdrs, &objp->mtime))
1665 		 return FALSE;
1666 	 if (!xdr_u_long (xdrs, &objp->atime))
1667 		 return FALSE;
1668 	 if (!xdr_u_long (xdrs, &objp->ctime))
1669 		 return FALSE;
1670 	 if (!xdr_u_long (xdrs, &objp->owner))
1671 		 return FALSE;
1672 	 if (!xdr_u_long (xdrs, &objp->group))
1673 		 return FALSE;
1674 	 if (!xdr_u_long (xdrs, &objp->fattr))
1675 		 return FALSE;
1676 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->size))
1677 		 return FALSE;
1678 	 if (!xdr_u_long (xdrs, &objp->links))
1679 		 return FALSE;
1680 	return TRUE;
1681 }
1682 
1683 bool_t
xdr_ndmp4_file(XDR * xdrs,ndmp4_file * objp)1684 xdr_ndmp4_file (XDR *xdrs, ndmp4_file *objp)
1685 {
1686 	register int32_t *buf;
1687 
1688 	 if (!xdr_array (xdrs, (char **)&objp->names.names_val, (u_int *) &objp->names.names_len, ~0,
1689 		sizeof (ndmp4_file_name), (xdrproc_t) xdr_ndmp4_file_name))
1690 		 return FALSE;
1691 	 if (!xdr_array (xdrs, (char **)&objp->stats.stats_val, (u_int *) &objp->stats.stats_len, ~0,
1692 		sizeof (ndmp4_file_stat), (xdrproc_t) xdr_ndmp4_file_stat))
1693 		 return FALSE;
1694 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->node))
1695 		 return FALSE;
1696 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->fh_info))
1697 		 return FALSE;
1698 	return TRUE;
1699 }
1700 
1701 bool_t
xdr_ndmp4_fh_add_file_post(XDR * xdrs,ndmp4_fh_add_file_post * objp)1702 xdr_ndmp4_fh_add_file_post (XDR *xdrs, ndmp4_fh_add_file_post *objp)
1703 {
1704 	register int32_t *buf;
1705 
1706 	 if (!xdr_array (xdrs, (char **)&objp->files.files_val, (u_int *) &objp->files.files_len, ~0,
1707 		sizeof (ndmp4_file), (xdrproc_t) xdr_ndmp4_file))
1708 		 return FALSE;
1709 	return TRUE;
1710 }
1711 
1712 bool_t
xdr_ndmp4_dir(XDR * xdrs,ndmp4_dir * objp)1713 xdr_ndmp4_dir (XDR *xdrs, ndmp4_dir *objp)
1714 {
1715 	register int32_t *buf;
1716 
1717 	 if (!xdr_array (xdrs, (char **)&objp->names.names_val, (u_int *) &objp->names.names_len, ~0,
1718 		sizeof (ndmp4_file_name), (xdrproc_t) xdr_ndmp4_file_name))
1719 		 return FALSE;
1720 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->node))
1721 		 return FALSE;
1722 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->parent))
1723 		 return FALSE;
1724 	return TRUE;
1725 }
1726 
1727 bool_t
xdr_ndmp4_fh_add_dir_post(XDR * xdrs,ndmp4_fh_add_dir_post * objp)1728 xdr_ndmp4_fh_add_dir_post (XDR *xdrs, ndmp4_fh_add_dir_post *objp)
1729 {
1730 	register int32_t *buf;
1731 
1732 	 if (!xdr_array (xdrs, (char **)&objp->dirs.dirs_val, (u_int *) &objp->dirs.dirs_len, ~0,
1733 		sizeof (ndmp4_dir), (xdrproc_t) xdr_ndmp4_dir))
1734 		 return FALSE;
1735 	return TRUE;
1736 }
1737 
1738 bool_t
xdr_ndmp4_node(XDR * xdrs,ndmp4_node * objp)1739 xdr_ndmp4_node (XDR *xdrs, ndmp4_node *objp)
1740 {
1741 	register int32_t *buf;
1742 
1743 	 if (!xdr_array (xdrs, (char **)&objp->stats.stats_val, (u_int *) &objp->stats.stats_len, ~0,
1744 		sizeof (ndmp4_file_stat), (xdrproc_t) xdr_ndmp4_file_stat))
1745 		 return FALSE;
1746 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->node))
1747 		 return FALSE;
1748 	 if (!xdr_ndmp4_u_quad (xdrs, &objp->fh_info))
1749 		 return FALSE;
1750 	return TRUE;
1751 }
1752 
1753 bool_t
xdr_ndmp4_fh_add_node_post(XDR * xdrs,ndmp4_fh_add_node_post * objp)1754 xdr_ndmp4_fh_add_node_post (XDR *xdrs, ndmp4_fh_add_node_post *objp)
1755 {
1756 	register int32_t *buf;
1757 
1758 	 if (!xdr_array (xdrs, (char **)&objp->nodes.nodes_val, (u_int *) &objp->nodes.nodes_len, ~0,
1759 		sizeof (ndmp4_node), (xdrproc_t) xdr_ndmp4_node))
1760 		 return FALSE;
1761 	return TRUE;
1762 }
1763 #endif /* !NDMOS_OPTION_NO_NDMP4 */
1764