xref: /titanic_50/usr/src/cmd/ndmpd/ndmp/ndmp.x (revision 3c112a2b34403220c06c3e2fcac403358cfba168)
1 /*
2  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 /*
7  * BSD 3 Clause License
8  *
9  * Copyright (c) 2007, The Storage Networking Industry Association.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 	- Redistributions of source code must retain the above copyright
15  *	  notice, this list of conditions and the following disclaimer.
16  *
17  * 	- Redistributions in binary form must reproduce the above copyright
18  *	  notice, this list of conditions and the following disclaimer in
19  *	  the documentation and/or other materials provided with the
20  *	  distribution.
21  *
22  *	- Neither the name of The Storage Networking Industry Association (SNIA)
23  *	  nor the names of its contributors may be used to endorse or promote
24  *	  products derived from this software without specific prior written
25  *	  permission.
26  *
27  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37  * POSSIBILITY OF SUCH DAMAGE.
38  */
39 /* Copyright (c) 1996, 1997 PDC, Network Appliance. All Rights Reserved */
40 
41 #define VER 3
42 
43 const NDMPV2 = 2;
44 const NDMPV3 = 3;
45 const NDMPV4 = 4;
46 const NDMPVER = NDMPV4;
47 const NDMPPORT = 10000;
48 
49 struct ndmp_u_quad
50 {
51 	u_long	high;
52 	u_long	low;
53 };
54 
55 struct ndmp_pval
56 {
57 	string	name<>;
58 	string	value<>;
59 };
60 
61 struct ndmp_scsi_device
62 {
63 	string	name<>;
64 };
65 
66 struct ndmp_tape_device
67 {
68 	string	name<>;
69 };
70 
71 enum ndmp_error
72 {
73 	NDMP_NO_ERR                     =  0, /* No error */
74 	NDMP_NOT_SUPPORTED_ERR          =  1, /* Call is not supported */
75 	NDMP_DEVICE_BUSY_ERR            =  2, /* The device is in use */
76 	NDMP_DEVICE_OPENED_ERR          =  3, /* Another tape or scsi device is already open */
77 	NDMP_NOT_AUTHORIZED_ERR         =  4, /* Connection has not been authorized */
78 	NDMP_PERMISSION_ERR             =  5, /* Some sort of permission problem */
79 	NDMP_DEV_NOT_OPEN_ERR           =  6, /* SCSI device is not open */
80 	NDMP_IO_ERR                     =  7, /* I/O error */
81 	NDMP_TIMEOUT_ERR                =  8, /* command timed out */
82 	NDMP_ILLEGAL_ARGS_ERR           =  9, /* illegal arguments in request */
83 	NDMP_NO_TAPE_LOADED_ERR         = 10, /* Cannot open because there is no tape loaded */
84 	NDMP_WRITE_PROTECT_ERR          = 11, /* tape cannot be open for write */
85 	NDMP_EOF_ERR                    = 12, /* Command encountered EOF */
86 	NDMP_EOM_ERR                    = 13, /* Command encountered EOM */
87 	NDMP_FILE_NOT_FOUND_ERR         = 14, /* File not found during restore */
88 	NDMP_BAD_FILE_ERR               = 15, /* The file descriptor is invalid */
89 	NDMP_NO_DEVICE_ERR              = 16, /* The device is not at that target */
90 	NDMP_NO_BUS_ERR                 = 17, /* Invalid controller */
91 	NDMP_XDR_DECODE_ERR             = 18, /* Can't decode the request argument */
92 	NDMP_ILLEGAL_STATE_ERR          = 19, /* Call can't be performed at this state */
93 	NDMP_UNDEFINED_ERR              = 20, /* Undefined Error */
94 	NDMP_XDR_ENCODE_ERR             = 21, /* Can't encode the reply argument */
95 	NDMP_NO_MEM_ERR                 = 22, /* No memory */
96 
97 	/*
98 	 * NDMP V3
99 	 */
100 	NDMP_CONNECT_ERR                = 23,
101 
102 	/*
103 	 * NDMP V4
104 	 */
105 	NDMP_SEQUENCE_NUM_ERR           = 24,
106 	NDMP_READ_IN_PROGRESS_ERR       = 25,
107 	NDMP_PRECONDITION_ERR           = 26,
108 	NDMP_CLASS_NOT_SUPPORTED_ERR    = 27,
109 	NDMP_VERSION_NOT_SUPPORTED_ERR  = 28,
110 	NDMP_EXT_DUPL_CLASSES_ERR       = 29,
111 	NDMP_EXT_DANDN_ILLEGAL_ERR      = 30
112 };
113 
114 enum ndmp_header_message_type
115 {
116 	NDMP_MESSAGE_REQUEST,
117 	NDMP_MESSAGE_REPLY
118 };
119 
120 enum ndmp_message
121 {
122 	NDMP_CONNECT_OPEN               = 0x900,
123 	NDMP_CONNECT_CLIENT_AUTH        = 0x901,
124 	NDMP_CONNECT_CLOSE              = 0x902,
125 	NDMP_CONNECT_SERVER_AUTH        = 0x903,
126 
127 	NDMP_CONFIG_GET_HOST_INFO       = 0x100,
128 	NDMP_CONFIG_GET_BUTYPE_ATTR     = 0x101, 	/* NDMP V2 */
129 	NDMP_CONFIG_GET_CONNECTION_TYPE = 0x102,
130 	NDMP_CONFIG_GET_AUTH_ATTR       = 0x103,
131 	NDMP_CONFIG_GET_BUTYPE_INFO     = 0x104, 	/* NDMP V3,4 */
132 	NDMP_CONFIG_GET_FS_INFO         = 0x105,  	/* NDMP V3,4 */
133 	NDMP_CONFIG_GET_TAPE_INFO       = 0x106,  	/* NDMP V3,4 */
134 	NDMP_CONFIG_GET_SCSI_INFO       = 0x107,  	/* NDMP V3,4 */
135 	NDMP_CONFIG_GET_SERVER_INFO     = 0x108,  	/* NDMP V3,4 */
136 	NDMP_CONFIG_SET_EXT_LIST        = 0x109, 	/* NDMP V4 */
137 	NDMP_CONFIG_GET_EXT_LIST        = 0x10A, 	/* NDMP V4 */
138 
139 	NDMP_SCSI_OPEN                  = 0x200,
140 	NDMP_SCSI_CLOSE                 = 0x201,
141 	NDMP_SCSI_GET_STATE             = 0x202,
142 	NDMP_SCSI_SET_TARGET            = 0x203,	/* NDMP V2,3 */
143 	NDMP_SCSI_RESET_DEVICE          = 0x204,
144 	NDMP_SCSI_RESET_BUS             = 0x205,	/* NDMP V2,3 */
145 	NDMP_SCSI_EXECUTE_CDB           = 0x206,
146 
147 	NDMP_TAPE_OPEN                  = 0x300,
148 	NDMP_TAPE_CLOSE                 = 0x301,
149 	NDMP_TAPE_GET_STATE             = 0x302,
150 	NDMP_TAPE_MTIO                  = 0x303,
151 	NDMP_TAPE_WRITE                 = 0x304,
152 	NDMP_TAPE_READ                  = 0x305,
153 	NDMP_TAPE_SET_RECORD_SIZE	= 0x306,	/* NDMP V1 */
154 	NDMP_TAPE_EXECUTE_CDB           = 0x307,
155 
156 	NDMP_DATA_GET_STATE             = 0x400,
157 	NDMP_DATA_START_BACKUP          = 0x401,
158 	NDMP_DATA_START_RECOVER         = 0x402,
159 	NDMP_DATA_ABORT                 = 0x403,
160 	NDMP_DATA_GET_ENV               = 0x404,
161 	NDMP_DATA_RESVD1                = 0x405,
162 	NDMP_DATA_RESVD2                = 0x406,
163 	NDMP_DATA_STOP                  = 0x407,
164 	NDMP_DATA_CONTINUE		= 0x408,	/* NDMP V1 */
165 	NDMP_DATA_LISTEN                = 0x409,
166 	NDMP_DATA_CONNECT               = 0x40A,
167 	NDMP_DATA_START_RECOVER_FILEHIST = 0x40B, 	/* NDMP V4 */
168 
169 	NDMP_NOTIFY_RESERVED            = 0x500,
170 	NDMP_NOTIFY_DATA_HALTED         = 0x501,
171 	NDMP_NOTIFY_CONNECTION_STATUS   = 0x502,
172 	NDMP_NOTIFY_MOVER_HALTED        = 0x503,
173 	NDMP_NOTIFY_MOVER_PAUSED        = 0x504,
174 	NDMP_NOTIFY_DATA_READ           = 0x505,
175 
176 	_NDMP_LOG_LOG                   = 0x600, 	/* NDMP V2 */
177 	_NDMP_LOG_DEBUG                 = 0x601, 	/* NDMP V2 */
178 	NDMP_LOG_FILE                   = 0x602, 	/* NDMP V3,4 */
179 	NDMP_LOG_MESSAGE                = 0x603, 	/* NDMP V3,4 */
180 
181 	NDMP_FH_ADD_UNIX_PATH           = 0x700, 	/* NDMP V2,3 */
182 	NDMP_FH_ADD_UNIX_DIR            = 0x701, 	/* NDMP V2,3 */
183 	NDMP_FH_ADD_UNIX_NODE           = 0x702, 	/* NDMP V2,3 */
184 	NDMP_FH_ADD_FILE                = 0x703, 	/* NDMP V3,4 */
185 	NDMP_FH_ADD_DIR                 = 0x704, 	/* NDMP V3,4 */
186 	NDMP_FH_ADD_NODE                = 0x705, 	/* NDMP V3,4 */
187 
188 	NDMP_MOVER_GET_STATE            = 0xA00,
189 	NDMP_MOVER_LISTEN               = 0xA01,
190 	NDMP_MOVER_CONTINUE             = 0xA02,
191 	NDMP_MOVER_ABORT                = 0xA03,
192 	NDMP_MOVER_STOP                 = 0xA04,
193 	NDMP_MOVER_SET_WINDOW           = 0xA05,
194 	NDMP_MOVER_READ                 = 0xA06,
195 	NDMP_MOVER_CLOSE                = 0xA07,
196 	NDMP_MOVER_SET_RECORD_SIZE      = 0xA08,
197 	NDMP_MOVER_CONNECT              = 0xA09, 	/* NDMP V3,4 */
198 
199 	NDMP_EXT_STANDARD_BASE          = 0x10000,
200 
201 	NDMP_EXT_PROPRIETARY_BASE       = 0x20000000
202 
203 };
204 
205 const NDMP_CONNECT_AUTH = NDMP_CONNECT_CLIENT_AUTH;
206 const NDMP_MESSAGE_POST = NDMP_MESSAGE_REQUEST;
207 
208 struct ndmp_header
209 {
210 	u_long sequence;			/* Monotonically increasing number */
211 	u_long time_stamp;			/* Time stamp of message */
212 	ndmp_header_message_type message_type;	/* What type of message */
213 	enum ndmp_message message;		/* Message number */
214 	u_long reply_sequence;			/* Reply is in response to */
215 	ndmp_error error;			/* Communications errors */
216 };
217 
218 
219 /***************************/
220 /*  CONNECT INTERFACE (V2) */
221 /***************************/
222 
223 /* NDMP_CONNECT_OPEN */
224 struct ndmp_connect_open_request
225 {
226 	u_short	protocol_version;	/* the version of protocol supported */
227 };
228 
229 struct ndmp_connect_open_reply
230 {
231 	ndmp_error	error;
232 };
233 
234 /* NDMP_CONNECT_CLIENT_AUTH = NDMP_CONNECT_AUTH */
235 enum ndmp_auth_type
236 {
237 	NDMP_AUTH_NONE,		/* no password is required */
238 	NDMP_AUTH_TEXT,		/* the clear text password */
239 	NDMP_AUTH_MD5		/* md5 */
240 };
241 
242 struct ndmp_auth_text
243 {
244 	string	user<>;
245 	string	password<>;
246 };
247 
248 struct ndmp_auth_md5
249 {
250 	string	user<>;
251 	opaque	auth_digest[16];
252 };
253 
254 union ndmp_auth_data switch (enum ndmp_auth_type auth_type)
255 {
256 	case NDMP_AUTH_NONE:
257 		void;
258 	case NDMP_AUTH_TEXT:
259 		struct ndmp_auth_text	auth_text;
260 	case NDMP_AUTH_MD5:
261 		struct ndmp_auth_md5	auth_md5;
262 };
263 
264 struct ndmp_connect_client_auth_request
265 {
266 	ndmp_auth_data	auth_data;
267 };
268 
269 struct ndmp_connect_client_auth_reply
270 {
271 	ndmp_error	error;
272 };
273 
274 
275 /* NDMP_CONNECT_CLOSE */
276 /* no request arguments */
277 /* no reply arguments */
278 
279 /* NDMP_CONNECT_SERVER_AUTH */
280 union ndmp_auth_attr switch (enum ndmp_auth_type auth_type)
281 {
282 	case NDMP_AUTH_NONE:
283 		void;
284 	case NDMP_AUTH_TEXT:
285 		void;
286 	case NDMP_AUTH_MD5:
287 		opaque	challenge[64];
288 };
289 
290 struct ndmp_connect_server_auth_request
291 {
292 	ndmp_auth_attr	client_attr;
293 };
294 
295 struct ndmp_connect_server_auth_reply
296 {
297 	ndmp_error	error;
298 	ndmp_auth_data	auth_result;
299 };
300 
301 
302 /***************************/
303 /*  CONNECT INTERFACE (V3) */
304 /***************************/
305 
306 /* NDMP_CONNECT_OPEN - same as V2 */
307 
308 struct ndmp_auth_text_v3
309 {
310 	string	auth_id<>;
311 	string	auth_password<>;
312 
313 };
314 
315 struct ndmp_auth_md5_v3
316 {
317 	string	auth_id<>;
318 	opaque	auth_digest[16];
319 };
320 
321 union ndmp_auth_data_v3 switch (enum ndmp_auth_type auth_type)
322 {
323 	case NDMP_AUTH_NONE:
324 		void;
325 	case NDMP_AUTH_TEXT:
326 		struct ndmp_auth_text_v3	auth_text;
327 	case NDMP_AUTH_MD5:
328 		struct ndmp_auth_md5_v3	auth_md5;
329 };
330 
331 struct ndmp_connect_client_auth_request_v3
332 {
333 	ndmp_auth_data_v3	auth_data;
334 };
335 
336 struct ndmp_connect_client_auth_reply_v3
337 {
338 	ndmp_error	error;
339 };
340 
341 /* NDMP_CONNECT_CLOSE - same as V2 */
342 
343 /* NDMP_CONNECT_SERVER_AUTH - same as V2 */
344 
345 
346 /***************************/
347 /*  CONNECT INTERFACE (V4) */
348 /***************************/
349 
350 /* NDMP_CONNECT_OPEN - same as V3 */
351 
352 /* NDMP_CONNECT_CLIENT_AUTH - same as V3 */
353 
354 /* NDMP_CONNECT_CLOSE - same as V3 */
355 
356 /* NDMP_CONNECT_SERVER_AUTH - same as V3 */
357 
358 
359 /*************************/
360 /* CONFIG INTERFACE (V2) */
361 /*************************/
362 
363 /* NDMP_CONFIG_GET_HOST_INFO */
364 /* no request arguments */
365 
366 struct ndmp_config_get_host_info_reply
367 {
368 	ndmp_error	error;
369 	string		hostname<>;	/* host name */
370 	string		os_type<>;	/* The operating system type (i.e. SOLARIS) */
371 	string		os_vers<>;	/* The version number of the OS (i.e. 2.5) */
372 	string		hostid<>;
373 	ndmp_auth_type	auth_type<>;
374 };
375 
376 /* NDMP_CONFIG_GET_BUTYPE_ATTR */
377 const NDMP_NO_BACKUP_FILELIST	= 0x0001;
378 const NDMP_NO_BACKUP_FHINFO	= 0x0002;
379 const NDMP_NO_RECOVER_FILELIST	= 0x0004;
380 const NDMP_NO_RECOVER_FHINFO	= 0x0008;
381 const NDMP_NO_RECOVER_SSID	= 0x0010;
382 const NDMP_NO_RECOVER_INC_ONLY	= 0x0020;
383 
384 struct ndmp_config_get_butype_attr_request
385 {
386 	string	name<>;		/* backup type name */
387 };
388 
389 struct ndmp_config_get_butype_attr_reply
390 {
391 	ndmp_error	error;
392 	u_long		attrs;
393 };
394 
395 /* NDMP_CONFIG_GET_MOVER_TYPE */
396 /* no request arguments */
397 
398 enum ndmp_addr_type
399 {
400 	NDMP_ADDR_LOCAL    = 0,
401 	NDMP_ADDR_TCP      = 1,
402 	NDMP_ADDR_FC       = 2, 	/* NDMP V2,3 */
403 	NDMP_ADDR_IPC      = 3
404 };
405 
406 struct ndmp_config_get_mover_type_reply
407 {
408 	ndmp_error		error;
409 	ndmp_addr_type		methods<>;
410 };
411 
412 /* NDMP_CONFIG_GET_AUTH_ATTR */
413 struct ndmp_config_get_auth_attr_request
414 {
415 	ndmp_auth_type	auth_type;
416 };
417 
418 struct ndmp_config_get_auth_attr_reply
419 {
420 	ndmp_error		error;
421 	ndmp_auth_attr		server_attr;
422 };
423 
424 
425 /*************************/
426 /* CONFIG INTERFACE (V3) */
427 /*************************/
428 
429 /* NDMP_CONFIG_GET_HOST_INFO */
430 /* no request arguments */
431 
432 struct ndmp_config_get_host_info_reply_v3
433 {
434 	ndmp_error	error;
435 	string		hostname<>;	/* host name */
436 	string		os_type<>;	/* The operating system type (i.e. SOLARIS) */
437 	string		os_vers<>;	/* The version number of the OS (i.e. 2.5) */
438 	string		hostid<>;
439 };
440 
441 /* NDMP_CONFIG_GET_CONNECTION_TYPE */
442 /* no request arguments */
443 
444 struct ndmp_config_get_connection_type_reply_v3
445 {
446 	ndmp_error	error;
447 	ndmp_addr_type	addr_types<>;
448 };
449 
450 /* NDMP_CONFIG_GET_AUTH_ATTR - same as V2 */
451 
452 /* NDMP_CONFIG_GET_SERVER_INFO */
453 /* no requset arguments */
454 
455 struct ndmp_config_get_server_info_reply_v3
456 {
457 	ndmp_error	error;
458 	string		vendor_name<>;
459 	string		product_name<>;
460 	string		revision_number<>;
461 	ndmp_auth_type	auth_type<>;
462 };
463 
464 /* Backup type attributes */
465 const NDMP_BUTYPE_BACKUP_FILE_HISTORY	 = 0x0001;	/* NDMP V2,3 */
466 const NDMP_BUTYPE_BACKUP_FILELIST        = 0x0002;
467 const NDMP_BUTYPE_RECOVER_FILELIST       = 0x0004;
468 const NDMP_BUTYPE_BACKUP_DIRECT          = 0x0008;
469 const NDMP_BUTYPE_RECOVER_DIRECT         = 0x0010;
470 const NDMP_BUTYPE_BACKUP_INCREMENTAL     = 0x0020;
471 const NDMP_BUTYPE_RECOVER_INCREMENTAL    = 0x0040;
472 const NDMP_BUTYPE_BACKUP_UTF8            = 0x0080;
473 const NDMP_BUTYPE_RECOVER_UTF8           = 0x0100;
474 const NDMP_BUTYPE_BACKUP_FH_FILE         = 0x0200; 	/* NDMP V4 */
475 const NDMP_BUTYPE_BACKUP_FH_DIR          = 0x0400; 	/* NDMP V4 */
476 const NDMP_BUTYPE_RECOVER_FILEHIST       = 0x0800; 	/* NDMP V4 */
477 const NDMP_BUTYPE_RECOVER_FH_FILE        = 0x1000; 	/* NDMP V4 */
478 const NDMP_BUTYPE_RECOVER_FH_DIR         = 0x2000; 	/* NDMP V4 */
479 
480 
481 struct ndmp_butype_info
482 {
483 	string		butype_name<>;
484 	ndmp_pval	default_env<>;
485 	u_long		attrs;
486 };
487 
488 /* NDMP_CONFIG_GET_BUTYPE_INFO */
489 /* no request arguments */
490 
491 struct ndmp_config_get_butype_info_reply_v3
492 {
493 	ndmp_error		error;
494 	ndmp_butype_info	butype_info<>;
495 };
496 
497 /* invalid bit */
498 const	NDMP_FS_INFO_TOTAL_SIZE_INVALID 	= 0x00000001;
499 const	NDMP_FS_INFO_USED_SIZE_INVALID		= 0x00000002;
500 const	NDMP_FS_INFO_AVAIL_SIZE_INVALID		= 0x00000004;
501 const	NDMP_FS_INFO_TOTAL_INODES_INVALID	= 0x00000008;
502 const	NDMP_FS_INFO_USED_INODES_INVALID	= 0x00000010;
503 
504 struct ndmp_fs_info_v3
505 {
506 	u_long		invalid;
507 	string		fs_type<>;
508 	string		fs_logical_device<>;
509 	string		fs_physical_device<>;
510 	ndmp_u_quad	total_size;
511 	ndmp_u_quad	used_size;
512 	ndmp_u_quad	avail_size;
513 	ndmp_u_quad	total_inodes;
514 	ndmp_u_quad	used_inodes;
515 	ndmp_pval	fs_env<>;
516 	string		fs_status<>;
517 };
518 
519 /* NDMP_CONFIG_GET_FS_INFO */
520 /* no request arguments */
521 
522 struct ndmp_config_get_fs_info_reply_v3
523 {
524 	ndmp_error		error;
525 	ndmp_fs_info_v3		fs_info<>;
526 };
527 
528 /* NDMP_CONFIG_GET_TAPE_INFO */
529 /* no request arguments */
530 
531 /* tape attributes */
532 const NDMP_TAPE_ATTR_REWIND = 0x00000001;
533 const NDMP_TAPE_ATTR_UNLOAD = 0x00000002;
534 const NDMP_TAPE_ATTR_RAW    = 0x00000004;
535 
536 
537 struct ndmp_device_capability_v3
538 {
539 	string		device<>;
540 	u_long		attr;
541 	ndmp_pval	capability<>;
542 };
543 
544 struct ndmp_device_info_v3
545 {
546 	string				model<>;
547 	ndmp_device_capability_v3	caplist<>;
548 
549 };
550 struct ndmp_config_get_tape_info_reply_v3
551 {
552 	ndmp_error		error;
553 	ndmp_device_info_v3	tape_info<>;
554 
555 };
556 
557 /* NDMP_CONFIG_GET_SCSI_INFO */
558 
559 /* jukebox attributes */
560 struct ndmp_config_get_scsi_info_reply_v3
561 {
562 	ndmp_error		error;
563 	ndmp_device_info_v3	scsi_info<>;
564 };
565 
566 
567 /*************************/
568 /* CONFIG INTERFACE (V4) */
569 /*************************/
570 
571 /* NDMP_CONFIG_GET_HOST_INFO - same as V3 */
572 
573 /* NDMP_CONFIG_GET_SERVER_INFO - same as V3 */
574 
575 /* NDMP_CONFIG_GET_CONNECTION_TYPE - same as V3 */
576 
577 /* NDMP_CONFIG_GET_AUTH_ATTR - same as V3 */
578 
579 
580 struct ndmp_config_get_butype_info_reply_v4
581 {
582 	ndmp_error            error;
583 	ndmp_butype_info      butype_info<>;
584 };
585 
586 
587 /* NDMP_CONFIG_GET_FS_INFO - same as V3 */
588 
589 struct ndmp_class_list
590 {
591 	u_short      ext_class_id;
592 	u_short      ext_version<>;
593 };
594 
595 struct ndmp_class_version
596 {
597 	u_short      ext_class_id;
598 	u_short      ext_version;
599 };
600 
601 struct ndmp_config_get_ext_list_reply
602 {
603 	ndmp_error         error;
604 	ndmp_class_list    class_list<>;
605 };
606 
607 struct ndmp_config_set_ext_list_request
608 {
609 	ndmp_class_version    ndmp_selected_ext<>;
610 };
611 
612 struct ndmp_config_set_ext_list_reply
613 {
614 	ndmp_error      error;
615 };
616 
617 
618 /***********************/
619 /* SCSI INTERFACE (V2) */
620 /***********************/
621 
622 /* NDMP_SCSI_OPEN */
623 struct ndmp_scsi_open_request
624 {
625 	ndmp_scsi_device	device;
626 };
627 
628 struct ndmp_scsi_open_reply
629 {
630 	ndmp_error	error;
631 };
632 
633 /* NDMP_SCSI_CLOSE */
634 /* no request arguments */
635 
636 struct ndmp_scsi_close_reply
637 {
638 	ndmp_error	error;
639 };
640 
641 /* NDMP_SCSI_GET_STATE */
642 /* no request arguments */
643 
644 struct ndmp_scsi_get_state_reply
645 {
646 	ndmp_error	error;
647 	short		target_controller;
648 	short		target_id;
649 	short		target_lun;
650 };
651 
652 /* NDMP_SCSI_SET_TARGET */
653 struct ndmp_scsi_set_target_request
654 {
655 	ndmp_scsi_device	device;
656 	u_short			target_controller;
657 	u_short			target_id;
658 	u_short			target_lun;
659 };
660 
661 struct ndmp_scsi_set_target_reply
662 {
663 	ndmp_error	error;
664 };
665 
666 /* NDMP_SCSI_RESET_DEVICE */
667 /* no request arguments */
668 
669 struct ndmp_scsi_reset_device_reply
670 {
671 	ndmp_error	error;
672 };
673 
674 /* NDMP_SCSI_RESET_BUS */
675 /* no request arguments */
676 
677 struct ndmp_scsi_reset_bus_reply
678 {
679 	ndmp_error	error;
680 };
681 
682 /* NDMP_SCSI_EXECUTE_CDB */
683 const NDMP_SCSI_DATA_IN		= 0x00000001;	/* Expect data from SCSI device */
684 const NDMP_SCSI_DATA_OUT	= 0x00000002;	/* Transfer data to SCSI device */
685 
686 struct ndmp_execute_cdb_request
687 {
688 	u_long	flags;
689 	u_long	timeout;
690 	u_long	datain_len;		/* Set for expected datain */
691 	opaque	cdb<>;
692 	opaque	dataout<>;
693 };
694 
695 struct ndmp_execute_cdb_reply
696 {
697 	ndmp_error	error;
698 	u_char		status;		/* SCSI status bytes */
699 	u_long		dataout_len;
700 	opaque		datain<>;	/* SCSI datain */
701 	opaque		ext_sense<>;	/* Extended sense data */
702 };
703 
704 
705 /***********************/
706 /* SCSI INTERFACE (V3) */
707 /***********************/
708 
709 /* NDMP_SCSI_OPEN */
710 struct ndmp_scsi_open_request_v3
711 {
712 	string	device<>;
713 };
714 /* reply the same as V2 */
715 
716 
717 /* NDMP_SCSI_CLOSE - same as V2 */
718 
719 /* NDMP_SCSI_GET_STATE - same as V2 */
720 
721 struct ndmp_scsi_set_target_request_v3
722 {
723 	string		device<>;
724 	u_short		target_controller;
725 	u_short		target_id;
726 	u_short		target_lun;
727 };
728 /* reply the same as V2 */
729 
730 
731 /* NDMP_SCSI_RESET_DEVICE - same as V2 */
732 
733 /* NDMP_SCSI_RESET_BUS - same as V2 */
734 
735 /* NDMP_SCSI_EXECUTE_CDB - same as V2 */
736 
737 
738 /***********************/
739 /* SCSI INTERFACE (V4) */
740 /***********************/
741 
742 /* NDMP_SCSI_OPEN - same as V3 */
743 
744 /* NDMP_SCSI_CLOSE - same as V3 */
745 
746 /* NDMP_SCSI_GET_STATE - same as V3 */
747 
748 /* NDMP_SCSI_RESET_DEVICE - same as V3 */
749 
750 /* NDMP_SCSI_EXECUTE_CDB - same as V3 */
751 
752 
753 /***********************/
754 /* TAPE INTERFACE (V2) */
755 /***********************/
756 
757 /* NDMP_TAPE_OPEN */
758 enum ndmp_tape_open_mode
759 {
760 	NDMP_TAPE_READ_MODE,
761 	NDMP_TAPE_WRITE_MODE,
762 	NDMP_TAPE_RAW_MODE,				/* NDMP V4 */
763 	NDMP_TAPE_RAW1_MODE = 0x7fffffff,		/* NDMP V3 */
764 	NDMP_TAPE_RAW2_MODE = NDMP_TAPE_RAW_MODE	/* NDMP V3 */
765 
766 };
767 
768 struct ndmp_tape_open_request
769 {
770 	ndmp_tape_device	device;
771 	ndmp_tape_open_mode	mode;
772 };
773 
774 struct ndmp_tape_open_reply
775 {
776 	ndmp_error	error;
777 };
778 
779 /* NDMP_TAPE_CLOSE */
780 /* no request arguments */
781 struct ndmp_tape_close_reply
782 {
783 	ndmp_error	error;
784 };
785 
786 /* NDMP_TAPE_GET_STATE */
787 /* no request arguments */
788 const NDMP_TAPE_NOREWIND	= 0x0008;	/* non-rewind device */
789 const NDMP_TAPE_WR_PROT		= 0x0010;	/* write-protected */
790 const NDMP_TAPE_ERROR		= 0x0020;	/* media error */
791 const NDMP_TAPE_UNLOAD		= 0x0040;	/* tape will be unloaded when the device is closed */
792 
793 struct ndmp_tape_get_state_reply
794 {
795 	ndmp_error	error;
796 	u_long		flags;
797 	u_long		file_num;
798 	u_long		soft_errors;
799 	u_long		block_size;
800 	u_long		blockno;
801 	ndmp_u_quad	total_space;
802 	ndmp_u_quad	space_remain;
803 };
804 
805 enum ndmp_tape_mtio_op
806 {
807 	NDMP_MTIO_FSF  = 0,
808 	NDMP_MTIO_BSF  = 1,
809 	NDMP_MTIO_FSR  = 2,
810 	NDMP_MTIO_BSR  = 3,
811 	NDMP_MTIO_REW  = 4,
812 	NDMP_MTIO_EOF  = 5,
813 	NDMP_MTIO_OFF  = 6,
814 	NDMP_MTIO_TUR  = 7 	/* NDMP V4 */
815 };
816 
817 
818 struct ndmp_tape_mtio_request
819 {
820 	ndmp_tape_mtio_op	tape_op;
821 	u_long			count;
822 };
823 
824 struct ndmp_tape_mtio_reply
825 {
826 	ndmp_error	error;
827 	u_long		resid_count;
828 };
829 
830 /* NDMP_TAPE_WRITE */
831 struct ndmp_tape_write_request
832 {
833 	opaque	data_out<>;
834 };
835 
836 struct ndmp_tape_write_reply
837 {
838 	ndmp_error	error;
839 	u_long		count;
840 };
841 
842 /* NDMP_TAPE_READ */
843 struct ndmp_tape_read_request
844 {
845 	u_long	count;
846 };
847 
848 struct ndmp_tape_read_reply
849 {
850 	ndmp_error	error;
851 	opaque		data_in<>;
852 };
853 
854 /* NDMP_TAPE_EXECUTE_CDB */
855 typedef ndmp_execute_cdb_request	ndmp_tape_execute_cdb_request;
856 typedef ndmp_execute_cdb_reply		ndmp_tape_execute_cdb_reply;
857 
858 
859 /***********************/
860 /* TAPE INTERFACE (V3) */
861 /***********************/
862 
863 /* NDMP_TAPE_OPEN */
864 struct ndmp_tape_open_request_v3
865 {
866 	string	device<>;
867 	ndmp_tape_open_mode	mode;
868 };
869 /* reply the same as V2 */
870 
871 
872 /* NDMP_TAPE_CLOSE - same as V2 */
873 
874 /* NDMP_TAPE_GET_STATE */
875 /* no request arguments */
876 const NDMP_TAPE_STATE_NOREWIND	= 0x0008;	/* non-rewind device */
877 const NDMP_TAPE_STATE_WR_PROT	= 0x0010;	/* write-protected */
878 const NDMP_TAPE_STATE_ERROR	= 0x0020;	/* media error */
879 const NDMP_TAPE_STATE_UNLOAD	= 0x0040;	/* tape will be unloaded when the device is closed */
880 
881 /* invalid bit */
882 const NDMP_TAPE_STATE_FILE_NUM_INVALID		= 0x00000001;
883 const NDMP_TAPE_STATE_SOFT_ERRORS_INVALID	= 0x00000002;
884 const NDMP_TAPE_STATE_BLOCK_SIZE_INVALID	= 0x00000004;
885 const NDMP_TAPE_STATE_BLOCKNO_INVALID		= 0x00000008;
886 const NDMP_TAPE_STATE_TOTAL_SPACE_INVALID	= 0x00000010;
887 const NDMP_TAPE_STATE_SPACE_REMAIN_INVALID	= 0x00000020;
888 const NDMP_TAPE_STATE_PARTITION_INVALID		= 0x00000040;
889 
890 struct ndmp_tape_get_state_reply_v3
891 {
892 	u_long		invalid;
893 	ndmp_error	error;
894 	u_long		flags;
895 	u_long		file_num;
896 	u_long		soft_errors;
897 	u_long		block_size;
898 	u_long		blockno;
899 	ndmp_u_quad	total_space;
900 	ndmp_u_quad	space_remain;
901 	u_long		partition;
902 };
903 
904 /* NDMP_TAPE_MTIO - same as V2 */
905 
906 /* NDMP_TAPE_WRITE - same as V2 */
907 
908 /* NDMP_TAPE_READ - same as V2 */
909 
910 /* NDMP_TAPE_EXECUTE_CDB - same as V2 */
911 
912 
913 /***********************/
914 /* TAPE INTERFACE (V4) */
915 /***********************/
916 
917 /* NDMP_TAPE_OPEN - same as V3 */
918 
919 /* NDMP_TAPE_CLOSE - same as V3 */
920 
921 struct ndmp_tape_get_state_reply_v4
922 {
923 	u_long       unsupported;
924 	ndmp_error   error;
925 	u_long       flags;
926 	u_long       file_num;
927 	u_long       soft_errors;
928 	u_long       block_size;
929 	u_long       blockno;
930 	ndmp_u_quad  total_space;
931 	ndmp_u_quad  space_remain;
932 };
933 
934 /* NDMP_TAPE_MTIO - same as V3 */
935 
936 /* NDMP_TAPE_WRITE - same as V3 */
937 
938 /* NDMP_TAPE_READ - same as V3 */
939 
940 /* NDMP_TAPE_EXECUTE_CDB - same as V3 */
941 
942 
943 /************************/
944 /* MOVER INTERFACE (V2) */
945 /************************/
946 enum ndmp_mover_mode
947 {
948 	NDMP_MOVER_MODE_READ            = 0,
949 	NDMP_MOVER_MODE_WRITE           = 1,
950 	NDMP_MOVER_MODE_NOACTION        = 2  	/* NDMP V4 */
951 };
952 
953 enum ndmp_mover_state
954 {
955 	NDMP_MOVER_STATE_IDLE    = 0,
956 	NDMP_MOVER_STATE_LISTEN  = 1,
957 	NDMP_MOVER_STATE_ACTIVE  = 2,
958 	NDMP_MOVER_STATE_PAUSED  = 3,
959 	NDMP_MOVER_STATE_HALTED  = 4
960 };
961 
962 enum ndmp_mover_pause_reason
963 {
964 	NDMP_MOVER_PAUSE_NA    = 0,
965 	NDMP_MOVER_PAUSE_EOM   = 1,
966 	NDMP_MOVER_PAUSE_EOF   = 2,
967 	NDMP_MOVER_PAUSE_SEEK  = 3,
968 	NDMP_MOVER_PAUSE_MEDIA_ERROR = 4, 	/* NDMP V2,3 */
969 	NDMP_MOVER_PAUSE_EOW  = 5
970 };
971 
972 enum ndmp_mover_halt_reason
973 {
974 	NDMP_MOVER_HALT_NA             = 0,
975 	NDMP_MOVER_HALT_CONNECT_CLOSED = 1,
976 	NDMP_MOVER_HALT_ABORTED        = 2,
977 	NDMP_MOVER_HALT_INTERNAL_ERROR = 3,
978 	NDMP_MOVER_HALT_CONNECT_ERROR  = 4,
979 	NDMP_MOVER_HALT_MEDIA_ERROR    = 5 	/* NDMP V4 */
980 };
981 
982 
983 /* NDMP_MOVER_GET_STATE */
984 
985 /* no request arguments */
986 struct ndmp_mover_get_state_reply
987 {
988 	ndmp_error		error;
989 	ndmp_mover_state	state;
990 	ndmp_mover_pause_reason	pause_reason;
991 	ndmp_mover_halt_reason	halt_reason;
992 	u_long			record_size;
993 	u_long			record_num;
994 	ndmp_u_quad		data_written;
995 	ndmp_u_quad		seek_position;
996 	ndmp_u_quad		bytes_left_to_read;
997 	ndmp_u_quad		window_offset;
998 	ndmp_u_quad		window_length;
999 };
1000 
1001 /* NDMP_MOVER_LISTEN */
1002 
1003 struct ndmp_tcp_addr
1004 {
1005 	u_long	ip_addr;
1006 	u_short	port;
1007 };
1008 
1009 union ndmp_mover_addr switch (ndmp_addr_type addr_type)
1010 {
1011 	case NDMP_ADDR_LOCAL:
1012 		void;
1013 	case NDMP_ADDR_TCP:
1014 	  ndmp_tcp_addr	addr;
1015 };
1016 
1017 struct ndmp_mover_listen_request
1018 {
1019 	ndmp_mover_mode		mode;
1020 	ndmp_addr_type		addr_type;
1021 };
1022 
1023 struct ndmp_mover_listen_reply
1024 {
1025 	ndmp_error		error;
1026 	ndmp_mover_addr		mover;
1027 };
1028 
1029 /* NDMP_MOVER_SET_RECORD_SIZE */
1030 struct ndmp_mover_set_record_size_request
1031 {
1032 	u_long	len;
1033 };
1034 
1035 struct ndmp_mover_set_record_size_reply
1036 {
1037 	ndmp_error	error;
1038 };
1039 
1040 /* NDMP_MOVER_SET_WINDOW */
1041 struct ndmp_mover_set_window_request
1042 {
1043 	ndmp_u_quad	offset;
1044 	ndmp_u_quad	length;
1045 };
1046 
1047 struct ndmp_mover_set_window_reply
1048 {
1049 	ndmp_error	error;
1050 };
1051 
1052 /* NDMP_MOVER_CONTINUE */
1053 /* no request arguments */
1054 
1055 struct ndmp_mover_continue_reply
1056 {
1057 	ndmp_error	error;
1058 };
1059 
1060 
1061 /* NDMP_MOVER_ABORT */
1062 /* no request arguments */
1063 struct ndmp_mover_abort_reply
1064 {
1065 	ndmp_error	error;
1066 };
1067 
1068 /* NDMP_MOVER_STOP */
1069 /* no request arguments */
1070 
1071 struct ndmp_mover_stop_reply
1072 {
1073 	ndmp_error	error;
1074 };
1075 
1076 /* NDMP_MOVER_READ */
1077 struct ndmp_mover_read_request
1078 {
1079 	ndmp_u_quad	offset;
1080 	ndmp_u_quad	length;
1081 };
1082 
1083 struct ndmp_mover_read_reply
1084 {
1085 	ndmp_error	error;
1086 };
1087 
1088 /* NDMP_MOVER_CLOSE */
1089 /* no request arguments */
1090 
1091 struct ndmp_mover_close_reply
1092 {
1093 	ndmp_error	error;
1094 };
1095 
1096 
1097 /************************/
1098 /* MOVER INTERFACE (V3) */
1099 /************************/
1100 
1101 /* NDMP_MOVER_STATE - same as V2 */
1102 
1103 /* NDMP_MOVER_PAUSE_REASON - same as V2 */
1104 
1105 /* NDMP_MOVER_HALT_REASON - same as V2 */
1106 
1107 /* NDMP_MOVER_MODE - same as V2 */
1108 
1109 struct ndmp_fc_addr_v3
1110 {
1111 	u_long	loop_id;
1112 };
1113 
1114 struct ndmp_ipc_addr_v3
1115 {
1116 	opaque comm_data<>;
1117 };
1118 
1119 union ndmp_addr_v3 switch (ndmp_addr_type addr_type)
1120 {
1121 	case NDMP_ADDR_LOCAL:
1122 		void;
1123 	case NDMP_ADDR_TCP:
1124 		ndmp_tcp_addr		tcp_addr;
1125 	case NDMP_ADDR_FC:
1126 		ndmp_fc_addr_v3		fc_addr;
1127 	case NDMP_ADDR_IPC:
1128 		ndmp_ipc_addr_v3	ipc_addr;
1129 
1130 };
1131 
1132 %
1133 %
1134 %/*
1135 % * Macros to access the port and IP address of TCP addresses.
1136 % */
1137 %#ifndef tcp_ip_v3
1138 %#define tcp_ip_v3	ndmp_addr_v3_u.tcp_addr.ip_addr
1139 %#endif /* tcp_ip_v3 */
1140 %#ifndef tcp_port_v3
1141 %#define tcp_port_v3	ndmp_addr_v3_u.tcp_addr.port
1142 %#endif /* tcp_port_v3 */
1143 
1144 /* NDMP_MOVER_GET_STATE */
1145 /* no request arguments */
1146 
1147 struct ndmp_mover_get_state_reply_v3
1148 {
1149 	ndmp_error		error;
1150 	ndmp_mover_state	state;
1151 	ndmp_mover_pause_reason	pause_reason;
1152 	ndmp_mover_halt_reason	halt_reason;
1153 	u_long			record_size;
1154 	u_long			record_num;
1155 	ndmp_u_quad		data_written;
1156 	ndmp_u_quad		seek_position;
1157 	ndmp_u_quad		bytes_left_to_read;
1158 	ndmp_u_quad		window_offset;
1159 	ndmp_u_quad		window_length;
1160 	ndmp_addr_v3		data_connection_addr;
1161 };
1162 
1163 /* NDMP_MOVER_LISTEN - same as v2 */
1164 
1165 struct ndmp_mover_listen_reply_v3
1166 {
1167 	ndmp_error	error;
1168 	ndmp_addr_v3	data_connection_addr;
1169 };
1170 
1171 /* NDMP_MOVER_CONNECT */
1172 struct ndmp_mover_connect_request_v3
1173 {
1174 	ndmp_mover_mode		mode;
1175 	ndmp_addr_v3		addr;
1176 };
1177 
1178 struct ndmp_mover_connect_reply_v3
1179 {
1180 	ndmp_error	error;
1181 };
1182 
1183 /* NDMP_MOVER_SET_RECORD_SIZE - same as V2 */
1184 
1185 /* NDMP_MOVER_SET_WINDOW - same as V2 */
1186 
1187 /* NDMP_MOVER_CONTINUE - same as V2 */
1188 
1189 /* NDMP_MOVER_ABORT - same as V2 */
1190 
1191 /* NDMP_MOVER_STOP - same as V2 */
1192 
1193 /* NDMP_MOVER_READ - same as V2 */
1194 
1195 /* NDMP_MOVER_CLOSE - same as V2 */
1196 
1197 
1198 /************************/
1199 /* MOVER INTERFACE (V4) */
1200 /************************/
1201 
1202 /* NDMP_MOVER_SET_RECORD_SIZE - same as V3 */
1203 
1204 /* NDMP_MOVER_SET_WINDOW_SIZE - same as V3 */
1205 
1206 %
1207 %
1208 %/*
1209 % * Macros to access the port and IP address of TCP addresses.
1210 % */
1211 %#ifndef tcp_addr_v4
1212 %#define tcp_addr_v4	ndmp_addr_v4_u.tcp_addr.tcp_addr_val
1213 %#endif /* tcp_addr_v4 */
1214 %#ifndef tcp_ip_v4
1215 %#define tcp_ip_v4(n)	ndmp_addr_v4_u.tcp_addr.tcp_addr_val[n].ip_addr
1216 %#endif /* tcp_ip_v4 */
1217 %#ifndef tcp_port_v4
1218 %#define tcp_port_v4(n)	ndmp_addr_v4_u.tcp_addr.tcp_addr_val[n].port
1219 %#endif /* tcp_port_v4 */
1220 %#ifndef tcp_len_v4
1221 %#define tcp_len_v4	ndmp_addr_v4_u.tcp_addr.tcp_addr_len
1222 %#endif /* tcp_len_v4 */
1223 %#ifndef tcp_env_v4
1224 %#define tcp_env_v4(n)	ndmp_addr_v4_u.tcp_addr.tcp_addr_val[n].addr_env
1225 %#endif /* tcp_env_v4 */
1226 
1227 struct ndmp_tcp_addr_v4
1228 {
1229 	u_long       ip_addr;
1230 	u_short      port;
1231 	ndmp_pval    addr_env<>;
1232 };
1233 
1234 union ndmp_addr_v4
1235 switch (ndmp_addr_type addr_type)
1236 {
1237 	case NDMP_ADDR_LOCAL:
1238 		void;
1239 	case NDMP_ADDR_TCP:
1240 		ndmp_tcp_addr_v4  tcp_addr<>;
1241 	case NDMP_ADDR_IPC:
1242 		ndmp_ipc_addr_v3  ipc_addr;
1243 };
1244 
1245 struct ndmp_mover_connect_request_v4
1246 {
1247 	ndmp_mover_mode       mode;
1248 	ndmp_addr_v4          addr;
1249 };
1250 
1251 struct ndmp_mover_listen_reply_v4
1252 {
1253 	ndmp_error           error;
1254 	ndmp_addr_v4         connect_addr;
1255 };
1256 
1257 /* NDMP_MOVER_READ - same as v3 */
1258 
1259 struct ndmp_mover_get_state_reply_v4
1260 {
1261 	ndmp_error               error;
1262 	ndmp_mover_mode          mode;
1263 	ndmp_mover_state         state;
1264 	ndmp_mover_pause_reason  pause_reason;
1265 	ndmp_mover_halt_reason   halt_reason;
1266 	u_long                   record_size;
1267 	u_long                   record_num;
1268 	ndmp_u_quad              bytes_moved;
1269 	ndmp_u_quad              seek_position;
1270 	ndmp_u_quad              bytes_left_to_read;
1271 	ndmp_u_quad              window_offset;
1272 	ndmp_u_quad              window_length;
1273 	ndmp_addr_v4             data_connection_addr;
1274 };
1275 
1276 /* NDMP_MOVER_CONTINUE - same as V3 */
1277 
1278 /* NDMP_MOVER_CLOSE - same as V3 */
1279 
1280 /* NDMP_MOVER_ABORT - same as V3 */
1281 
1282 /* NDMP_MOVER_STOP - same as V3 */
1283 
1284 
1285 /***********************/
1286 /* DATA INTERFACE (V2) */
1287 /***********************/
1288 
1289 /* NDMP_DATA_GET_STATE */
1290 /* no request arguments */
1291 
1292 enum ndmp_data_operation
1293 {
1294 	NDMP_DATA_OP_NOACTION           = 0,
1295 	NDMP_DATA_OP_BACKUP             = 1,
1296 	NDMP_DATA_OP_RECOVER            = 2,
1297 	NDMP_DATA_OP_RECOVER_FILEHIST   = 3  	/* NDMP V4 */
1298 };
1299 
1300 enum ndmp_data_state
1301 {
1302 	NDMP_DATA_STATE_IDLE      = 0,
1303 	NDMP_DATA_STATE_ACTIVE    = 1,
1304 	NDMP_DATA_STATE_HALTED    = 2,
1305 	NDMP_DATA_STATE_LISTEN    = 3, 		/* NDMP V3 */
1306 	NDMP_DATA_STATE_CONNECTED = 4 		/* NDMP V3 */
1307 };
1308 
1309 enum ndmp_data_halt_reason
1310 {
1311 	NDMP_DATA_HALT_NA             = 0,
1312 	NDMP_DATA_HALT_SUCCESSFUL     = 1,
1313 	NDMP_DATA_HALT_ABORTED        = 2,
1314 	NDMP_DATA_HALT_INTERNAL_ERROR = 3,
1315 	NDMP_DATA_HALT_CONNECT_ERROR  = 4
1316 };
1317 
1318 struct ndmp_data_get_state_reply
1319 {
1320 	ndmp_error		error;
1321 	ndmp_data_operation	operation;
1322 	ndmp_data_state		state;
1323 	ndmp_data_halt_reason	halt_reason;
1324 	ndmp_u_quad		bytes_processed;
1325 	ndmp_u_quad		est_bytes_remain;
1326 	u_long			est_time_remain;
1327 	ndmp_mover_addr		mover;
1328 	ndmp_u_quad		read_offset;
1329 	ndmp_u_quad		read_length;
1330 };
1331 
1332 /* NDMP_DATA_START_BACKUP */
1333 
1334 struct ndmp_data_start_backup_request
1335 {
1336 	ndmp_mover_addr		mover;		/* mover to receive data */
1337 	string			bu_type<>;	/* backup method to use */
1338 	ndmp_pval		env<>;		/* Parameters that may modify backup */
1339 };
1340 
1341 struct ndmp_data_start_backup_reply
1342 {
1343 	ndmp_error	error;
1344 };
1345 
1346 /* NDMP_DATA_START_RECOVER */
1347 struct ndmp_name
1348 {
1349 	string		name<>;
1350 	string		dest<>;
1351 	u_short		ssid;
1352 	ndmp_u_quad	fh_info;
1353 };
1354 
1355 struct ndmp_data_start_recover_request
1356 {
1357 	ndmp_mover_addr		mover;
1358 	ndmp_pval		env<>;
1359 	ndmp_name		nlist<>;
1360 	string			bu_type<>;
1361 
1362 };
1363 
1364 struct ndmp_data_start_recover_reply
1365 {
1366 	ndmp_error	error;
1367 };
1368 
1369 /* NDMP_DATA_ABORT */
1370 /* no request arguments */
1371 
1372 struct ndmp_data_abort_reply
1373 {
1374 	ndmp_error	error;
1375 };
1376 
1377 /* NDMP_DATA_STOP */
1378 /* no request arguments */
1379 
1380 struct ndmp_data_stop_reply
1381 {
1382 	ndmp_error	error;
1383 };
1384 
1385 /* NDMP_DATA_GET_ENV */
1386 /* no request arguments */
1387 
1388 struct ndmp_data_get_env_reply
1389 {
1390 	ndmp_error	error;
1391 	ndmp_pval	env<>;
1392 };
1393 /* no reply arguments */
1394 
1395 struct ndmp_notify_data_halted_request
1396 {
1397 	ndmp_data_halt_reason		reason;
1398 	string				text_reason<>;
1399 };
1400 /* no reply arguments */
1401 
1402 
1403 /***********************/
1404 /* DATA INTERFACE (V3) */
1405 /***********************/
1406 
1407 /* NDMP_DATA_GET_STATE */
1408 /* no request arguments */
1409 /* ndmp_data_operation the same as V2 */
1410 
1411 /* invalid bit */
1412 const NDMP_DATA_STATE_EST_BYTES_REMAIN_INVALID	= 0x00000001;
1413 const NDMP_DATA_STATE_EST_TIME_REMAIN_INVALID	= 0x00000002;
1414 
1415 struct ndmp_data_get_state_reply_v3
1416 {
1417 	u_long			invalid;
1418 	ndmp_error		error;
1419 	ndmp_data_operation	operation;
1420 	ndmp_data_state		state;
1421 	ndmp_data_halt_reason	halt_reason;
1422 	ndmp_u_quad		bytes_processed;
1423 	ndmp_u_quad		est_bytes_remain;
1424 	u_long			est_time_remain;
1425 	ndmp_addr_v3		data_connection_addr;
1426 	ndmp_u_quad		read_offset;
1427 	ndmp_u_quad		read_length;
1428 };
1429 
1430 /* NDMP_DATA_START_BACKUP */
1431 struct ndmp_data_start_backup_request_v3
1432 {
1433 	string		bu_type<>;	/* backup method to use */
1434 	ndmp_pval	env<>;		/* Parameters that may modify backup */
1435 };
1436 
1437 /* NDMP_DATA_START_RECOVER */
1438 struct ndmp_name_v3
1439 {
1440 	string		original_path<>;
1441 	string		destination_dir<>;
1442 	string		new_name<>;	/* Direct access restore only */
1443 	string		other_name<>;	/* Direct access restore only */
1444 	ndmp_u_quad	node;		/* Direct access restore only */
1445 	ndmp_u_quad	fh_info;	/* Direct access restore only */
1446 };
1447 
1448 struct ndmp_data_start_recover_request_v3
1449 {
1450 	ndmp_pval	env<>;
1451 	ndmp_name_v3	nlist<>;
1452 	string		bu_type<>;
1453 };
1454 
1455 /* NDMP_DATA_ABORT - same as V2 */
1456 
1457 /* NDMP_DATA_STOP - same as V2 */
1458 
1459 /* NDMP_DATA_GET_ENV - same as V2 */
1460 
1461 /* NDMP_DATA_LISTEN */
1462 struct ndmp_data_listen_request_v3
1463 {
1464 	ndmp_addr_type	addr_type;
1465 };
1466 
1467 struct ndmp_data_listen_reply_v3
1468 {
1469 	ndmp_error	error;
1470 	ndmp_addr_v3	data_connection_addr;
1471 };
1472 
1473 /* NDMP_DATA_CONNECT */
1474 struct ndmp_data_connect_request_v3
1475 {
1476 	ndmp_addr_v3	addr;
1477 };
1478 
1479 struct ndmp_data_connect_reply_v3
1480 {
1481 	ndmp_error	error;
1482 };
1483 
1484 
1485 /***********************/
1486 /* DATA INTERFACE (V4) */
1487 /***********************/
1488 
1489 struct ndmp_data_get_state_reply_v4
1490 {
1491 	u_long                    unsupported;
1492 	ndmp_error                error;
1493 	ndmp_data_operation       operation;
1494 	ndmp_data_state           state;
1495 	ndmp_data_halt_reason     halt_reason;
1496 	ndmp_u_quad               bytes_processed;
1497 	ndmp_u_quad               est_bytes_remain;
1498 	u_long                    est_time_remain;
1499 	ndmp_addr_v4              data_connection_addr;
1500 	ndmp_u_quad               read_offset;
1501 	ndmp_u_quad               read_length;
1502 };
1503 
1504 struct ndmp_data_listen_reply_v4
1505 {
1506 	ndmp_error   error;
1507 	ndmp_addr_v4    connect_addr;
1508 };
1509 
1510 struct ndmp_data_connect_request_v4
1511 {
1512 	ndmp_addr_v4   addr;
1513 };
1514 
1515 
1516 /* NDMP_DATA_START_BACKUP - same as V3 */
1517 
1518 /* NDMP_DATA_START_RECOVER - same as V3 */
1519 
1520 /* NDMP_DATA_ABORT - same as V3 */
1521 
1522 /* NDMP_DATA_STOP - same as V3 */
1523 
1524 /* NDMP_DATA_GET_ENV - same as V3 */
1525 
1526 
1527 /*************************/
1528 /* NOTIFY INTERFACE (V2) */
1529 /*************************/
1530 
1531 /* NDMP_NOTIFY_CONNECTED */
1532 enum ndmp_connect_reason
1533 {
1534 	NDMP_CONNECTED,		/* Connect successfully */
1535 	NDMP_SHUTDOWN,		/* Connection shutdown */
1536 	NDMP_REFUSED		/* reach the maximum number of connections */
1537 };
1538 
1539 struct ndmp_notify_connected_request
1540 {
1541 	ndmp_connect_reason	reason;
1542 	u_short			protocol_version;
1543 	string			text_reason<>;
1544 };
1545 
1546 /* NDMP_NOTIFY_MOVER_PAUSED */
1547 struct ndmp_notify_mover_paused_request
1548 {
1549 	ndmp_mover_pause_reason	reason;
1550 	ndmp_u_quad		seek_position;
1551 };
1552 /* no reply arguments */
1553 
1554 /* NDMP_NOTIFY_MOVER_HALTED */
1555 struct ndmp_notify_mover_halted_request
1556 {
1557 	ndmp_mover_halt_reason	reason;
1558 	string			text_reason<>;
1559 };
1560 /* no reply arguments */
1561 
1562 /* NDMP_NOTIFY_DATA_READ */
1563 struct ndmp_notify_data_read_request
1564 {
1565 	ndmp_u_quad	offset;
1566 	ndmp_u_quad	length;
1567 };
1568 /* no reply arguments */
1569 
1570 
1571 /*************************/
1572 /* NOTIFY INTERFACE (V3) */
1573 /*************************/
1574 
1575 /* NDMP_NOTIFY_DATA_HALTED - same as V2 */
1576 
1577 /* NDMP_NOTIFY_CONNECTED - same as V2 */
1578 
1579 /* NDMP_NOTIFY_MOVER_PAUSED - same as V2 */
1580 
1581 /* NDMP_NOTIFY_MOVER_HALTED - same as V2 */
1582 
1583 /* NDMP_NOTIFY_DATA_READ - same as V2 */
1584 
1585 
1586 /*************************/
1587 /* NOTIFY INTERFACE (V4) */
1588 /*************************/
1589 
1590 struct ndmp_notify_data_halted_request_v4
1591 {
1592 	ndmp_data_halt_reason   reason;
1593 };
1594 
1595 /* NDMP_NOTIFY_CONNECTION_STATUS - same as V3 */
1596 
1597 struct ndmp_notify_mover_halted_request_v4
1598 {
1599 	ndmp_mover_halt_reason      reason;
1600 };
1601 
1602 /* NDMP_NOTIFY_MOVER_PAUSED - same as V3 */
1603 
1604 /* NDMP_NOTIFY_DATA_READ - same as V3 */
1605 
1606 
1607 /**********************/
1608 /* LOG INTERFACE (V2) */
1609 /**********************/
1610 
1611 /* NDMP_LOG_LOG */
1612 struct ndmp_log_log_request
1613 {
1614 	string	entry<>;
1615 };
1616 /* no reply arguments */
1617 
1618 /* NDMP_LOG_DEBUG */
1619 enum ndmp_debug_level
1620 {
1621 	NDMP_DBG_USER_INFO,
1622 	NDMP_DBG_USER_SUMMARY,
1623 	NDMP_DBG_USER_DETAIL,
1624 	NDMP_DBG_DIAG_INFO,
1625 	NDMP_DBG_DIAG_SUMMARY,
1626 	NDMP_DBG_DIAG_DETAIL,
1627 	NDMP_DBG_PROG_INFO,
1628 	NDMP_DBG_PROG_SUMMARY,
1629 	NDMP_DBG_PROG_DETAIL
1630 };
1631 
1632 struct ndmp_log_debug_request
1633 {
1634 	ndmp_debug_level	level;
1635 	string			message<>;
1636 };
1637 /* no reply arguments */
1638 
1639 /* NDMP_LOG_FILE */
1640 struct ndmp_log_file_request
1641 {
1642 	string		name<>;
1643 	u_short		ssid;
1644 	ndmp_error	error;
1645 };
1646 /* no reply arguments */
1647 
1648 
1649 /**********************/
1650 /* LOG INTERFACE (V3) */
1651 /**********************/
1652 
1653 /* NDMP_LOG_MESSAGE */
1654 enum ndmp_log_type
1655 {
1656 	NDMP_LOG_NORMAL  = 0,
1657 	NDMP_LOG_DEBUG   = 1,
1658 	NDMP_LOG_ERROR   = 2,
1659 	NDMP_LOG_WARNING = 3
1660 };
1661 
1662 struct ndmp_log_message_request_v3
1663 {
1664 	ndmp_log_type		log_type;
1665 	u_long			message_id;
1666 	string			entry<>;
1667 };
1668 /* no reply arguments */
1669 
1670 /* NDMP_LOG_FILE */
1671 struct ndmp_log_file_request_v3
1672 {
1673 	string		name<>;
1674 	ndmp_error	error;
1675 };
1676 /* no reply arguments */
1677 
1678 
1679 /**********************/
1680 /* LOG INTERFACE (V4) */
1681 /**********************/
1682 
1683 enum ndmp_has_associated_message
1684 {
1685 	NDMP_NO_ASSOCIATED_MESSAGE     = 0,
1686 	NDMP_HAS_ASSOCIATED_MESSAGE    = 1
1687 };
1688 
1689 enum ndmp_recovery_status
1690 {
1691 	NDMP_RECOVERY_SUCCESSFUL                 = 0,
1692 	NDMP_RECOVERY_FAILED_PERMISSION          = 1,
1693 	NDMP_RECOVERY_FAILED_NOT_FOUND           = 2,
1694 	NDMP_RECOVERY_FAILED_NO_DIRECTORY        = 3,
1695 	NDMP_RECOVERY_FAILED_OUT_OF_MEMORY       = 4,
1696 	NDMP_RECOVERY_FAILED_IO_ERROR            = 5,
1697 	NDMP_RECOVERY_FAILED_UNDEFINED_ERROR     = 6,
1698 	NDMP_RECOVERY_FAILED_FILE_PATH_EXISTS    = 7
1699 };
1700 
1701 struct ndmp_log_message_request_v4
1702 {
1703 	ndmp_log_type      log_type;
1704 	u_long             message_id;
1705 	string             entry<>;
1706 	ndmp_has_associated_message associated_message_valid;
1707 	u_long             associated_message_sequence;
1708 };
1709 
1710 struct ndmp_log_file_request_v4
1711 {
1712 	string                   name<>;
1713 	ndmp_recovery_status     recovery_status;
1714 };
1715 
1716 
1717 
1718 /*******************************/
1719 /* FILE HISTORY INTERFACE (V2) */
1720 /*******************************/
1721 
1722 /* NDMP_FH_ADD_UNIX_PATH */
1723 typedef string ndmp_unix_path<>;
1724 enum ndmp_file_type
1725 {
1726 	NDMP_FILE_DIR      = 0,
1727 	NDMP_FILE_FIFO     = 1,
1728 	NDMP_FILE_CSPEC    = 2,
1729 	NDMP_FILE_BSPEC    = 3,
1730 	NDMP_FILE_REG      = 4,
1731 	NDMP_FILE_SLINK    = 5,
1732 	NDMP_FILE_SOCK     = 6,
1733 	NDMP_FILE_REGISTRY = 7,
1734 	NDMP_FILE_OTHER    = 8
1735 };
1736 
1737 struct ndmp_unix_file_stat
1738 {
1739 	ndmp_file_type	ftype;
1740 	u_long			mtime;
1741 	u_long			atime;
1742 	u_long			ctime;
1743 	u_long			uid;
1744 	u_long			gid;
1745 	u_long			mode;
1746 	ndmp_u_quad		size;
1747 	ndmp_u_quad		fh_info;
1748 };
1749 
1750 struct ndmp_fh_unix_path
1751 {
1752 	ndmp_unix_path		name;
1753 	ndmp_unix_file_stat	fstat;
1754 };
1755 
1756 struct ndmp_fh_add_unix_path_request
1757 {
1758 	ndmp_fh_unix_path	paths<>;
1759 };
1760 /* no reply arguments */
1761 
1762 /* NDMP_FH_ADD_UNIX_DIR */
1763 struct ndmp_fh_unix_dir
1764 {
1765 	ndmp_unix_path		name;
1766 	u_long			node;
1767 	u_long			parent;
1768 };
1769 
1770 struct ndmp_fh_add_unix_dir_request
1771 {
1772 	ndmp_fh_unix_dir	dirs<>;
1773 };
1774 /* no reply arguments */
1775 
1776 /* NDMP_FH_ADD_UNIX_NODE */
1777 struct ndmp_fh_unix_node
1778 {
1779 	ndmp_unix_file_stat	fstat;
1780 	u_long			node;
1781 };
1782 
1783 struct ndmp_fh_add_unix_node_request
1784 {
1785 	ndmp_fh_unix_node	nodes<>;
1786 };
1787 /* no reply arguments */
1788 
1789 
1790 /********************************/
1791 /* FILE HISTORY INTERFACE (V3) */
1792 /********************************/
1793 
1794 /* NDMP_FH_ADD_FILE */
1795 enum ndmp_fs_type
1796 {
1797 	NDMP_FS_UNIX   = 0,
1798 	NDMP_FS_NT     = 1,
1799 	NDMP_FS_OTHER  = 2
1800 };
1801 
1802 
1803 typedef string ndmp_path_v3<>;
1804 struct ndmp_nt_path_v3
1805 {
1806 	ndmp_path_v3	nt_path;
1807 	ndmp_path_v3	dos_path;
1808 };
1809 
1810 union ndmp_file_name_v3 switch (ndmp_fs_type fs_type)
1811 {
1812 	case NDMP_FS_UNIX:
1813 		ndmp_path_v3		unix_name;
1814 	case NDMP_FS_NT:
1815 		ndmp_nt_path_v3	nt_name;
1816 	default:
1817 		ndmp_path_v3		other_name;
1818 };
1819 
1820 /* invalid bit */
1821 const NDMP_FILE_STAT_ATIME_INVALID	= 0x00000001;
1822 const NDMP_FILE_STAT_CTIME_INVALID	= 0x00000002;
1823 const NDMP_FILE_STAT_GROUP_INVALID	= 0x00000004;
1824 
1825 struct ndmp_file_stat_v3
1826 {
1827 	u_long			invalid;
1828 	ndmp_fs_type		fs_type;
1829 	ndmp_file_type		ftype;
1830 	u_long			mtime;
1831 	u_long			atime;
1832 	u_long			ctime;
1833 	u_long			owner; /* uid for UNIX, owner for NT */
1834 	u_long			group; /* gid for UNIX, NA for NT */
1835 	u_long			fattr; /* mode for UNIX, fattr for NT */
1836 	ndmp_u_quad		size;
1837 	u_long			links;
1838 };
1839 
1840 
1841 /* one file could have both UNIX and NT name and attributes */
1842 struct ndmp_file_v3
1843 {
1844 	ndmp_file_name_v3	names<>;
1845 	ndmp_file_stat_v3	stats<>;
1846 	ndmp_u_quad		node;		/* used for the direct access */
1847 	ndmp_u_quad		fh_info;	/* used for the direct access */
1848 };
1849 
1850 struct ndmp_fh_add_file_request_v3
1851 {
1852 	ndmp_file_v3		files<>;
1853 };
1854 /* no reply arguments */
1855 
1856 /* NDMP_FH_ADD_DIR */
1857 
1858 struct ndmp_dir_v3
1859 {
1860 	ndmp_file_name_v3	names<>;
1861 	ndmp_u_quad		node;
1862 	ndmp_u_quad		parent;
1863 };
1864 
1865 struct ndmp_fh_add_dir_request_v3
1866 {
1867 	ndmp_dir_v3	dirs<>;
1868 };
1869 /* no reply arguments */
1870 
1871 /* NDMP_FH_ADD_NODE */
1872 
1873 struct ndmp_node_v3
1874 {
1875 	ndmp_file_stat_v3	stats<>;
1876 	ndmp_u_quad		node;
1877 	ndmp_u_quad		fh_info;
1878 };
1879 
1880 struct ndmp_fh_add_node_request_v3
1881 {
1882 	ndmp_node_v3	nodes<>;
1883 };
1884 /* no reply arguments */
1885 
1886 
1887 /********************************/
1888 /* FILE HISTORY INTERFACE (V4) */
1889 /********************************/
1890 
1891 /* NDMP_FH_ADD_FILE - same as V3 */
1892 
1893 /* NDMP_FH_ADD_DIR - same as V3 */
1894 
1895 /* NDMP_FH_ADD_NODE - same as V3 */
1896 
1897 
1898 
1899 /********************************/
1900 /* NDMP requests		*/
1901 /********************************/
1902 /* CONNECT */
1903 typedef ndmp_auth_text ndmp_auth_text_v2;
1904 typedef ndmp_auth_text_v3 ndmp_auth_text_v4;
1905 typedef ndmp_auth_md5 ndmp_auth_md5_v2;
1906 typedef ndmp_auth_md5_v3 ndmp_auth_md5_v4;
1907 typedef ndmp_auth_data ndmp_auth_data_v2;
1908 typedef ndmp_auth_data_v3 ndmp_auth_data_v4;
1909 
1910 typedef ndmp_connect_open_request ndmp_connect_open_request_v2;
1911 typedef ndmp_connect_open_request ndmp_connect_open_request_v3;
1912 typedef ndmp_connect_open_request ndmp_connect_open_request_v4;
1913 typedef ndmp_connect_open_reply ndmp_connect_open_reply_v2;
1914 typedef ndmp_connect_open_reply ndmp_connect_open_reply_v3;
1915 typedef ndmp_connect_open_reply ndmp_connect_open_reply_v4;
1916 typedef ndmp_connect_client_auth_request ndmp_connect_client_auth_request_v2;
1917 typedef ndmp_connect_client_auth_request_v3 ndmp_connect_client_auth_request_v4;
1918 typedef ndmp_connect_client_auth_reply ndmp_connect_client_auth_reply_v2;
1919 typedef ndmp_connect_client_auth_reply_v3 ndmp_connect_client_auth_reply_v4;
1920 typedef ndmp_connect_server_auth_request ndmp_connect_server_auth_request_v2;
1921 typedef ndmp_connect_server_auth_request ndmp_connect_server_auth_request_v3;
1922 typedef ndmp_connect_server_auth_request ndmp_connect_server_auth_request_v4;
1923 typedef ndmp_connect_server_auth_reply ndmp_connect_server_auth_reply_v2;
1924 typedef ndmp_connect_server_auth_reply ndmp_connect_server_auth_reply_v3;
1925 typedef ndmp_connect_server_auth_reply ndmp_connect_server_auth_reply_v4;
1926 
1927 
1928 /* CONFIG */
1929 typedef ndmp_config_get_host_info_reply ndmp_config_get_host_info_reply_v2;
1930 typedef ndmp_config_get_host_info_reply_v3 ndmp_config_get_host_info_reply_v4;
1931 typedef ndmp_config_get_butype_attr_request ndmp_config_get_butype_attr_request_v2;
1932 typedef ndmp_config_get_butype_attr_reply ndmp_config_get_butype_attr_reply_v2;
1933 typedef ndmp_config_get_mover_type_reply ndmp_config_get_mover_type_reply_v2;
1934 typedef ndmp_config_get_auth_attr_request ndmp_config_get_auth_attr_request_v2;
1935 typedef ndmp_config_get_auth_attr_request ndmp_config_get_auth_attr_request_v3;
1936 typedef ndmp_config_get_auth_attr_request ndmp_config_get_auth_attr_request_v4;
1937 typedef ndmp_config_get_auth_attr_reply ndmp_config_get_auth_attr_reply_v2;
1938 typedef ndmp_config_get_auth_attr_reply ndmp_config_get_auth_attr_reply_v3;
1939 typedef ndmp_config_get_auth_attr_reply ndmp_config_get_auth_attr_reply_v4;
1940 typedef ndmp_config_get_connection_type_reply_v3 ndmp_config_get_connection_type_reply_v4;
1941 typedef ndmp_config_get_server_info_reply_v3 ndmp_config_get_server_info_reply_v4;
1942 typedef ndmp_fs_info_v3 ndmp_fs_info_v4;
1943 typedef ndmp_config_get_fs_info_reply_v3 ndmp_config_get_fs_info_reply_v4;
1944 typedef ndmp_device_info_v3 ndmp_device_info_v4;
1945 typedef ndmp_config_get_tape_info_reply_v3  ndmp_config_get_tape_info_reply_v4;
1946 typedef ndmp_config_get_scsi_info_reply_v3 ndmp_config_get_scsi_info_reply_v4;
1947 typedef ndmp_config_get_ext_list_reply ndmp_config_get_ext_list_reply_v4;
1948 typedef ndmp_config_set_ext_list_request ndmp_config_set_ext_list_request_v4;
1949 typedef ndmp_config_set_ext_list_reply ndmp_config_set_ext_list_reply_v4;
1950 
1951 
1952 /* SCSI */
1953 typedef ndmp_scsi_open_request ndmp_scsi_open_request_v2;
1954 typedef ndmp_scsi_open_request_v3 ndmp_scsi_open_request_v4;
1955 typedef ndmp_scsi_open_reply ndmp_scsi_open_reply_v2;
1956 typedef ndmp_scsi_open_reply ndmp_scsi_open_reply_v3;
1957 typedef ndmp_scsi_open_reply ndmp_scsi_open_reply_v4;
1958 typedef ndmp_scsi_close_reply ndmp_scsi_close_reply_v2;
1959 typedef ndmp_scsi_close_reply ndmp_scsi_close_reply_v3;
1960 typedef ndmp_scsi_close_reply ndmp_scsi_close_reply_v4;
1961 typedef ndmp_scsi_get_state_reply ndmp_scsi_get_state_reply_v2;
1962 typedef ndmp_scsi_get_state_reply ndmp_scsi_get_state_reply_v3;
1963 typedef ndmp_scsi_get_state_reply ndmp_scsi_get_state_reply_v4;
1964 typedef ndmp_scsi_set_target_request ndmp_scsi_set_target_request_v2;
1965 typedef ndmp_scsi_set_target_reply ndmp_scsi_set_target_reply_v2;
1966 typedef ndmp_scsi_set_target_reply ndmp_scsi_set_target_reply_v3;
1967 typedef ndmp_scsi_reset_device_reply ndmp_scsi_reset_device_reply_v2;
1968 typedef ndmp_scsi_reset_device_reply ndmp_scsi_reset_device_reply_v3;
1969 typedef ndmp_scsi_reset_device_reply ndmp_scsi_reset_device_reply_v4;
1970 typedef ndmp_scsi_reset_bus_reply ndmp_scsi_reset_bus_reply_v2;
1971 typedef ndmp_scsi_reset_bus_reply ndmp_scsi_reset_bus_reply_v3;
1972 typedef ndmp_execute_cdb_request ndmp_scsi_execute_cdb_request_v2;
1973 typedef ndmp_execute_cdb_request ndmp_scsi_execute_cdb_request_v3;
1974 typedef ndmp_execute_cdb_request ndmp_scsi_execute_cdb_request_v4;
1975 typedef ndmp_execute_cdb_reply ndmp_scsi_execute_cdb_reply_v2;
1976 typedef ndmp_execute_cdb_reply ndmp_scsi_execute_cdb_reply_v3;
1977 typedef ndmp_execute_cdb_reply ndmp_scsi_execute_cdb_reply_v4;
1978 
1979 
1980 /* TAPE */
1981 typedef ndmp_tape_open_request ndmp_tape_open_request_v2;
1982 typedef ndmp_tape_open_request_v3 ndmp_tape_open_request_v4;
1983 typedef ndmp_tape_open_reply ndmp_tape_open_reply_v2;
1984 typedef ndmp_tape_open_reply ndmp_tape_open_reply_v3;
1985 typedef ndmp_tape_open_reply ndmp_tape_open_reply_v4;
1986 typedef ndmp_tape_close_reply ndmp_tape_close_reply_v2;
1987 typedef ndmp_tape_close_reply ndmp_tape_close_reply_v3;
1988 typedef ndmp_tape_close_reply ndmp_tape_close_reply_v4;
1989 typedef ndmp_tape_get_state_reply ndmp_tape_get_state_reply_v2;
1990 typedef ndmp_tape_mtio_request ndmp_tape_mtio_request_v2;
1991 typedef ndmp_tape_mtio_request ndmp_tape_mtio_request_v3;
1992 typedef ndmp_tape_mtio_request ndmp_tape_mtio_request_v4;
1993 typedef ndmp_tape_mtio_reply ndmp_tape_mtio_reply_v2;
1994 typedef ndmp_tape_mtio_reply ndmp_tape_mtio_reply_v3;
1995 typedef ndmp_tape_mtio_reply ndmp_tape_mtio_reply_v4;
1996 typedef ndmp_tape_write_request ndmp_tape_write_request_v2;
1997 typedef ndmp_tape_write_request ndmp_tape_write_request_v3;
1998 typedef ndmp_tape_write_request ndmp_tape_write_request_v4;
1999 typedef ndmp_tape_write_reply ndmp_tape_write_reply_v2;
2000 typedef ndmp_tape_write_reply ndmp_tape_write_reply_v3;
2001 typedef ndmp_tape_write_reply ndmp_tape_write_reply_v4;
2002 typedef ndmp_tape_read_request ndmp_tape_read_request_v2;
2003 typedef ndmp_tape_read_request ndmp_tape_read_request_v3;
2004 typedef ndmp_tape_read_request ndmp_tape_read_request_v4;
2005 typedef ndmp_tape_read_reply ndmp_tape_read_reply_v2;
2006 typedef ndmp_tape_read_reply ndmp_tape_read_reply_v3;
2007 typedef ndmp_tape_read_reply ndmp_tape_read_reply_v4;
2008 typedef ndmp_tape_execute_cdb_request ndmp_tape_execute_cdb_request_v2;
2009 typedef ndmp_tape_execute_cdb_request ndmp_tape_execute_cdb_request_v3;
2010 typedef ndmp_tape_execute_cdb_request ndmp_tape_execute_cdb_request_v4;
2011 typedef ndmp_tape_execute_cdb_reply ndmp_tape_execute_cdb_reply_v2;
2012 typedef ndmp_tape_execute_cdb_reply ndmp_tape_execute_cdb_reply_v3;
2013 typedef ndmp_tape_execute_cdb_reply ndmp_tape_execute_cdb_reply_v4;
2014 
2015 
2016 /* MOVER */
2017 typedef ndmp_fc_addr_v3 ndmp_fc_addr;
2018 typedef ndmp_ipc_addr_v3 ndmp_ipc_addr;
2019 typedef ndmp_mover_get_state_reply ndmp_mover_get_state_reply_v2;
2020 typedef ndmp_mover_listen_request ndmp_mover_listen_request_v2;
2021 typedef ndmp_mover_listen_request ndmp_mover_listen_request_v3;
2022 typedef ndmp_mover_listen_request ndmp_mover_listen_request_v4;
2023 typedef ndmp_mover_listen_reply ndmp_mover_listen_reply_v2;
2024 typedef ndmp_mover_set_record_size_request ndmp_mover_set_record_size_request_v2;
2025 typedef ndmp_mover_set_record_size_request ndmp_mover_set_record_size_request_v3;
2026 typedef ndmp_mover_set_record_size_request ndmp_mover_set_record_size_request_v4;
2027 typedef ndmp_mover_set_record_size_reply ndmp_mover_set_record_size_reply_v2;
2028 typedef ndmp_mover_set_record_size_reply ndmp_mover_set_record_size_reply_v3;
2029 typedef ndmp_mover_set_record_size_reply ndmp_mover_set_record_size_reply_v4;
2030 typedef ndmp_mover_set_window_request ndmp_mover_set_window_request_v2;
2031 typedef ndmp_mover_set_window_request ndmp_mover_set_window_request_v3;
2032 typedef ndmp_mover_set_window_request ndmp_mover_set_window_request_v4;
2033 typedef ndmp_mover_set_window_reply ndmp_mover_set_window_reply_v2;
2034 typedef ndmp_mover_set_window_reply ndmp_mover_set_window_reply_v3;
2035 typedef ndmp_mover_set_window_reply ndmp_mover_set_window_reply_v4;
2036 typedef ndmp_mover_continue_reply ndmp_mover_continue_reply_v2;
2037 typedef ndmp_mover_continue_reply ndmp_mover_continue_reply_v3;
2038 typedef ndmp_mover_continue_reply ndmp_mover_continue_reply_v4;
2039 typedef ndmp_mover_abort_reply ndmp_mover_abort_reply_v2;
2040 typedef ndmp_mover_abort_reply ndmp_mover_abort_reply_v3;
2041 typedef ndmp_mover_abort_reply ndmp_mover_abort_reply_v4;
2042 typedef ndmp_mover_stop_reply ndmp_mover_stop_reply_v2;
2043 typedef ndmp_mover_stop_reply ndmp_mover_stop_reply_v3;
2044 typedef ndmp_mover_stop_reply ndmp_mover_stop_reply_v4;
2045 typedef ndmp_mover_read_request ndmp_mover_read_request_v2;
2046 typedef ndmp_mover_read_request ndmp_mover_read_request_v3;
2047 typedef ndmp_mover_read_request ndmp_mover_read_request_v4;
2048 typedef ndmp_mover_read_reply ndmp_mover_read_reply_v2;
2049 typedef ndmp_mover_read_reply ndmp_mover_read_reply_v3;
2050 typedef ndmp_mover_read_reply ndmp_mover_read_reply_v4;
2051 typedef ndmp_mover_close_reply ndmp_mover_close_reply_v2;
2052 typedef ndmp_mover_close_reply ndmp_mover_close_reply_v3;
2053 typedef ndmp_mover_close_reply ndmp_mover_close_reply_v4;
2054 typedef ndmp_mover_connect_reply_v3 ndmp_mover_connect_reply_v4;
2055 
2056 
2057 /* DATA */
2058 typedef ndmp_data_get_state_reply ndmp_data_get_state_reply_v2;
2059 typedef ndmp_data_start_backup_request ndmp_data_start_backup_request_v2;
2060 typedef ndmp_data_start_backup_request_v3 ndmp_data_start_backup_request_v4;
2061 typedef ndmp_data_start_backup_reply ndmp_data_start_backup_reply_v2;
2062 typedef ndmp_data_start_backup_reply ndmp_data_start_backup_reply_v3;
2063 typedef ndmp_data_start_backup_reply ndmp_data_start_backup_reply_v4;
2064 typedef ndmp_name ndmp_name_v2;
2065 typedef ndmp_data_start_recover_request ndmp_data_start_recover_request_v2;
2066 typedef ndmp_data_start_recover_request_v3 ndmp_data_start_recover_request_v4;
2067 typedef ndmp_data_start_recover_reply ndmp_data_start_recover_reply_v2;
2068 typedef ndmp_data_start_recover_reply ndmp_data_start_recover_reply_v3;
2069 typedef ndmp_data_start_recover_reply ndmp_data_start_recover_reply_v4;
2070 typedef ndmp_data_start_recover_reply ndmp_data_start_recover_filehist_reply_v4;
2071 typedef ndmp_data_abort_reply ndmp_data_abort_reply_v2;
2072 typedef ndmp_data_abort_reply ndmp_data_abort_reply_v3;
2073 typedef ndmp_data_abort_reply ndmp_data_abort_reply_v4;
2074 typedef ndmp_data_stop_reply ndmp_data_stop_reply_v2;
2075 typedef ndmp_data_stop_reply ndmp_data_stop_reply_v3;
2076 typedef ndmp_data_stop_reply ndmp_data_stop_reply_v4;
2077 typedef ndmp_data_get_env_reply ndmp_data_get_env_reply_v2;
2078 typedef ndmp_data_get_env_reply ndmp_data_get_env_reply_v3;
2079 typedef ndmp_data_get_env_reply ndmp_data_get_env_reply_v4;
2080 typedef ndmp_data_listen_request_v3 ndmp_data_listen_request_v4;
2081 typedef ndmp_data_connect_reply_v3 ndmp_data_connect_reply_v4;
2082 
2083 
2084 /* NOTIFY */
2085 typedef ndmp_notify_data_halted_request ndmp_notify_data_halted_request_v2;
2086 typedef ndmp_notify_data_halted_request ndmp_notify_data_halted_request_v3;
2087 typedef ndmp_notify_connected_request ndmp_notify_connection_status_request_v2;
2088 typedef ndmp_notify_connected_request ndmp_notify_connection_status_request_v3;
2089 typedef ndmp_notify_connected_request ndmp_notify_connection_status_request_v4;
2090 typedef ndmp_notify_mover_paused_request ndmp_notify_mover_paused_request_v2;
2091 typedef ndmp_notify_mover_paused_request ndmp_notify_mover_paused_request_v3;
2092 typedef ndmp_notify_mover_paused_request ndmp_notify_mover_paused_request_v4;
2093 typedef ndmp_notify_mover_halted_request ndmp_notify_mover_halted_request_v2;
2094 typedef ndmp_notify_mover_halted_request ndmp_notify_mover_halted_request_v3;
2095 typedef ndmp_notify_data_read_request ndmp_notify_data_read_request_v2;
2096 typedef ndmp_notify_data_read_request ndmp_notify_data_read_request_v3;
2097 typedef ndmp_notify_data_read_request ndmp_notify_data_read_request_v4;
2098 
2099 
2100 /* LOG */
2101 typedef ndmp_log_log_request ndmp_log_log_request_v2;
2102 typedef ndmp_log_log_request ndmp_log_log_request_v3;
2103 typedef ndmp_log_log_request ndmp_log_log_request_v4;
2104 typedef ndmp_log_debug_request ndmp_log_debug_request_v2;
2105 typedef ndmp_log_debug_request ndmp_log_debug_request_v3;
2106 typedef ndmp_log_debug_request ndmp_log_debug_request_v4;
2107 typedef ndmp_log_file_request ndmp_log_file_request_v2;
2108 
2109 
2110 /* FILE HISTORY */
2111 typedef ndmp_file_v3 ndmp_file;
2112 typedef ndmp_dir_v3 ndmp_dir;
2113 typedef ndmp_node_v3 ndmp_node;
2114 typedef ndmp_fh_add_unix_path_request ndmp_fh_add_unix_path_request_v2;
2115 typedef ndmp_fh_add_unix_path_request ndmp_fh_add_unix_path_request_v3;
2116 typedef ndmp_fh_add_file_request_v3 ndmp_fh_add_file_request_v4;
2117 typedef ndmp_fh_add_unix_dir_request ndmp_fh_add_unix_dir_request_v2;
2118 typedef ndmp_fh_add_unix_dir_request ndmp_fh_add_unix_dir_request_v3;
2119 typedef ndmp_fh_add_dir_request_v3 ndmp_fh_add_dir_request_v4;
2120 typedef ndmp_fh_add_unix_node_request ndmp_fh_add_unix_node_request_v2;
2121 typedef ndmp_fh_add_unix_node_request ndmp_fh_add_unix_node_request_v3;
2122 typedef ndmp_fh_add_node_request_v3 ndmp_fh_add_node_request_v4;
2123 
2124 
2125 
2126 
2127 
2128 
2129 
2130 
2131 
2132 
2133 
2134 
2135 
2136 
2137 
2138 
2139 
2140 
2141 
2142 
2143 
2144 
2145 
2146 
2147 
2148 
2149 
2150 
2151 
2152 
2153 
2154 
2155 
2156 
2157 
2158 
2159 
2160