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
43const NDMPV2 = 2;
44const NDMPV3 = 3;
45const NDMPV4 = 4;
46const NDMPVER = NDMPV4;
47const NDMPPORT = 10000;
48
49struct ndmp_u_quad
50{
51	u_long	high;
52	u_long	low;
53};
54
55struct ndmp_pval
56{
57	string	name<>;
58	string	value<>;
59};
60
61struct ndmp_scsi_device
62{
63	string	name<>;
64};
65
66struct ndmp_tape_device
67{
68	string	name<>;
69};
70
71enum 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
114enum ndmp_header_message_type
115{
116	NDMP_MESSAGE_REQUEST,
117	NDMP_MESSAGE_REPLY
118};
119
120enum 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
205const NDMP_CONNECT_AUTH = NDMP_CONNECT_CLIENT_AUTH;
206const NDMP_MESSAGE_POST = NDMP_MESSAGE_REQUEST;
207
208struct 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 */
224struct ndmp_connect_open_request
225{
226	u_short	protocol_version;	/* the version of protocol supported */
227};
228
229struct ndmp_connect_open_reply
230{
231	ndmp_error	error;
232};
233
234/* NDMP_CONNECT_CLIENT_AUTH = NDMP_CONNECT_AUTH */
235enum 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
242struct ndmp_auth_text
243{
244	string	user<>;
245	string	password<>;
246};
247
248struct ndmp_auth_md5
249{
250	string	user<>;
251	opaque	auth_digest[16];
252};
253
254union 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
264struct ndmp_connect_client_auth_request
265{
266	ndmp_auth_data	auth_data;
267};
268
269struct 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 */
280union 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
290struct ndmp_connect_server_auth_request
291{
292	ndmp_auth_attr	client_attr;
293};
294
295struct 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
308struct ndmp_auth_text_v3
309{
310	string	auth_id<>;
311	string	auth_password<>;
312
313};
314
315struct ndmp_auth_md5_v3
316{
317	string	auth_id<>;
318	opaque	auth_digest[16];
319};
320
321union 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
331struct ndmp_connect_client_auth_request_v3
332{
333	ndmp_auth_data_v3	auth_data;
334};
335
336struct 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
366struct 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 */
377const NDMP_NO_BACKUP_FILELIST	= 0x0001;
378const NDMP_NO_BACKUP_FHINFO	= 0x0002;
379const NDMP_NO_RECOVER_FILELIST	= 0x0004;
380const NDMP_NO_RECOVER_FHINFO	= 0x0008;
381const NDMP_NO_RECOVER_SSID	= 0x0010;
382const NDMP_NO_RECOVER_INC_ONLY	= 0x0020;
383
384struct ndmp_config_get_butype_attr_request
385{
386	string	name<>;		/* backup type name */
387};
388
389struct 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
398enum 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
406struct ndmp_config_get_mover_type_reply
407{
408	ndmp_error		error;
409	ndmp_addr_type		methods<>;
410};
411
412/* NDMP_CONFIG_GET_AUTH_ATTR */
413struct ndmp_config_get_auth_attr_request
414{
415	ndmp_auth_type	auth_type;
416};
417
418struct 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
432struct 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
444struct 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
455struct 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 */
465const NDMP_BUTYPE_BACKUP_FILE_HISTORY	 = 0x0001;	/* NDMP V2,3 */
466const NDMP_BUTYPE_BACKUP_FILELIST        = 0x0002;
467const NDMP_BUTYPE_RECOVER_FILELIST       = 0x0004;
468const NDMP_BUTYPE_BACKUP_DIRECT          = 0x0008;
469const NDMP_BUTYPE_RECOVER_DIRECT         = 0x0010;
470const NDMP_BUTYPE_BACKUP_INCREMENTAL     = 0x0020;
471const NDMP_BUTYPE_RECOVER_INCREMENTAL    = 0x0040;
472const NDMP_BUTYPE_BACKUP_UTF8            = 0x0080;
473const NDMP_BUTYPE_RECOVER_UTF8           = 0x0100;
474const NDMP_BUTYPE_BACKUP_FH_FILE         = 0x0200; 	/* NDMP V4 */
475const NDMP_BUTYPE_BACKUP_FH_DIR          = 0x0400; 	/* NDMP V4 */
476const NDMP_BUTYPE_RECOVER_FILEHIST       = 0x0800; 	/* NDMP V4 */
477const NDMP_BUTYPE_RECOVER_FH_FILE        = 0x1000; 	/* NDMP V4 */
478const NDMP_BUTYPE_RECOVER_FH_DIR         = 0x2000; 	/* NDMP V4 */
479
480
481struct 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
491struct ndmp_config_get_butype_info_reply_v3
492{
493	ndmp_error		error;
494	ndmp_butype_info	butype_info<>;
495};
496
497/* invalid bit */
498const	NDMP_FS_INFO_TOTAL_SIZE_INVALID 	= 0x00000001;
499const	NDMP_FS_INFO_USED_SIZE_INVALID		= 0x00000002;
500const	NDMP_FS_INFO_AVAIL_SIZE_INVALID		= 0x00000004;
501const	NDMP_FS_INFO_TOTAL_INODES_INVALID	= 0x00000008;
502const	NDMP_FS_INFO_USED_INODES_INVALID	= 0x00000010;
503
504struct 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
522struct 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 */
532const NDMP_TAPE_ATTR_REWIND = 0x00000001;
533const NDMP_TAPE_ATTR_UNLOAD = 0x00000002;
534const NDMP_TAPE_ATTR_RAW    = 0x00000004;
535
536
537struct ndmp_device_capability_v3
538{
539	string		device<>;
540	u_long		attr;
541	ndmp_pval	capability<>;
542};
543
544struct ndmp_device_info_v3
545{
546	string				model<>;
547	ndmp_device_capability_v3	caplist<>;
548
549};
550struct 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 */
560struct 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
580struct 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
589struct ndmp_class_list
590{
591	u_short      ext_class_id;
592	u_short      ext_version<>;
593};
594
595struct ndmp_class_version
596{
597	u_short      ext_class_id;
598	u_short      ext_version;
599};
600
601struct ndmp_config_get_ext_list_reply
602{
603	ndmp_error         error;
604	ndmp_class_list    class_list<>;
605};
606
607struct ndmp_config_set_ext_list_request
608{
609	ndmp_class_version    ndmp_selected_ext<>;
610};
611
612struct 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 */
623struct ndmp_scsi_open_request
624{
625	ndmp_scsi_device	device;
626};
627
628struct ndmp_scsi_open_reply
629{
630	ndmp_error	error;
631};
632
633/* NDMP_SCSI_CLOSE */
634/* no request arguments */
635
636struct ndmp_scsi_close_reply
637{
638	ndmp_error	error;
639};
640
641/* NDMP_SCSI_GET_STATE */
642/* no request arguments */
643
644struct 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 */
653struct 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
661struct ndmp_scsi_set_target_reply
662{
663	ndmp_error	error;
664};
665
666/* NDMP_SCSI_RESET_DEVICE */
667/* no request arguments */
668
669struct ndmp_scsi_reset_device_reply
670{
671	ndmp_error	error;
672};
673
674/* NDMP_SCSI_RESET_BUS */
675/* no request arguments */
676
677struct ndmp_scsi_reset_bus_reply
678{
679	ndmp_error	error;
680};
681
682/* NDMP_SCSI_EXECUTE_CDB */
683const NDMP_SCSI_DATA_IN		= 0x00000001;	/* Expect data from SCSI device */
684const NDMP_SCSI_DATA_OUT	= 0x00000002;	/* Transfer data to SCSI device */
685
686struct 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
695struct 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 */
710struct 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
721struct 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 */
758enum 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
768struct ndmp_tape_open_request
769{
770	ndmp_tape_device	device;
771	ndmp_tape_open_mode	mode;
772};
773
774struct ndmp_tape_open_reply
775{
776	ndmp_error	error;
777};
778
779/* NDMP_TAPE_CLOSE */
780/* no request arguments */
781struct ndmp_tape_close_reply
782{
783	ndmp_error	error;
784};
785
786/* NDMP_TAPE_GET_STATE */
787/* no request arguments */
788const NDMP_TAPE_NOREWIND	= 0x0008;	/* non-rewind device */
789const NDMP_TAPE_WR_PROT		= 0x0010;	/* write-protected */
790const NDMP_TAPE_ERROR		= 0x0020;	/* media error */
791const NDMP_TAPE_UNLOAD		= 0x0040;	/* tape will be unloaded when the device is closed */
792
793struct 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
805enum 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
818struct ndmp_tape_mtio_request
819{
820	ndmp_tape_mtio_op	tape_op;
821	u_long			count;
822};
823
824struct ndmp_tape_mtio_reply
825{
826	ndmp_error	error;
827	u_long		resid_count;
828};
829
830/* NDMP_TAPE_WRITE */
831struct ndmp_tape_write_request
832{
833	opaque	data_out<>;
834};
835
836struct ndmp_tape_write_reply
837{
838	ndmp_error	error;
839	u_long		count;
840};
841
842/* NDMP_TAPE_READ */
843struct ndmp_tape_read_request
844{
845	u_long	count;
846};
847
848struct ndmp_tape_read_reply
849{
850	ndmp_error	error;
851	opaque		data_in<>;
852};
853
854/* NDMP_TAPE_EXECUTE_CDB */
855typedef ndmp_execute_cdb_request	ndmp_tape_execute_cdb_request;
856typedef ndmp_execute_cdb_reply		ndmp_tape_execute_cdb_reply;
857
858
859/***********************/
860/* TAPE INTERFACE (V3) */
861/***********************/
862
863/* NDMP_TAPE_OPEN */
864struct 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 */
876const NDMP_TAPE_STATE_NOREWIND	= 0x0008;	/* non-rewind device */
877const NDMP_TAPE_STATE_WR_PROT	= 0x0010;	/* write-protected */
878const NDMP_TAPE_STATE_ERROR	= 0x0020;	/* media error */
879const NDMP_TAPE_STATE_UNLOAD	= 0x0040;	/* tape will be unloaded when the device is closed */
880
881/* invalid bit */
882const NDMP_TAPE_STATE_FILE_NUM_INVALID		= 0x00000001;
883const NDMP_TAPE_STATE_SOFT_ERRORS_INVALID	= 0x00000002;
884const NDMP_TAPE_STATE_BLOCK_SIZE_INVALID	= 0x00000004;
885const NDMP_TAPE_STATE_BLOCKNO_INVALID		= 0x00000008;
886const NDMP_TAPE_STATE_TOTAL_SPACE_INVALID	= 0x00000010;
887const NDMP_TAPE_STATE_SPACE_REMAIN_INVALID	= 0x00000020;
888const NDMP_TAPE_STATE_PARTITION_INVALID		= 0x00000040;
889
890struct 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
921struct 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/************************/
946enum 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
953enum 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
962enum 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
972enum 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 */
986struct 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
1003struct ndmp_tcp_addr
1004{
1005	u_long	ip_addr;
1006	u_short	port;
1007};
1008
1009union 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
1017struct ndmp_mover_listen_request
1018{
1019	ndmp_mover_mode		mode;
1020	ndmp_addr_type		addr_type;
1021};
1022
1023struct ndmp_mover_listen_reply
1024{
1025	ndmp_error		error;
1026	ndmp_mover_addr		mover;
1027};
1028
1029/* NDMP_MOVER_SET_RECORD_SIZE */
1030struct ndmp_mover_set_record_size_request
1031{
1032	u_long	len;
1033};
1034
1035struct ndmp_mover_set_record_size_reply
1036{
1037	ndmp_error	error;
1038};
1039
1040/* NDMP_MOVER_SET_WINDOW */
1041struct ndmp_mover_set_window_request
1042{
1043	ndmp_u_quad	offset;
1044	ndmp_u_quad	length;
1045};
1046
1047struct ndmp_mover_set_window_reply
1048{
1049	ndmp_error	error;
1050};
1051
1052/* NDMP_MOVER_CONTINUE */
1053/* no request arguments */
1054
1055struct ndmp_mover_continue_reply
1056{
1057	ndmp_error	error;
1058};
1059
1060
1061/* NDMP_MOVER_ABORT */
1062/* no request arguments */
1063struct ndmp_mover_abort_reply
1064{
1065	ndmp_error	error;
1066};
1067
1068/* NDMP_MOVER_STOP */
1069/* no request arguments */
1070
1071struct ndmp_mover_stop_reply
1072{
1073	ndmp_error	error;
1074};
1075
1076/* NDMP_MOVER_READ */
1077struct ndmp_mover_read_request
1078{
1079	ndmp_u_quad	offset;
1080	ndmp_u_quad	length;
1081};
1082
1083struct ndmp_mover_read_reply
1084{
1085	ndmp_error	error;
1086};
1087
1088/* NDMP_MOVER_CLOSE */
1089/* no request arguments */
1090
1091struct 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
1109struct ndmp_fc_addr_v3
1110{
1111	u_long	loop_id;
1112};
1113
1114struct ndmp_ipc_addr_v3
1115{
1116	opaque comm_data<>;
1117};
1118
1119union 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
1147struct 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
1165struct ndmp_mover_listen_reply_v3
1166{
1167	ndmp_error	error;
1168	ndmp_addr_v3	data_connection_addr;
1169};
1170
1171/* NDMP_MOVER_CONNECT */
1172struct ndmp_mover_connect_request_v3
1173{
1174	ndmp_mover_mode		mode;
1175	ndmp_addr_v3		addr;
1176};
1177
1178struct 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
1227struct ndmp_tcp_addr_v4
1228{
1229	u_long       ip_addr;
1230	u_short      port;
1231	ndmp_pval    addr_env<>;
1232};
1233
1234union ndmp_addr_v4
1235switch (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
1245struct ndmp_mover_connect_request_v4
1246{
1247	ndmp_mover_mode       mode;
1248	ndmp_addr_v4          addr;
1249};
1250
1251struct 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
1259struct 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
1292enum 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
1300enum 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
1309enum 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
1318struct 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
1334struct 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
1341struct ndmp_data_start_backup_reply
1342{
1343	ndmp_error	error;
1344};
1345
1346/* NDMP_DATA_START_RECOVER */
1347struct ndmp_name
1348{
1349	string		name<>;
1350	string		dest<>;
1351	u_short		ssid;
1352	ndmp_u_quad	fh_info;
1353};
1354
1355struct 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
1364struct ndmp_data_start_recover_reply
1365{
1366	ndmp_error	error;
1367};
1368
1369/* NDMP_DATA_ABORT */
1370/* no request arguments */
1371
1372struct ndmp_data_abort_reply
1373{
1374	ndmp_error	error;
1375};
1376
1377/* NDMP_DATA_STOP */
1378/* no request arguments */
1379
1380struct ndmp_data_stop_reply
1381{
1382	ndmp_error	error;
1383};
1384
1385/* NDMP_DATA_GET_ENV */
1386/* no request arguments */
1387
1388struct ndmp_data_get_env_reply
1389{
1390	ndmp_error	error;
1391	ndmp_pval	env<>;
1392};
1393/* no reply arguments */
1394
1395struct 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 */
1412const NDMP_DATA_STATE_EST_BYTES_REMAIN_INVALID	= 0x00000001;
1413const NDMP_DATA_STATE_EST_TIME_REMAIN_INVALID	= 0x00000002;
1414
1415struct 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 */
1431struct 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 */
1438struct 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
1448struct 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 */
1462struct ndmp_data_listen_request_v3
1463{
1464	ndmp_addr_type	addr_type;
1465};
1466
1467struct ndmp_data_listen_reply_v3
1468{
1469	ndmp_error	error;
1470	ndmp_addr_v3	data_connection_addr;
1471};
1472
1473/* NDMP_DATA_CONNECT */
1474struct ndmp_data_connect_request_v3
1475{
1476	ndmp_addr_v3	addr;
1477};
1478
1479struct ndmp_data_connect_reply_v3
1480{
1481	ndmp_error	error;
1482};
1483
1484
1485/***********************/
1486/* DATA INTERFACE (V4) */
1487/***********************/
1488
1489struct 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
1504struct ndmp_data_listen_reply_v4
1505{
1506	ndmp_error   error;
1507	ndmp_addr_v4    connect_addr;
1508};
1509
1510struct 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 */
1532enum 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
1539struct 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 */
1547struct 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 */
1555struct 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 */
1563struct 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
1590struct ndmp_notify_data_halted_request_v4
1591{
1592	ndmp_data_halt_reason   reason;
1593};
1594
1595/* NDMP_NOTIFY_CONNECTION_STATUS - same as V3 */
1596
1597struct 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 */
1612struct ndmp_log_log_request
1613{
1614	string	entry<>;
1615};
1616/* no reply arguments */
1617
1618/* NDMP_LOG_DEBUG */
1619enum 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
1632struct ndmp_log_debug_request
1633{
1634	ndmp_debug_level	level;
1635	string			message<>;
1636};
1637/* no reply arguments */
1638
1639/* NDMP_LOG_FILE */
1640struct 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 */
1654enum 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
1662struct 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 */
1671struct 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
1683enum ndmp_has_associated_message
1684{
1685	NDMP_NO_ASSOCIATED_MESSAGE     = 0,
1686	NDMP_HAS_ASSOCIATED_MESSAGE    = 1
1687};
1688
1689enum 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
1701struct 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
1710struct 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 */
1723typedef string ndmp_unix_path<>;
1724enum 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
1737struct 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
1750struct ndmp_fh_unix_path
1751{
1752	ndmp_unix_path		name;
1753	ndmp_unix_file_stat	fstat;
1754};
1755
1756struct 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 */
1763struct ndmp_fh_unix_dir
1764{
1765	ndmp_unix_path		name;
1766	u_long			node;
1767	u_long			parent;
1768};
1769
1770struct 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 */
1777struct ndmp_fh_unix_node
1778{
1779	ndmp_unix_file_stat	fstat;
1780	u_long			node;
1781};
1782
1783struct 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 */
1795enum ndmp_fs_type
1796{
1797	NDMP_FS_UNIX   = 0,
1798	NDMP_FS_NT     = 1,
1799	NDMP_FS_OTHER  = 2
1800};
1801
1802
1803typedef string ndmp_path_v3<>;
1804struct ndmp_nt_path_v3
1805{
1806	ndmp_path_v3	nt_path;
1807	ndmp_path_v3	dos_path;
1808};
1809
1810union 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 */
1821const NDMP_FILE_STAT_ATIME_INVALID	= 0x00000001;
1822const NDMP_FILE_STAT_CTIME_INVALID	= 0x00000002;
1823const NDMP_FILE_STAT_GROUP_INVALID	= 0x00000004;
1824
1825struct 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 */
1842struct 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
1850struct ndmp_fh_add_file_request_v3
1851{
1852	ndmp_file_v3		files<>;
1853};
1854/* no reply arguments */
1855
1856/* NDMP_FH_ADD_DIR */
1857
1858struct ndmp_dir_v3
1859{
1860	ndmp_file_name_v3	names<>;
1861	ndmp_u_quad		node;
1862	ndmp_u_quad		parent;
1863};
1864
1865struct ndmp_fh_add_dir_request_v3
1866{
1867	ndmp_dir_v3	dirs<>;
1868};
1869/* no reply arguments */
1870
1871/* NDMP_FH_ADD_NODE */
1872
1873struct ndmp_node_v3
1874{
1875	ndmp_file_stat_v3	stats<>;
1876	ndmp_u_quad		node;
1877	ndmp_u_quad		fh_info;
1878};
1879
1880struct 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 */
1903typedef ndmp_auth_text ndmp_auth_text_v2;
1904typedef ndmp_auth_text_v3 ndmp_auth_text_v4;
1905typedef ndmp_auth_md5 ndmp_auth_md5_v2;
1906typedef ndmp_auth_md5_v3 ndmp_auth_md5_v4;
1907typedef ndmp_auth_data ndmp_auth_data_v2;
1908typedef ndmp_auth_data_v3 ndmp_auth_data_v4;
1909
1910typedef ndmp_connect_open_request ndmp_connect_open_request_v2;
1911typedef ndmp_connect_open_request ndmp_connect_open_request_v3;
1912typedef ndmp_connect_open_request ndmp_connect_open_request_v4;
1913typedef ndmp_connect_open_reply ndmp_connect_open_reply_v2;
1914typedef ndmp_connect_open_reply ndmp_connect_open_reply_v3;
1915typedef ndmp_connect_open_reply ndmp_connect_open_reply_v4;
1916typedef ndmp_connect_client_auth_request ndmp_connect_client_auth_request_v2;
1917typedef ndmp_connect_client_auth_request_v3 ndmp_connect_client_auth_request_v4;
1918typedef ndmp_connect_client_auth_reply ndmp_connect_client_auth_reply_v2;
1919typedef ndmp_connect_client_auth_reply_v3 ndmp_connect_client_auth_reply_v4;
1920typedef ndmp_connect_server_auth_request ndmp_connect_server_auth_request_v2;
1921typedef ndmp_connect_server_auth_request ndmp_connect_server_auth_request_v3;
1922typedef ndmp_connect_server_auth_request ndmp_connect_server_auth_request_v4;
1923typedef ndmp_connect_server_auth_reply ndmp_connect_server_auth_reply_v2;
1924typedef ndmp_connect_server_auth_reply ndmp_connect_server_auth_reply_v3;
1925typedef ndmp_connect_server_auth_reply ndmp_connect_server_auth_reply_v4;
1926
1927
1928/* CONFIG */
1929typedef ndmp_config_get_host_info_reply ndmp_config_get_host_info_reply_v2;
1930typedef ndmp_config_get_host_info_reply_v3 ndmp_config_get_host_info_reply_v4;
1931typedef ndmp_config_get_butype_attr_request ndmp_config_get_butype_attr_request_v2;
1932typedef ndmp_config_get_butype_attr_reply ndmp_config_get_butype_attr_reply_v2;
1933typedef ndmp_config_get_mover_type_reply ndmp_config_get_mover_type_reply_v2;
1934typedef ndmp_config_get_auth_attr_request ndmp_config_get_auth_attr_request_v2;
1935typedef ndmp_config_get_auth_attr_request ndmp_config_get_auth_attr_request_v3;
1936typedef ndmp_config_get_auth_attr_request ndmp_config_get_auth_attr_request_v4;
1937typedef ndmp_config_get_auth_attr_reply ndmp_config_get_auth_attr_reply_v2;
1938typedef ndmp_config_get_auth_attr_reply ndmp_config_get_auth_attr_reply_v3;
1939typedef ndmp_config_get_auth_attr_reply ndmp_config_get_auth_attr_reply_v4;
1940typedef ndmp_config_get_connection_type_reply_v3 ndmp_config_get_connection_type_reply_v4;
1941typedef ndmp_config_get_server_info_reply_v3 ndmp_config_get_server_info_reply_v4;
1942typedef ndmp_fs_info_v3 ndmp_fs_info_v4;
1943typedef ndmp_config_get_fs_info_reply_v3 ndmp_config_get_fs_info_reply_v4;
1944typedef ndmp_device_info_v3 ndmp_device_info_v4;
1945typedef ndmp_config_get_tape_info_reply_v3  ndmp_config_get_tape_info_reply_v4;
1946typedef ndmp_config_get_scsi_info_reply_v3 ndmp_config_get_scsi_info_reply_v4;
1947typedef ndmp_config_get_ext_list_reply ndmp_config_get_ext_list_reply_v4;
1948typedef ndmp_config_set_ext_list_request ndmp_config_set_ext_list_request_v4;
1949typedef ndmp_config_set_ext_list_reply ndmp_config_set_ext_list_reply_v4;
1950
1951
1952/* SCSI */
1953typedef ndmp_scsi_open_request ndmp_scsi_open_request_v2;
1954typedef ndmp_scsi_open_request_v3 ndmp_scsi_open_request_v4;
1955typedef ndmp_scsi_open_reply ndmp_scsi_open_reply_v2;
1956typedef ndmp_scsi_open_reply ndmp_scsi_open_reply_v3;
1957typedef ndmp_scsi_open_reply ndmp_scsi_open_reply_v4;
1958typedef ndmp_scsi_close_reply ndmp_scsi_close_reply_v2;
1959typedef ndmp_scsi_close_reply ndmp_scsi_close_reply_v3;
1960typedef ndmp_scsi_close_reply ndmp_scsi_close_reply_v4;
1961typedef ndmp_scsi_get_state_reply ndmp_scsi_get_state_reply_v2;
1962typedef ndmp_scsi_get_state_reply ndmp_scsi_get_state_reply_v3;
1963typedef ndmp_scsi_get_state_reply ndmp_scsi_get_state_reply_v4;
1964typedef ndmp_scsi_set_target_request ndmp_scsi_set_target_request_v2;
1965typedef ndmp_scsi_set_target_reply ndmp_scsi_set_target_reply_v2;
1966typedef ndmp_scsi_set_target_reply ndmp_scsi_set_target_reply_v3;
1967typedef ndmp_scsi_reset_device_reply ndmp_scsi_reset_device_reply_v2;
1968typedef ndmp_scsi_reset_device_reply ndmp_scsi_reset_device_reply_v3;
1969typedef ndmp_scsi_reset_device_reply ndmp_scsi_reset_device_reply_v4;
1970typedef ndmp_scsi_reset_bus_reply ndmp_scsi_reset_bus_reply_v2;
1971typedef ndmp_scsi_reset_bus_reply ndmp_scsi_reset_bus_reply_v3;
1972typedef ndmp_execute_cdb_request ndmp_scsi_execute_cdb_request_v2;
1973typedef ndmp_execute_cdb_request ndmp_scsi_execute_cdb_request_v3;
1974typedef ndmp_execute_cdb_request ndmp_scsi_execute_cdb_request_v4;
1975typedef ndmp_execute_cdb_reply ndmp_scsi_execute_cdb_reply_v2;
1976typedef ndmp_execute_cdb_reply ndmp_scsi_execute_cdb_reply_v3;
1977typedef ndmp_execute_cdb_reply ndmp_scsi_execute_cdb_reply_v4;
1978
1979
1980/* TAPE */
1981typedef ndmp_tape_open_request ndmp_tape_open_request_v2;
1982typedef ndmp_tape_open_request_v3 ndmp_tape_open_request_v4;
1983typedef ndmp_tape_open_reply ndmp_tape_open_reply_v2;
1984typedef ndmp_tape_open_reply ndmp_tape_open_reply_v3;
1985typedef ndmp_tape_open_reply ndmp_tape_open_reply_v4;
1986typedef ndmp_tape_close_reply ndmp_tape_close_reply_v2;
1987typedef ndmp_tape_close_reply ndmp_tape_close_reply_v3;
1988typedef ndmp_tape_close_reply ndmp_tape_close_reply_v4;
1989typedef ndmp_tape_get_state_reply ndmp_tape_get_state_reply_v2;
1990typedef ndmp_tape_mtio_request ndmp_tape_mtio_request_v2;
1991typedef ndmp_tape_mtio_request ndmp_tape_mtio_request_v3;
1992typedef ndmp_tape_mtio_request ndmp_tape_mtio_request_v4;
1993typedef ndmp_tape_mtio_reply ndmp_tape_mtio_reply_v2;
1994typedef ndmp_tape_mtio_reply ndmp_tape_mtio_reply_v3;
1995typedef ndmp_tape_mtio_reply ndmp_tape_mtio_reply_v4;
1996typedef ndmp_tape_write_request ndmp_tape_write_request_v2;
1997typedef ndmp_tape_write_request ndmp_tape_write_request_v3;
1998typedef ndmp_tape_write_request ndmp_tape_write_request_v4;
1999typedef ndmp_tape_write_reply ndmp_tape_write_reply_v2;
2000typedef ndmp_tape_write_reply ndmp_tape_write_reply_v3;
2001typedef ndmp_tape_write_reply ndmp_tape_write_reply_v4;
2002typedef ndmp_tape_read_request ndmp_tape_read_request_v2;
2003typedef ndmp_tape_read_request ndmp_tape_read_request_v3;
2004typedef ndmp_tape_read_request ndmp_tape_read_request_v4;
2005typedef ndmp_tape_read_reply ndmp_tape_read_reply_v2;
2006typedef ndmp_tape_read_reply ndmp_tape_read_reply_v3;
2007typedef ndmp_tape_read_reply ndmp_tape_read_reply_v4;
2008typedef ndmp_tape_execute_cdb_request ndmp_tape_execute_cdb_request_v2;
2009typedef ndmp_tape_execute_cdb_request ndmp_tape_execute_cdb_request_v3;
2010typedef ndmp_tape_execute_cdb_request ndmp_tape_execute_cdb_request_v4;
2011typedef ndmp_tape_execute_cdb_reply ndmp_tape_execute_cdb_reply_v2;
2012typedef ndmp_tape_execute_cdb_reply ndmp_tape_execute_cdb_reply_v3;
2013typedef ndmp_tape_execute_cdb_reply ndmp_tape_execute_cdb_reply_v4;
2014
2015
2016/* MOVER */
2017typedef ndmp_fc_addr_v3 ndmp_fc_addr;
2018typedef ndmp_ipc_addr_v3 ndmp_ipc_addr;
2019typedef ndmp_mover_get_state_reply ndmp_mover_get_state_reply_v2;
2020typedef ndmp_mover_listen_request ndmp_mover_listen_request_v2;
2021typedef ndmp_mover_listen_request ndmp_mover_listen_request_v3;
2022typedef ndmp_mover_listen_request ndmp_mover_listen_request_v4;
2023typedef ndmp_mover_listen_reply ndmp_mover_listen_reply_v2;
2024typedef ndmp_mover_set_record_size_request ndmp_mover_set_record_size_request_v2;
2025typedef ndmp_mover_set_record_size_request ndmp_mover_set_record_size_request_v3;
2026typedef ndmp_mover_set_record_size_request ndmp_mover_set_record_size_request_v4;
2027typedef ndmp_mover_set_record_size_reply ndmp_mover_set_record_size_reply_v2;
2028typedef ndmp_mover_set_record_size_reply ndmp_mover_set_record_size_reply_v3;
2029typedef ndmp_mover_set_record_size_reply ndmp_mover_set_record_size_reply_v4;
2030typedef ndmp_mover_set_window_request ndmp_mover_set_window_request_v2;
2031typedef ndmp_mover_set_window_request ndmp_mover_set_window_request_v3;
2032typedef ndmp_mover_set_window_request ndmp_mover_set_window_request_v4;
2033typedef ndmp_mover_set_window_reply ndmp_mover_set_window_reply_v2;
2034typedef ndmp_mover_set_window_reply ndmp_mover_set_window_reply_v3;
2035typedef ndmp_mover_set_window_reply ndmp_mover_set_window_reply_v4;
2036typedef ndmp_mover_continue_reply ndmp_mover_continue_reply_v2;
2037typedef ndmp_mover_continue_reply ndmp_mover_continue_reply_v3;
2038typedef ndmp_mover_continue_reply ndmp_mover_continue_reply_v4;
2039typedef ndmp_mover_abort_reply ndmp_mover_abort_reply_v2;
2040typedef ndmp_mover_abort_reply ndmp_mover_abort_reply_v3;
2041typedef ndmp_mover_abort_reply ndmp_mover_abort_reply_v4;
2042typedef ndmp_mover_stop_reply ndmp_mover_stop_reply_v2;
2043typedef ndmp_mover_stop_reply ndmp_mover_stop_reply_v3;
2044typedef ndmp_mover_stop_reply ndmp_mover_stop_reply_v4;
2045typedef ndmp_mover_read_request ndmp_mover_read_request_v2;
2046typedef ndmp_mover_read_request ndmp_mover_read_request_v3;
2047typedef ndmp_mover_read_request ndmp_mover_read_request_v4;
2048typedef ndmp_mover_read_reply ndmp_mover_read_reply_v2;
2049typedef ndmp_mover_read_reply ndmp_mover_read_reply_v3;
2050typedef ndmp_mover_read_reply ndmp_mover_read_reply_v4;
2051typedef ndmp_mover_close_reply ndmp_mover_close_reply_v2;
2052typedef ndmp_mover_close_reply ndmp_mover_close_reply_v3;
2053typedef ndmp_mover_close_reply ndmp_mover_close_reply_v4;
2054typedef ndmp_mover_connect_reply_v3 ndmp_mover_connect_reply_v4;
2055
2056
2057/* DATA */
2058typedef ndmp_data_get_state_reply ndmp_data_get_state_reply_v2;
2059typedef ndmp_data_start_backup_request ndmp_data_start_backup_request_v2;
2060typedef ndmp_data_start_backup_request_v3 ndmp_data_start_backup_request_v4;
2061typedef ndmp_data_start_backup_reply ndmp_data_start_backup_reply_v2;
2062typedef ndmp_data_start_backup_reply ndmp_data_start_backup_reply_v3;
2063typedef ndmp_data_start_backup_reply ndmp_data_start_backup_reply_v4;
2064typedef ndmp_name ndmp_name_v2;
2065typedef ndmp_data_start_recover_request ndmp_data_start_recover_request_v2;
2066typedef ndmp_data_start_recover_request_v3 ndmp_data_start_recover_request_v4;
2067typedef ndmp_data_start_recover_reply ndmp_data_start_recover_reply_v2;
2068typedef ndmp_data_start_recover_reply ndmp_data_start_recover_reply_v3;
2069typedef ndmp_data_start_recover_reply ndmp_data_start_recover_reply_v4;
2070typedef ndmp_data_start_recover_reply ndmp_data_start_recover_filehist_reply_v4;
2071typedef ndmp_data_abort_reply ndmp_data_abort_reply_v2;
2072typedef ndmp_data_abort_reply ndmp_data_abort_reply_v3;
2073typedef ndmp_data_abort_reply ndmp_data_abort_reply_v4;
2074typedef ndmp_data_stop_reply ndmp_data_stop_reply_v2;
2075typedef ndmp_data_stop_reply ndmp_data_stop_reply_v3;
2076typedef ndmp_data_stop_reply ndmp_data_stop_reply_v4;
2077typedef ndmp_data_get_env_reply ndmp_data_get_env_reply_v2;
2078typedef ndmp_data_get_env_reply ndmp_data_get_env_reply_v3;
2079typedef ndmp_data_get_env_reply ndmp_data_get_env_reply_v4;
2080typedef ndmp_data_listen_request_v3 ndmp_data_listen_request_v4;
2081typedef ndmp_data_connect_reply_v3 ndmp_data_connect_reply_v4;
2082
2083
2084/* NOTIFY */
2085typedef ndmp_notify_data_halted_request ndmp_notify_data_halted_request_v2;
2086typedef ndmp_notify_data_halted_request ndmp_notify_data_halted_request_v3;
2087typedef ndmp_notify_connected_request ndmp_notify_connection_status_request_v2;
2088typedef ndmp_notify_connected_request ndmp_notify_connection_status_request_v3;
2089typedef ndmp_notify_connected_request ndmp_notify_connection_status_request_v4;
2090typedef ndmp_notify_mover_paused_request ndmp_notify_mover_paused_request_v2;
2091typedef ndmp_notify_mover_paused_request ndmp_notify_mover_paused_request_v3;
2092typedef ndmp_notify_mover_paused_request ndmp_notify_mover_paused_request_v4;
2093typedef ndmp_notify_mover_halted_request ndmp_notify_mover_halted_request_v2;
2094typedef ndmp_notify_mover_halted_request ndmp_notify_mover_halted_request_v3;
2095typedef ndmp_notify_data_read_request ndmp_notify_data_read_request_v2;
2096typedef ndmp_notify_data_read_request ndmp_notify_data_read_request_v3;
2097typedef ndmp_notify_data_read_request ndmp_notify_data_read_request_v4;
2098
2099
2100/* LOG */
2101typedef ndmp_log_log_request ndmp_log_log_request_v2;
2102typedef ndmp_log_log_request ndmp_log_log_request_v3;
2103typedef ndmp_log_log_request ndmp_log_log_request_v4;
2104typedef ndmp_log_debug_request ndmp_log_debug_request_v2;
2105typedef ndmp_log_debug_request ndmp_log_debug_request_v3;
2106typedef ndmp_log_debug_request ndmp_log_debug_request_v4;
2107typedef ndmp_log_file_request ndmp_log_file_request_v2;
2108
2109
2110/* FILE HISTORY */
2111typedef ndmp_file_v3 ndmp_file;
2112typedef ndmp_dir_v3 ndmp_dir;
2113typedef ndmp_node_v3 ndmp_node;
2114typedef ndmp_fh_add_unix_path_request ndmp_fh_add_unix_path_request_v2;
2115typedef ndmp_fh_add_unix_path_request ndmp_fh_add_unix_path_request_v3;
2116typedef ndmp_fh_add_file_request_v3 ndmp_fh_add_file_request_v4;
2117typedef ndmp_fh_add_unix_dir_request ndmp_fh_add_unix_dir_request_v2;
2118typedef ndmp_fh_add_unix_dir_request ndmp_fh_add_unix_dir_request_v3;
2119typedef ndmp_fh_add_dir_request_v3 ndmp_fh_add_dir_request_v4;
2120typedef ndmp_fh_add_unix_node_request ndmp_fh_add_unix_node_request_v2;
2121typedef ndmp_fh_add_unix_node_request ndmp_fh_add_unix_node_request_v3;
2122typedef 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