3 * Traakan, Inc., Los Altos, CA
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice unmodified, this list of conditions, and the following
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 * Description : NDMP protocol rpcgen file.
44 * Copyright (c) 1999 Intelliguard Software, Network Appliance.
45 * All Rights Reserved.
47 * $Id: ndmp.x,v 1.11 1998/05/26 03:52:12 tim Exp $
50 %#ifndef NDMOS_OPTION_NO_NDMP3
53 const NDMP3PORT = 10000;
55 %#define ndmp3_u_quad unsigned long long
56 %extern bool_t xdr_ndmp3_u_quad();
72 NDMP3_NO_ERR, /* No error */
73 NDMP3_NOT_SUPPORTED_ERR, /* Call is not supported */
74 NDMP3_DEVICE_BUSY_ERR, /* The device is in use */
75 NDMP3_DEVICE_OPENED_ERR, /* Another tape or scsi device
77 NDMP3_NOT_AUTHORIZED_ERR, /* connection has not been authorized*/
78 NDMP3_PERMISSION_ERR, /* some sort of permission problem */
79 NDMP3_DEV_NOT_OPEN_ERR, /* SCSI device is not open */
80 NDMP3_IO_ERR, /* I/O error */
81 NDMP3_TIMEOUT_ERR, /* command timed out */
82 NDMP3_ILLEGAL_ARGS_ERR, /* illegal arguments in request */
83 NDMP3_NO_TAPE_LOADED_ERR, /* Cannot open because there is
85 NDMP3_WRITE_PROTECT_ERR, /* tape cannot be open for write */
86 NDMP3_EOF_ERR, /* Command encountered EOF */
87 NDMP3_EOM_ERR, /* Command encountered EOM */
88 NDMP3_FILE_NOT_FOUND_ERR, /* File not found during restore */
89 NDMP3_BAD_FILE_ERR, /* The file descriptor is invalid */
90 NDMP3_NO_DEVICE_ERR, /* The device is not at that target */
91 NDMP3_NO_BUS_ERR, /* Invalid controller */
92 NDMP3_XDR_DECODE_ERR, /* Can't decode the request argument */
93 NDMP3_ILLEGAL_STATE_ERR, /* Call can't be done at this state */
94 NDMP3_UNDEFINED_ERR, /* Undefined Error */
95 NDMP3_XDR_ENCODE_ERR, /* Can't encode the reply argument */
96 NDMP3_NO_MEM_ERR, /* no memory */
97 NDMP3_CONNECT_ERR /* Error connecting to another
101 enum ndmp3_header_message_type
103 NDMP3_MESSAGE_REQUEST,
109 NDMP3_CONNECT_OPEN = 0x900, /* CONNECT INTERFACE */
110 NDMP3_CONNECT_CLIENT_AUTH = 0x901,
111 NDMP3_CONNECT_CLOSE = 0x902,
112 NDMP3_CONNECT_SERVER_AUTH = 0x903,
114 NDMP3_CONFIG_GET_HOST_INFO = 0x100, /* CONFIG INTERFACE */
115 NDMP3_CONFIG_GET_CONNECTION_TYPE = 0x102, /* NDMP2_CONFIG_GET_MOVER_TYPE on v2*/
116 NDMP3_CONFIG_GET_AUTH_ATTR = 0x103,
117 NDMP3_CONFIG_GET_BUTYPE_INFO = 0x104, /* new from v3 */
118 NDMP3_CONFIG_GET_FS_INFO = 0x105, /* new from v3 */
119 NDMP3_CONFIG_GET_TAPE_INFO = 0x106, /* new from v3 */
120 NDMP3_CONFIG_GET_SCSI_INFO = 0x107, /* new from v3 */
121 NDMP3_CONFIG_GET_SERVER_INFO =0x108, /* new from v3 */
123 NDMP3_SCSI_OPEN = 0x200, /* SCSI INTERFACE */
124 NDMP3_SCSI_CLOSE = 0x201,
125 NDMP3_SCSI_GET_STATE = 0x202,
126 NDMP3_SCSI_SET_TARGET = 0x203,
127 NDMP3_SCSI_RESET_DEVICE = 0x204,
128 NDMP3_SCSI_RESET_BUS = 0x205,
129 NDMP3_SCSI_EXECUTE_CDB = 0x206,
131 NDMP3_TAPE_OPEN = 0x300, /* TAPE INTERFACE */
132 NDMP3_TAPE_CLOSE = 0x301,
133 NDMP3_TAPE_GET_STATE = 0x302,
134 NDMP3_TAPE_MTIO = 0x303,
135 NDMP3_TAPE_WRITE = 0x304,
136 NDMP3_TAPE_READ = 0x305,
137 NDMP3_TAPE_EXECUTE_CDB = 0x307,
139 NDMP3_DATA_GET_STATE = 0x400, /* DATA INTERFACE */
140 NDMP3_DATA_START_BACKUP = 0x401,
141 NDMP3_DATA_START_RECOVER = 0x402,
142 NDMP3_DATA_ABORT = 0x403,
143 NDMP3_DATA_GET_ENV = 0x404,
144 NDMP3_DATA_STOP = 0x407,
145 NDMP3_DATA_LISTEN = 0x409, /* new from V3 */
146 NDMP3_DATA_CONNECT = 0x40a, /* new from V3 */
147 NDMP3_DATA_START_RECOVER_FILEHIST = 0x40b, /* same as V3.1 */
149 NDMP3_NOTIFY_DATA_HALTED =0x501,/* NOTIFY INTERFACE */
150 NDMP3_NOTIFY_CONNECTED = 0x502,
151 NDMP3_NOTIFY_MOVER_HALTED = 0x503,
152 NDMP3_NOTIFY_MOVER_PAUSED = 0x504,
153 NDMP3_NOTIFY_DATA_READ =0x505,
155 NDMP3_LOG_FILE = 0x602, /* LOGGING INTERFACE */
156 NDMP3_LOG_MESSAGE = 0x603, /* new from v3 */
158 NDMP3_FH_ADD_FILE = 0x703, /* FILE HISTORY INTERFACE */
159 NDMP3_FH_ADD_DIR = 0x704,
160 NDMP3_FH_ADD_NODE = 0x705,
162 NDMP3_MOVER_GET_STATE = 0xa00, /* MOVER INTERFACE */
163 NDMP3_MOVER_LISTEN = 0xa01,
164 NDMP3_MOVER_CONTINUE = 0xa02,
165 NDMP3_MOVER_ABORT = 0xa03,
166 NDMP3_MOVER_STOP = 0xa04,
167 NDMP3_MOVER_SET_WINDOW = 0xa05,
168 NDMP3_MOVER_READ = 0xa06,
169 NDMP3_MOVER_CLOSE =0xa07,
170 NDMP3_MOVER_SET_RECORD_SIZE =0xa08,
171 NDMP3_MOVER_CONNECT =0xa09, /* new from V3 */
174 NDMP3_VENDORS_BASE = 0xf000, /* Reserved for the vendor
176 * from 0xf000 to 0xfeff */
178 NDMP3_RESERVED_BASE = 0xff00 /* Reserved for prototyping
179 * from 0xff00 to 0xffff */
184 u_long sequence; /* monotonically increasing */
185 u_long time_stamp; /* time stamp of message */
186 ndmp3_header_message_type message_type; /* what type of message */
187 ndmp3_message message; /* message number */
188 u_long reply_sequence; /* reply is in response to */
189 ndmp3_error error; /* communications errors */
192 /**********************/
193 /* CONNECT INTERFACE */
194 /**********************/
196 /* NDMP3_CONNECT_OPEN */
197 struct ndmp3_connect_open_request
199 u_short protocol_version; /* the version of protocol supported */
202 struct ndmp3_connect_open_reply
207 /* NDMP3_CONNECT_CLIENT_AUTH */
210 NDMP3_AUTH_NONE, /* no password is required */
211 NDMP3_AUTH_TEXT, /* the clear text password */
212 NDMP3_AUTH_MD5 /* md5 */
215 struct ndmp3_auth_text
218 string auth_password<>;
222 struct ndmp3_auth_md5
225 opaque auth_digest[16];
228 union ndmp3_auth_data switch (enum ndmp3_auth_type auth_type)
230 case NDMP3_AUTH_NONE:
232 case NDMP3_AUTH_TEXT:
233 struct ndmp3_auth_text auth_text;
235 struct ndmp3_auth_md5 auth_md5;
238 struct ndmp3_connect_client_auth_request
240 ndmp3_auth_data auth_data;
243 struct ndmp3_connect_client_auth_reply
249 /* NDMP3_CONNECT_CLOSE */
250 /* no request arguments */
251 /* no reply arguments */
253 /* NDMP3_CONNECT_SERVER_AUTH */
254 union ndmp3_auth_attr switch (enum ndmp3_auth_type auth_type)
256 case NDMP3_AUTH_NONE:
258 case NDMP3_AUTH_TEXT:
261 opaque challenge[64];
264 struct ndmp3_connect_server_auth_request
266 ndmp3_auth_attr client_attr;
269 struct ndmp3_connect_server_auth_reply
272 ndmp3_auth_data server_result;
276 /********************/
277 /* CONFIG INTERFACE */
278 /********************/
280 /* NDMP3_CONFIG_GET_HOST_INFO */
281 /* no request arguments */
282 struct ndmp3_config_get_host_info_reply
285 string hostname<>; /* host name */
286 string os_type<>; /* The O/S type (e.g. SOLARIS) */
287 string os_vers<>; /* The O/S version (e.g. 2.5) */
299 /* NDMP3_CONFIG_GET_CONNECTION_TYPE */
300 /* no request arguments */
301 struct ndmp3_config_get_connection_type_reply
304 ndmp3_addr_type addr_types<>;
307 /* NDMP3_CONFIG_GET_AUTH_ATTR */
308 struct ndmp3_config_get_auth_attr_request
310 ndmp3_auth_type auth_type;
313 struct ndmp3_config_get_auth_attr_reply
316 ndmp3_auth_attr server_attr;
319 /* NDMP3_CONFIG_GET_SERVER_INFO */
320 /* no requset arguments */
321 struct ndmp3_config_get_server_info_reply
324 string vendor_name<>;
325 string product_name<>;
326 string revision_number<>;
327 ndmp3_auth_type auth_type<>;
330 /* backup type attributes */
331 const NDMP3_BUTYPE_BACKUP_FILE_HISTORY = 0x0001;
332 const NDMP3_BUTYPE_BACKUP_FILELIST = 0x0002;
333 const NDMP3_BUTYPE_RECOVER_FILELIST = 0x0004;
334 const NDMP3_BUTYPE_BACKUP_DIRECT = 0x0008;
335 const NDMP3_BUTYPE_RECOVER_DIRECT = 0x0010;
336 const NDMP3_BUTYPE_BACKUP_INCREMENTAL = 0x0020;
337 const NDMP3_BUTYPE_RECOVER_INCREMENTAL = 0x0040;
338 const NDMP3_BUTYPE_BACKUP_UTF8 = 0x0080;
339 const NDMP3_BUTYPE_RECOVER_UTF8 = 0x0100;
340 const NDMP3_BUTYPE_RECOVER_FILE_HISTORY = 0x0200;
342 struct ndmp3_butype_info
344 string butype_name<>;
345 ndmp3_pval default_env<>;
349 /* NDMP3_CONFIG_GET_BUTYPE_INFO */
350 /* no request arguments */
351 struct ndmp3_config_get_butype_info_reply
354 ndmp3_butype_info butype_info<>;
358 const NDMP3_FS_INFO_TOTAL_SIZE_INVALID = 0x00000001;
359 const NDMP3_FS_INFO_USED_SIZE_INVALID = 0x00000002;
360 const NDMP3_FS_INFO_AVAIL_SIZE_INVALID = 0x00000004;
361 const NDMP3_FS_INFO_TOTAL_INODES_INVALID = 0x00000008;
362 const NDMP3_FS_INFO_USED_INODES_INVALID = 0x00000010;
368 string fs_logical_device<>;
369 string fs_physical_device<>;
370 ndmp3_u_quad total_size;
371 ndmp3_u_quad used_size;
372 ndmp3_u_quad avail_size;
373 ndmp3_u_quad total_inodes;
374 ndmp3_u_quad used_inodes;
379 /* NDMP3_CONFIG_GET_FS_INFO */
380 /* no request arguments */
381 struct ndmp3_config_get_fs_info_reply
384 ndmp3_fs_info fs_info<>;
387 /* NDMP3_CONFIG_GET_TAPE_INFO */
388 /* no request arguments */
389 /* tape attributes */
390 const NDMP3_TAPE_ATTR_REWIND = 0x00000001;
391 const NDMP3_TAPE_ATTR_UNLOAD = 0x00000002;
393 struct ndmp3_device_capability
397 ndmp3_pval capability<>;
400 struct ndmp3_device_info
403 ndmp3_device_capability caplist<>;
406 struct ndmp3_config_get_tape_info_reply
409 ndmp3_device_info tape_info<>;
413 /* NDMP3_CONFIG_GET_SCSI_INFO */
414 /* jukebox attributes */
415 struct ndmp3_config_get_scsi_info_reply
418 ndmp3_device_info scsi_info<>;
425 /* NDMP3_SCSI_OPEN */
426 struct ndmp3_scsi_open_request
431 struct ndmp3_scsi_open_reply
436 /* NDMP3_SCSI_CLOSE */
437 /* no request arguments */
438 struct ndmp3_scsi_close_reply
443 /* NDMP3_SCSI_GET_STATE */
444 /* no request arguments */
445 struct ndmp3_scsi_get_state_reply
448 short target_controller;
453 /* NDMP3_SCSI_SET_TARGET */
454 struct ndmp3_scsi_set_target_request
457 u_short target_controller;
462 struct ndmp3_scsi_set_target_reply
467 /* NDMP3_SCSI_RESET_DEVICE */
468 /* no request arguments */
469 struct ndmp3_scsi_reset_device_reply
474 /* NDMP3_SCSI_RESET_BUS */
475 /* no request arguments */
476 struct ndmp3_scsi_reset_bus_reply
481 /* NDMP3_SCSI_EXECUTE_CDB */
482 const NDMP3_SCSI_DATA_IN = 0x00000001; /* Expect data from SCSI device */
483 const NDMP3_SCSI_DATA_OUT = 0x00000002; /* Transfer data to SCSI device */
485 struct ndmp3_execute_cdb_request
489 u_long datain_len; /* Set for expected datain */
494 struct ndmp3_execute_cdb_reply
497 u_char status; /* SCSI status bytes */
499 opaque datain<>; /* SCSI datain */
500 opaque ext_sense<>; /* Extended sense data */
502 typedef ndmp3_execute_cdb_request ndmp3_scsi_execute_cdb_request;
503 typedef ndmp3_execute_cdb_reply ndmp3_scsi_execute_cdb_reply;
508 /* NDMP3_TAPE_OPEN */
509 enum ndmp3_tape_open_mode
511 NDMP3_TAPE_READ_MODE,
515 struct ndmp3_tape_open_request
518 ndmp3_tape_open_mode mode;
521 struct ndmp3_tape_open_reply
526 /* NDMP3_TAPE_CLOSE */
527 /* no request arguments */
528 struct ndmp3_tape_close_reply
533 /*NDMP3_TAPE_GET_STATE */
534 /* no request arguments */
535 const NDMP3_TAPE_STATE_NOREWIND = 0x0008; /* non-rewind device */
536 const NDMP3_TAPE_STATE_WR_PROT = 0x0010; /* write-protected */
537 const NDMP3_TAPE_STATE_ERROR = 0x0020; /* media error */
538 const NDMP3_TAPE_STATE_UNLOAD = 0x0040; /* tape will be unloaded when
539 * the device is closed */
542 const NDMP3_TAPE_STATE_FILE_NUM_INVALID = 0x00000001;
543 const NDMP3_TAPE_STATE_SOFT_ERRORS_INVALID = 0x00000002;
544 const NDMP3_TAPE_STATE_BLOCK_SIZE_INVALID = 0x00000004;
545 const NDMP3_TAPE_STATE_BLOCKNO_INVALID = 0x00000008;
546 const NDMP3_TAPE_STATE_TOTAL_SPACE_INVALID = 0x00000010;
547 const NDMP3_TAPE_STATE_SPACE_REMAIN_INVALID = 0x00000020;
548 const NDMP3_TAPE_STATE_PARTITION_INVALID = 0x00000040;
550 struct ndmp3_tape_get_state_reply
559 ndmp3_u_quad total_space;
560 ndmp3_u_quad space_remain;
564 /* NDMP3_TAPE_MTIO */
565 enum ndmp3_tape_mtio_op
576 struct ndmp3_tape_mtio_request
578 ndmp3_tape_mtio_op tape_op;
582 struct ndmp3_tape_mtio_reply
588 /* NDMP3_TAPE_WRITE */
589 struct ndmp3_tape_write_request
594 struct ndmp3_tape_write_reply
600 /* NDMP3_TAPE_READ */
601 struct ndmp3_tape_read_request
606 struct ndmp3_tape_read_reply
613 /* NDMP3_TAPE_EXECUTE_CDB */
614 typedef ndmp3_execute_cdb_request ndmp3_tape_execute_cdb_request;
615 typedef ndmp3_execute_cdb_reply ndmp3_tape_execute_cdb_reply;
618 /********************************/
619 /* MOVER INTERFACE */
620 /********************************/
621 /* NDMP3_MOVER_GET_STATE */
622 enum ndmp3_mover_state
624 NDMP3_MOVER_STATE_IDLE,
625 NDMP3_MOVER_STATE_LISTEN,
626 NDMP3_MOVER_STATE_ACTIVE,
627 NDMP3_MOVER_STATE_PAUSED,
628 NDMP3_MOVER_STATE_HALTED
631 enum ndmp3_mover_pause_reason
633 NDMP3_MOVER_PAUSE_NA,
634 NDMP3_MOVER_PAUSE_EOM,
635 NDMP3_MOVER_PAUSE_EOF,
636 NDMP3_MOVER_PAUSE_SEEK,
637 NDMP3_MOVER_PAUSE_MEDIA_ERROR,
638 NDMP3_MOVER_PAUSE_EOW
641 enum ndmp3_mover_halt_reason
644 NDMP3_MOVER_HALT_CONNECT_CLOSED,
645 NDMP3_MOVER_HALT_ABORTED,
646 NDMP3_MOVER_HALT_INTERNAL_ERROR,
647 NDMP3_MOVER_HALT_CONNECT_ERROR
651 enum ndmp3_mover_mode
653 NDMP3_MOVER_MODE_READ, /* read from data connection; write to tape */
654 NDMP3_MOVER_MODE_WRITE /* write to data connection; read from tape */
657 struct ndmp3_tcp_addr
668 struct ndmp3_ipc_addr
672 union ndmp3_addr switch (ndmp3_addr_type addr_type)
674 case NDMP3_ADDR_LOCAL:
677 ndmp3_tcp_addr tcp_addr;
679 ndmp3_fc_addr fc_addr;
681 ndmp3_ipc_addr ipc_addr;
685 /* no request arguments */
686 struct ndmp3_mover_get_state_reply
689 ndmp3_mover_state state;
690 ndmp3_mover_pause_reason pause_reason;
691 ndmp3_mover_halt_reason halt_reason;
694 ndmp3_u_quad data_written;
695 ndmp3_u_quad seek_position;
696 ndmp3_u_quad bytes_left_to_read;
697 ndmp3_u_quad window_offset;
698 ndmp3_u_quad window_length;
699 ndmp3_addr data_connection_addr;
702 /* NDMP3_MOVER_LISTEN */
703 struct ndmp3_mover_listen_request
705 ndmp3_mover_mode mode;
706 ndmp3_addr_type addr_type;
709 struct ndmp3_mover_listen_reply
712 ndmp3_addr data_connection_addr;
715 /* NDMP3_MOVER_CONNECT */
716 struct ndmp3_mover_connect_request
718 ndmp3_mover_mode mode;
722 struct ndmp3_mover_connect_reply
726 /* NDMP3_MOVER_SET_RECORD_SIZE */
727 struct ndmp3_mover_set_record_size_request
732 struct ndmp3_mover_set_record_size_reply
737 /* NDMP3_MOVER_SET_WINDOW */
738 struct ndmp3_mover_set_window_request
744 struct ndmp3_mover_set_window_reply
749 /* NDMP3_MOVER_CONTINUE */
750 /* no request arguments */
751 struct ndmp3_mover_continue_reply
757 /* NDMP3_MOVER_ABORT */
758 /* no request arguments */
759 struct ndmp3_mover_abort_reply
764 /* NDMP3_MOVER_STOP */
765 /* no request arguments */
766 struct ndmp3_mover_stop_reply
771 /* NDMP3_MOVER_READ */
772 struct ndmp3_mover_read_request
778 struct ndmp3_mover_read_reply
783 /* NDMP3_MOVER_CLOSE */
784 /* no request arguments */
785 struct ndmp3_mover_close_reply
790 /********************************/
792 /********************************/
793 /* NDMP3_DATA_GET_STATE */
794 /* no request arguments */
795 enum ndmp3_data_operation
797 NDMP3_DATA_OP_NOACTION,
798 NDMP3_DATA_OP_BACKUP,
799 NDMP3_DATA_OP_RESTORE,
800 NDMP3_DATA_OP_RESTORE_FILEHIST
803 enum ndmp3_data_state
805 NDMP3_DATA_STATE_IDLE,
806 NDMP3_DATA_STATE_ACTIVE,
807 NDMP3_DATA_STATE_HALTED,
808 NDMP3_DATA_STATE_LISTEN,
809 NDMP3_DATA_STATE_CONNECTED
812 enum ndmp3_data_halt_reason
815 NDMP3_DATA_HALT_SUCCESSFUL,
816 NDMP3_DATA_HALT_ABORTED,
817 NDMP3_DATA_HALT_INTERNAL_ERROR,
818 NDMP3_DATA_HALT_CONNECT_ERROR
822 const NDMP3_DATA_STATE_EST_BYTES_REMAIN_INVALID = 0x00000001;
823 const NDMP3_DATA_STATE_EST_TIME_REMAIN_INVALID = 0x00000002;
825 struct ndmp3_data_get_state_reply
829 ndmp3_data_operation operation;
830 ndmp3_data_state state;
831 ndmp3_data_halt_reason halt_reason;
832 ndmp3_u_quad bytes_processed;
833 ndmp3_u_quad est_bytes_remain;
834 u_long est_time_remain;
835 ndmp3_addr data_connection_addr;
836 ndmp3_u_quad read_offset;
837 ndmp3_u_quad read_length;
840 /* NDMP3_DATA_START_BACKUP */
841 struct ndmp3_data_start_backup_request
843 string bu_type<>; /* backup method to use */
844 ndmp3_pval env<>; /* Parameters that may modify backup */
847 struct ndmp3_data_start_backup_reply
852 /* NDMP3_DATA_START_RECOVER */
855 string original_path<>;
856 string destination_dir<>;
857 string new_name<>; /* Direct access restore only */
858 string other_name<>; /* Direct access restore only */
859 ndmp3_u_quad node; /* Direct access restore only */
860 ndmp3_u_quad fh_info; /* Direct access restore only */
863 struct ndmp3_data_start_recover_request
870 struct ndmp3_data_start_recover_reply
875 /* NDMP3_DATA_START_RECOVER_FILEHIST */
876 typedef ndmp3_data_start_recover_request ndmp3_data_start_recover_filehist_request;
877 typedef ndmp3_data_start_recover_reply ndmp3_data_start_recover_filehist_reply;
880 /* NDMP3_DATA_ABORT */
881 /* no request arguments */
882 struct ndmp3_data_abort_reply
887 /* NDMP3_DATA_STOP */
888 /* no request arguments */
889 struct ndmp3_data_stop_reply
894 /* NDMP3_DATA_GET_ENV */
895 /* no request arguments */
896 struct ndmp3_data_get_env_reply
902 /* NDMP3_DATA_LISTEN */
903 struct ndmp3_data_listen_request
905 ndmp3_addr_type addr_type;
908 struct ndmp3_data_listen_reply
911 ndmp3_addr data_connection_addr;
914 /* NDMP3_DATA_CONNECT */
915 struct ndmp3_data_connect_request
919 struct ndmp3_data_connect_reply
924 /****************************************/
925 /* NOTIFY INTERFACE */
926 /****************************************/
927 /* NDMP3_NOTIFY_DATA_HALTED */
928 struct ndmp3_notify_data_halted_request
930 ndmp3_data_halt_reason reason;
931 string text_reason<>;
934 /* NDMP3_NOTIFY_CONNECTED */
935 enum ndmp3_connect_reason
937 NDMP3_CONNECTED, /* Connect sucessfully */
938 NDMP3_SHUTDOWN, /* Connection shutdown */
939 NDMP3_REFUSED /* reach the maximum number of connections */
942 struct ndmp3_notify_connected_request
944 ndmp3_connect_reason reason;
945 u_short protocol_version;
946 string text_reason<>;
949 /* NDMP3_NOTIFY_MOVER_PAUSED */
950 struct ndmp3_notify_mover_paused_request
952 ndmp3_mover_pause_reason reason;
953 ndmp3_u_quad seek_position;
957 /* NDMP3_NOTIFY_MOVER_HALTED */
958 struct ndmp3_notify_mover_halted_request
960 ndmp3_mover_halt_reason reason;
961 string text_reason<>;
965 /* NDMP3_NOTIFY_DATA_READ */
966 struct ndmp3_notify_data_read_request
973 /********************************/
975 /********************************/
976 /* NDMP3_LOG_MESSAGE */
986 struct ndmp3_log_message_request
988 ndmp3_log_type log_type;
995 struct ndmp3_log_file_request
1003 /*****************************/
1004 /* File History INTERFACE */
1005 /*****************************/
1006 /* NDMP3_FH_ADD_FILE */
1009 NDMP3_FS_UNIX, /* UNIX */
1010 NDMP3_FS_NT, /* NT */
1014 typedef string ndmp3_path<>;
1015 struct ndmp3_nt_path
1018 ndmp3_path dos_path;
1021 union ndmp3_file_name switch (ndmp3_fs_type fs_type)
1024 ndmp3_path unix_name;
1026 ndmp3_nt_path nt_name;
1028 ndmp3_path other_name;
1031 enum ndmp3_file_type
1040 NDMP3_FILE_REGISTRY,
1045 const NDMP3_FILE_STAT_ATIME_INVALID = 0x00000001;
1046 const NDMP3_FILE_STAT_CTIME_INVALID = 0x00000002;
1047 const NDMP3_FILE_STAT_GROUP_INVALID = 0x00000004;
1049 struct ndmp3_file_stat
1052 ndmp3_fs_type fs_type;
1053 ndmp3_file_type ftype;
1057 u_long owner; /* uid for UNIX, owner for NT */
1058 u_long group; /* gid for UNIX, NA for NT */
1059 u_long fattr; /* mode for UNIX, fattr for NT */
1065 /* one file could have both UNIX and NT name and attributes */
1068 ndmp3_file_name names<>;
1069 ndmp3_file_stat stats<>;
1070 ndmp3_u_quad node; /* used for the direct access */
1071 ndmp3_u_quad fh_info;/* used for the direct access */
1074 struct ndmp3_fh_add_file_request
1080 /* NDMP3_FH_ADD_DIR */
1084 ndmp3_file_name names<>;
1086 ndmp3_u_quad parent;
1089 struct ndmp3_fh_add_dir_request
1095 /* NDMP3_FH_ADD_NODE */
1098 ndmp3_file_stat stats<>;
1100 ndmp3_u_quad fh_info;
1103 struct ndmp3_fh_add_node_request
1109 %#endif /* !NDMOS_OPTION_NO_NDMP3 */