1 /*
2  * Copyright (c) 1998,1999,2000
3  *	Traakan, Inc., Los Altos, CA
4  *	All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice unmodified, this list of conditions, and the following
11  *    disclaimer.
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.
15  *
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
26  * SUCH DAMAGE.
27  */
28 
29 /*
30  * Project:  NDMJOB
31  * Ident:    $Id: $
32  *
33  * Description:
34  *
35  */
36 
37 #ifdef  __cplusplus
38 extern "C" {
39 #endif
40 
41 #define NDMNMB_FLAG_NO_FREE	1
42 #define NDMNMB_FLAG_NO_SEND	2
43 
44 /*
45  * Most replies are regular in that 'error' is the
46  * first field. This affords certain efficiencies
47  * and conveniences in the implementation.
48  * NDMPv3 introduced replies that broke this regularity.
49  * This is used to work around such replies
50  * in areas that otherwise take advantage
51  * of the convenient regularity.
52  */
53 
54 struct ndmp3_unfortunate_error {
55 	uint32_t		invalid_probably;
56 	ndmp9_error		error;
57 };
58 
59 /*
60  * NDMNMB_IS_UNFORTUNATE_REPLY_TYPE(vers,msg)
61  */
62 #ifdef NDMOS_EFFECT_NO_NDMP3_NOR_NDMP4
63 #define NDMNMB_IS_UNFORTUNATE_REPLY_TYPE(vers,msg) 0
64 #else /* NDMOS_EFFECT_NO_NDMP3_NOR_NDMP4 */
65 #ifndef NDMOS_OPTION_NO_NDMP3
66 #define NDMNMB_IS_UNFORTUNATE_REPLY_TYPE_V3(vers,msg) \
67 	((vers) == NDMP3VER			\
68 	 && ((msg) == NDMP3_TAPE_GET_STATE	\
69 	  || (msg) == NDMP3_DATA_GET_STATE))
70 #else /* !NDMOS_OPTION_NO_NDMP3 */
71 #define NDMNMB_IS_UNFORTUNATE_REPLY_TYPE_V3(vers,msg) 0
72 #endif /* !NDMOS_OPTION_NO_NDMP3 */
73 
74 #ifndef NDMOS_OPTION_NO_NDMP4
75 #define NDMNMB_IS_UNFORTUNATE_REPLY_TYPE_V4(vers,msg) \
76 	((vers) == NDMP4VER			\
77 	 && ((msg) == NDMP4_TAPE_GET_STATE	\
78 	  || (msg) == NDMP4_DATA_GET_STATE))
79 #else /* !NDMOS_OPTION_NO_NDMP4 */
80 #define NDMNMB_IS_UNFORTUNATE_REPLY_TYPE_V4(vers,msg) 0
81 #endif /* !NDMOS_OPTION_NO_NDMP4 */
82 #define NDMNMB_IS_UNFORTUNATE_REPLY_TYPE(vers,msg) \
83 	(NDMNMB_IS_UNFORTUNATE_REPLY_TYPE_V3(vers,msg) \
84 	 || NDMNMB_IS_UNFORTUNATE_REPLY_TYPE_V4(vers,msg))
85 #endif /* NDMOS_EFFECT_NO_NDMP3_NOR_NDMP4 */
86 
87 /* 92 bytes, checked 970930 */
88 struct ndmp_msg_buf {
89 	ndmp0_header		header;
90 	unsigned char		protocol_version;
91 	unsigned char		flags;
92 	unsigned char		_pad[2];
93 	union {
94 	  ndmp0_connect_open_request ndmp0_connect_open_request_body;
95 	  ndmp0_connect_open_reply ndmp0_connect_open_reply_body;
96 	  ndmp0_notify_connected_request ndmp0_notify_connected_request_body;
97 
98 #ifndef NDMOS_OPTION_NO_NDMP2
99 	  ndmp2_error ndmp2_error_reply;
100 	  ndmp2_connect_open_request ndmp2_connect_open_request_body;
101 	  ndmp2_connect_open_reply ndmp2_connect_open_reply_body;
102 	  ndmp2_connect_client_auth_request ndmp2_connect_client_auth_request_body;
103 	  ndmp2_connect_client_auth_reply ndmp2_connect_client_auth_reply_body;
104 	  ndmp2_connect_server_auth_request ndmp2_connect_server_auth_request_body;
105 	  ndmp2_connect_server_auth_reply ndmp2_connect_server_auth_reply_body;
106 	  ndmp2_config_get_host_info_reply ndmp2_config_get_host_info_reply_body;
107 	  ndmp2_config_get_butype_attr_request ndmp2_config_get_butype_attr_request_body;
108 	  ndmp2_config_get_butype_attr_reply ndmp2_config_get_butype_attr_reply_body;
109 	  ndmp2_config_get_mover_type_reply ndmp2_config_get_mover_type_reply_body;
110 	  ndmp2_config_get_auth_attr_request ndmp2_config_get_auth_attr_request_body;
111 	  ndmp2_config_get_auth_attr_reply ndmp2_config_get_auth_attr_reply_body;
112 	  ndmp2_scsi_open_request ndmp2_scsi_open_request_body;
113 	  ndmp2_scsi_open_reply ndmp2_scsi_open_reply_body;
114 	  ndmp2_scsi_close_reply ndmp2_scsi_close_reply_body;
115 	  ndmp2_scsi_get_state_reply ndmp2_scsi_get_state_reply_body;
116 	  ndmp2_scsi_set_target_request ndmp2_scsi_set_target_request_body;
117 	  ndmp2_scsi_set_target_reply ndmp2_scsi_set_target_reply_body;
118 	  ndmp2_scsi_reset_device_reply ndmp2_scsi_reset_device_reply_body;
119 	  ndmp2_scsi_reset_bus_reply ndmp2_scsi_reset_bus_reply_body;
120 	  ndmp2_scsi_execute_cdb_request ndmp2_scsi_execute_cdb_request_body;
121 	  ndmp2_scsi_execute_cdb_reply ndmp2_scsi_execute_cdb_reply_body;
122 	  ndmp2_tape_open_request ndmp2_tape_open_request_body;
123 	  ndmp2_tape_open_reply ndmp2_tape_open_reply_body;
124 	  ndmp2_tape_close_reply ndmp2_tape_close_reply_body;
125 	  ndmp2_tape_get_state_reply ndmp2_tape_get_state_reply_body;
126 	  ndmp2_tape_mtio_request ndmp2_tape_mtio_request_body;
127 	  ndmp2_tape_mtio_reply ndmp2_tape_mtio_reply_body;
128 	  ndmp2_tape_write_request ndmp2_tape_write_request_body;
129 	  ndmp2_tape_write_reply ndmp2_tape_write_reply_body;
130 	  ndmp2_tape_read_request ndmp2_tape_read_request_body;
131 	  ndmp2_tape_read_reply ndmp2_tape_read_reply_body;
132 	  ndmp2_tape_execute_cdb_request ndmp2_tape_execute_cdb_request_body;
133 	  ndmp2_tape_execute_cdb_reply ndmp2_tape_execute_cdb_reply_body;
134 	  ndmp2_data_get_state_reply ndmp2_data_get_state_reply_body;
135 	  ndmp2_data_start_backup_request ndmp2_data_start_backup_request_body;
136 	  ndmp2_data_start_backup_reply ndmp2_data_start_backup_reply_body;
137 	  ndmp2_data_start_recover_request ndmp2_data_start_recover_request_body;
138 	  ndmp2_data_start_recover_reply ndmp2_data_start_recover_reply_body;
139 	  ndmp2_data_abort_reply ndmp2_data_abort_reply_body;
140 	  ndmp2_data_get_env_reply ndmp2_data_get_env_reply_body;
141 	  ndmp2_data_stop_reply ndmp2_data_stop_reply_body;
142 	  ndmp2_data_start_recover_filehist_request ndmp2_data_start_recover_filehist_request_body;
143 	  ndmp2_data_start_recover_filehist_reply ndmp2_data_start_recover_filehist_reply_body;
144 	  ndmp2_notify_data_halted_request ndmp2_notify_data_halted_request_body;
145 	  ndmp2_notify_connected_request ndmp2_notify_connected_request_body;
146 	  ndmp2_notify_mover_halted_request ndmp2_notify_mover_halted_request_body;
147 	  ndmp2_notify_mover_paused_request ndmp2_notify_mover_paused_request_body;
148 	  ndmp2_notify_data_read_request ndmp2_notify_data_read_request_body;
149 	  ndmp2_log_log_request ndmp2_log_log_request_body;
150 	  ndmp2_log_debug_request ndmp2_log_debug_request_body;
151 	  ndmp2_log_file_request ndmp2_log_file_request_body;
152 	  ndmp2_fh_add_unix_path_request ndmp2_fh_add_unix_path_request_body;
153 	  ndmp2_fh_add_unix_dir_request ndmp2_fh_add_unix_dir_request_body;
154 	  ndmp2_fh_add_unix_node_request ndmp2_fh_add_unix_node_request_body;
155 	  ndmp2_mover_get_state_reply ndmp2_mover_get_state_reply_body;
156 	  ndmp2_mover_listen_request ndmp2_mover_listen_request_body;
157 	  ndmp2_mover_listen_reply ndmp2_mover_listen_reply_body;
158 	  ndmp2_mover_continue_reply ndmp2_mover_continue_reply_body;
159 	  ndmp2_mover_abort_reply ndmp2_mover_abort_reply_body;
160 	  ndmp2_mover_stop_reply ndmp2_mover_stop_reply_body;
161 	  ndmp2_mover_set_window_request ndmp2_mover_set_window_request_body;
162 	  ndmp2_mover_set_window_reply ndmp2_mover_set_window_reply_body;
163 	  ndmp2_mover_read_request ndmp2_mover_read_request_body;
164 	  ndmp2_mover_read_reply ndmp2_mover_read_reply_body;
165 	  ndmp2_mover_close_reply ndmp2_mover_close_reply_body;
166 	  ndmp2_mover_set_record_size_request ndmp2_mover_set_record_size_request_body;
167 	  ndmp2_mover_set_record_size_reply ndmp2_mover_set_record_size_reply_body;
168 
169 #endif /* !NDMOS_OPTION_NO_NDMP2 */
170 
171 #ifndef NDMOS_OPTION_NO_NDMP3
172 	  ndmp3_error ndmp3_error_reply;
173 	  ndmp3_connect_open_request ndmp3_connect_open_request_body;
174 	  ndmp3_connect_open_reply ndmp3_connect_open_reply_body;
175 	  ndmp3_connect_client_auth_request ndmp3_connect_client_auth_request_body;
176 	  ndmp3_connect_client_auth_reply ndmp3_connect_client_auth_reply_body;
177 	  ndmp3_connect_server_auth_request ndmp3_connect_server_auth_request_body;
178 	  ndmp3_connect_server_auth_reply ndmp3_connect_server_auth_reply_body;
179 	  ndmp3_config_get_host_info_reply ndmp3_config_get_host_info_reply_body;
180 	  ndmp3_config_get_connection_type_reply ndmp3_config_get_connection_type_reply_body;
181 	  ndmp3_config_get_auth_attr_request ndmp3_config_get_auth_attr_request_body;
182 	  ndmp3_config_get_auth_attr_reply ndmp3_config_get_auth_attr_reply_body;
183 	  ndmp3_config_get_butype_info_reply ndmp3_config_get_butype_info_reply_body;
184 	  ndmp3_config_get_fs_info_reply ndmp3_config_get_fs_info_reply_body;
185 	  ndmp3_config_get_tape_info_reply ndmp3_config_get_tape_info_reply_body;
186 	  ndmp3_config_get_scsi_info_reply ndmp3_config_get_scsi_info_reply_body;
187 	  ndmp3_config_get_server_info_reply ndmp3_config_get_server_info_reply_body;
188 	  ndmp3_scsi_open_request ndmp3_scsi_open_request_body;
189 	  ndmp3_scsi_open_reply ndmp3_scsi_open_reply_body;
190 	  ndmp3_scsi_close_reply ndmp3_scsi_close_reply_body;
191 	  ndmp3_scsi_get_state_reply ndmp3_scsi_get_state_reply_body;
192 	  ndmp3_scsi_set_target_request ndmp3_scsi_set_target_request_body;
193 	  ndmp3_scsi_set_target_reply ndmp3_scsi_set_target_reply_body;
194 	  ndmp3_scsi_reset_device_reply ndmp3_scsi_reset_device_reply_body;
195 	  ndmp3_scsi_reset_bus_reply ndmp3_scsi_reset_bus_reply_body;
196 	  ndmp3_scsi_execute_cdb_request ndmp3_scsi_execute_cdb_request_body;
197 	  ndmp3_scsi_execute_cdb_reply ndmp3_scsi_execute_cdb_reply_body;
198 	  ndmp3_tape_open_request ndmp3_tape_open_request_body;
199 	  ndmp3_tape_open_reply ndmp3_tape_open_reply_body;
200 	  ndmp3_tape_close_reply ndmp3_tape_close_reply_body;
201 	  ndmp3_tape_get_state_reply ndmp3_tape_get_state_reply_body;
202 	  ndmp3_tape_mtio_request ndmp3_tape_mtio_request_body;
203 	  ndmp3_tape_mtio_reply ndmp3_tape_mtio_reply_body;
204 	  ndmp3_tape_write_request ndmp3_tape_write_request_body;
205 	  ndmp3_tape_write_reply ndmp3_tape_write_reply_body;
206 	  ndmp3_tape_read_request ndmp3_tape_read_request_body;
207 	  ndmp3_tape_read_reply ndmp3_tape_read_reply_body;
208 	  ndmp3_tape_execute_cdb_request ndmp3_tape_execute_cdb_request_body;
209 	  ndmp3_tape_execute_cdb_reply ndmp3_tape_execute_cdb_reply_body;
210 	  ndmp3_data_get_state_reply ndmp3_data_get_state_reply_body;
211 	  ndmp3_data_start_backup_request ndmp3_data_start_backup_request_body;
212 	  ndmp3_data_start_backup_reply ndmp3_data_start_backup_reply_body;
213 	  ndmp3_data_start_recover_request ndmp3_data_start_recover_request_body;
214 	  ndmp3_data_start_recover_reply ndmp3_data_start_recover_reply_body;
215 	  ndmp3_data_abort_reply ndmp3_data_abort_reply_body;
216 	  ndmp3_data_get_env_reply ndmp3_data_get_env_reply_body;
217 	  ndmp3_data_stop_reply ndmp3_data_stop_reply_body;
218 	  ndmp3_data_start_recover_filehist_request ndmp3_data_start_recover_filehist_request_body;
219 	  ndmp3_data_start_recover_filehist_reply ndmp3_data_start_recover_filehist_reply_body;
220 	  ndmp3_data_listen_request ndmp3_data_listen_request_body;
221 	  ndmp3_data_listen_reply ndmp3_data_listen_reply_body;
222 	  ndmp3_data_connect_request ndmp3_data_connect_request_body;
223 	  ndmp3_data_connect_reply ndmp3_data_connect_reply_body;
224 	  ndmp3_notify_data_halted_request ndmp3_notify_data_halted_request_body;
225 	  ndmp3_notify_connected_request ndmp3_notify_connected_request_body;
226 	  ndmp3_notify_mover_halted_request ndmp3_notify_mover_halted_request_body;
227 	  ndmp3_notify_mover_paused_request ndmp3_notify_mover_paused_request_body;
228 	  ndmp3_notify_data_read_request ndmp3_notify_data_read_request_body;
229 	  ndmp3_log_file_request ndmp3_log_file_request_body;
230 	  ndmp3_log_message_request ndmp3_log_message_request_body;
231 	  ndmp3_fh_add_file_request ndmp3_fh_add_file_request_body;
232 	  ndmp3_fh_add_dir_request ndmp3_fh_add_dir_request_body;
233 	  ndmp3_fh_add_node_request ndmp3_fh_add_node_request_body;
234 	  ndmp3_mover_get_state_reply ndmp3_mover_get_state_reply_body;
235 	  ndmp3_mover_listen_request ndmp3_mover_listen_request_body;
236 	  ndmp3_mover_listen_reply ndmp3_mover_listen_reply_body;
237 	  ndmp3_mover_continue_reply ndmp3_mover_continue_reply_body;
238 	  ndmp3_mover_abort_reply ndmp3_mover_abort_reply_body;
239 	  ndmp3_mover_stop_reply ndmp3_mover_stop_reply_body;
240 	  ndmp3_mover_set_window_request ndmp3_mover_set_window_request_body;
241 	  ndmp3_mover_set_window_reply ndmp3_mover_set_window_reply_body;
242 	  ndmp3_mover_read_request ndmp3_mover_read_request_body;
243 	  ndmp3_mover_read_reply ndmp3_mover_read_reply_body;
244 	  ndmp3_mover_close_reply ndmp3_mover_close_reply_body;
245 	  ndmp3_mover_set_record_size_request ndmp3_mover_set_record_size_request_body;
246 	  ndmp3_mover_set_record_size_reply ndmp3_mover_set_record_size_reply_body;
247 	  ndmp3_mover_connect_request ndmp3_mover_connect_request_body;
248 	  ndmp3_mover_connect_reply ndmp3_mover_connect_reply_body;
249 
250 #endif /* !NDMOS_OPTION_NO_NDMP3 */
251 
252 #ifndef NDMOS_OPTION_NO_NDMP4
253 	  ndmp4_error ndmp4_error_reply;
254 	  ndmp4_connect_open_request ndmp4_connect_open_request_body;
255 	  ndmp4_connect_open_reply ndmp4_connect_open_reply_body;
256 	  ndmp4_connect_client_auth_request ndmp4_connect_client_auth_request_body;
257 	  ndmp4_connect_client_auth_reply ndmp4_connect_client_auth_reply_body;
258 	  ndmp4_connect_server_auth_request ndmp4_connect_server_auth_request_body;
259 	  ndmp4_connect_server_auth_reply ndmp4_connect_server_auth_reply_body;
260 	  ndmp4_config_get_host_info_reply ndmp4_config_get_host_info_reply_body;
261 	  ndmp4_config_get_connection_type_reply ndmp4_config_get_connection_type_reply_body;
262 	  ndmp4_config_get_auth_attr_request ndmp4_config_get_auth_attr_request_body;
263 	  ndmp4_config_get_auth_attr_reply ndmp4_config_get_auth_attr_reply_body;
264 	  ndmp4_config_get_butype_info_reply ndmp4_config_get_butype_info_reply_body;
265 	  ndmp4_config_get_fs_info_reply ndmp4_config_get_fs_info_reply_body;
266 	  ndmp4_config_get_tape_info_reply ndmp4_config_get_tape_info_reply_body;
267 	  ndmp4_config_get_scsi_info_reply ndmp4_config_get_scsi_info_reply_body;
268 	  ndmp4_config_get_server_info_reply ndmp4_config_get_server_info_reply_body;
269 	  ndmp4_scsi_open_request ndmp4_scsi_open_request_body;
270 	  ndmp4_scsi_open_reply ndmp4_scsi_open_reply_body;
271 	  ndmp4_scsi_close_reply ndmp4_scsi_close_reply_body;
272 	  ndmp4_scsi_get_state_reply ndmp4_scsi_get_state_reply_body;
273 	  ndmp4_scsi_reset_device_reply ndmp4_scsi_reset_device_reply_body;
274 	  ndmp4_scsi_execute_cdb_request ndmp4_scsi_execute_cdb_request_body;
275 	  ndmp4_scsi_execute_cdb_reply ndmp4_scsi_execute_cdb_reply_body;
276 	  ndmp4_tape_open_request ndmp4_tape_open_request_body;
277 	  ndmp4_tape_open_reply ndmp4_tape_open_reply_body;
278 	  ndmp4_tape_close_reply ndmp4_tape_close_reply_body;
279 	  ndmp4_tape_get_state_reply ndmp4_tape_get_state_reply_body;
280 	  ndmp4_tape_mtio_request ndmp4_tape_mtio_request_body;
281 	  ndmp4_tape_mtio_reply ndmp4_tape_mtio_reply_body;
282 	  ndmp4_tape_write_request ndmp4_tape_write_request_body;
283 	  ndmp4_tape_write_reply ndmp4_tape_write_reply_body;
284 	  ndmp4_tape_read_request ndmp4_tape_read_request_body;
285 	  ndmp4_tape_read_reply ndmp4_tape_read_reply_body;
286 	  ndmp4_tape_execute_cdb_request ndmp4_tape_execute_cdb_request_body;
287 	  ndmp4_tape_execute_cdb_reply ndmp4_tape_execute_cdb_reply_body;
288 	  ndmp4_data_get_state_reply ndmp4_data_get_state_reply_body;
289 	  ndmp4_data_start_backup_request ndmp4_data_start_backup_request_body;
290 	  ndmp4_data_start_backup_reply ndmp4_data_start_backup_reply_body;
291 	  ndmp4_data_start_recover_request ndmp4_data_start_recover_request_body;
292 	  ndmp4_data_start_recover_reply ndmp4_data_start_recover_reply_body;
293 	  ndmp4_data_abort_reply ndmp4_data_abort_reply_body;
294 	  ndmp4_data_get_env_reply ndmp4_data_get_env_reply_body;
295 	  ndmp4_data_stop_reply ndmp4_data_stop_reply_body;
296 	  ndmp4_data_start_recover_filehist_request ndmp4_data_start_recover_filehist_request_body;
297 	  ndmp4_data_start_recover_filehist_reply ndmp4_data_start_recover_filehist_reply_body;
298 	  ndmp4_data_listen_request ndmp4_data_listen_request_body;
299 	  ndmp4_data_listen_reply ndmp4_data_listen_reply_body;
300 	  ndmp4_data_connect_request ndmp4_data_connect_request_body;
301 	  ndmp4_data_connect_reply ndmp4_data_connect_reply_body;
302 	  ndmp4_notify_data_halted_post ndmp4_notify_data_halted_post_body;
303 	  ndmp4_notify_connection_status_post ndmp4_notify_connection_status_post_body;
304 	  ndmp4_notify_mover_halted_post ndmp4_notify_mover_halted_post_body;
305 	  ndmp4_notify_mover_paused_post ndmp4_notify_mover_paused_post_body;
306 	  ndmp4_notify_data_read_post ndmp4_notify_data_read_post_body;
307 	  ndmp4_log_file_post ndmp4_log_file_post_body;
308 	  ndmp4_log_message_post ndmp4_log_message_post_body;
309 	  ndmp4_fh_add_file_post ndmp4_fh_add_file_post_body;
310 	  ndmp4_fh_add_dir_post ndmp4_fh_add_dir_post_body;
311 	  ndmp4_fh_add_node_post ndmp4_fh_add_node_post_body;
312 	  ndmp4_mover_get_state_reply ndmp4_mover_get_state_reply_body;
313 	  ndmp4_mover_listen_request ndmp4_mover_listen_request_body;
314 	  ndmp4_mover_listen_reply ndmp4_mover_listen_reply_body;
315 	  ndmp4_mover_continue_reply ndmp4_mover_continue_reply_body;
316 	  ndmp4_mover_abort_reply ndmp4_mover_abort_reply_body;
317 	  ndmp4_mover_stop_reply ndmp4_mover_stop_reply_body;
318 	  ndmp4_mover_set_window_request ndmp4_mover_set_window_request_body;
319 	  ndmp4_mover_set_window_reply ndmp4_mover_set_window_reply_body;
320 	  ndmp4_mover_read_request ndmp4_mover_read_request_body;
321 	  ndmp4_mover_read_reply ndmp4_mover_read_reply_body;
322 	  ndmp4_mover_close_reply ndmp4_mover_close_reply_body;
323 	  ndmp4_mover_set_record_size_request ndmp4_mover_set_record_size_request_body;
324 	  ndmp4_mover_set_record_size_reply ndmp4_mover_set_record_size_reply_body;
325 	  ndmp4_mover_connect_request ndmp4_mover_connect_request_body;
326 	  ndmp4_mover_connect_reply ndmp4_mover_connect_reply_body;
327 
328 #endif /* !NDMOS_OPTION_NO_NDMP4 */
329 
330 	  ndmp0_error error;
331 	  struct ndmp3_unfortunate_error unf3_error;
332 
333 	  ndmp9_error ndmp9_error_reply;
334 	  ndmp9_connect_open_request ndmp9_connect_open_request_body;
335 	  ndmp9_connect_open_reply ndmp9_connect_open_reply_body;
336 	  ndmp9_connect_close_request ndmp9_connect_close_request_body;
337 	  ndmp9_connect_close_reply ndmp9_connect_close_reply_body;
338 	  ndmp9_connect_client_auth_request ndmp9_connect_client_auth_request_body;
339 	  ndmp9_connect_client_auth_reply ndmp9_connect_client_auth_reply_body;
340 	  ndmp9_connect_server_auth_request ndmp9_connect_server_auth_request_body;
341 	  ndmp9_connect_server_auth_reply ndmp9_connect_server_auth_reply_body;
342 	  ndmp9_config_get_host_info_reply ndmp9_config_get_host_info_reply_body;
343 	  ndmp9_config_get_server_info_reply ndmp9_config_get_server_info_reply_body;
344 
345 	  ndmp9_config_get_butype_info_reply ndmp9_config_get_butype_info_reply_body;
346 	  ndmp9_config_get_fs_info_reply ndmp9_config_get_fs_info_reply_body;
347 	  ndmp9_config_get_tape_info_reply ndmp9_config_get_tape_info_reply_body;
348 	  ndmp9_config_get_scsi_info_reply ndmp9_config_get_scsi_info_reply_body;
349 	  ndmp9_config_get_info_reply ndmp9_config_get_info_reply_body;
350 	  ndmp9_config_get_auth_attr_request ndmp9_config_get_auth_attr_request_body;
351 	  ndmp9_config_get_auth_attr_reply ndmp9_config_get_auth_attr_reply_body;
352 	  ndmp9_scsi_open_request ndmp9_scsi_open_request_body;
353 	  ndmp9_scsi_open_reply ndmp9_scsi_open_reply_body;
354 	  ndmp9_scsi_close_reply ndmp9_scsi_close_reply_body;
355 	  ndmp9_scsi_get_state_reply ndmp9_scsi_get_state_reply_body;
356 	  ndmp9_scsi_set_target_request ndmp9_scsi_set_target_request_body;
357 	  ndmp9_scsi_set_target_reply ndmp9_scsi_set_target_reply_body;
358 	  ndmp9_scsi_reset_device_reply ndmp9_scsi_reset_device_reply_body;
359 	  ndmp9_scsi_reset_bus_reply ndmp9_scsi_reset_bus_reply_body;
360 	  ndmp9_scsi_execute_cdb_request ndmp9_scsi_execute_cdb_request_body;
361 	  ndmp9_scsi_execute_cdb_reply ndmp9_scsi_execute_cdb_reply_body;
362 	  ndmp9_tape_open_request ndmp9_tape_open_request_body;
363 	  ndmp9_tape_open_reply ndmp9_tape_open_reply_body;
364 	  ndmp9_tape_close_reply ndmp9_tape_close_reply_body;
365 	  ndmp9_tape_get_state_reply ndmp9_tape_get_state_reply_body;
366 	  ndmp9_tape_mtio_request ndmp9_tape_mtio_request_body;
367 	  ndmp9_tape_mtio_reply ndmp9_tape_mtio_reply_body;
368 	  ndmp9_tape_write_request ndmp9_tape_write_request_body;
369 	  ndmp9_tape_write_reply ndmp9_tape_write_reply_body;
370 	  ndmp9_tape_read_request ndmp9_tape_read_request_body;
371 	  ndmp9_tape_read_reply ndmp9_tape_read_reply_body;
372 	  ndmp9_tape_execute_cdb_request ndmp9_tape_execute_cdb_request_body;
373 	  ndmp9_tape_execute_cdb_reply ndmp9_tape_execute_cdb_reply_body;
374 	  ndmp9_data_get_state_reply ndmp9_data_get_state_reply_body;
375 	  ndmp9_data_start_backup_request ndmp9_data_start_backup_request_body;
376 	  ndmp9_data_start_backup_reply ndmp9_data_start_backup_reply_body;
377 	  ndmp9_data_start_recover_request ndmp9_data_start_recover_request_body;
378 	  ndmp9_data_start_recover_reply ndmp9_data_start_recover_reply_body;
379 	  ndmp9_data_abort_reply ndmp9_data_abort_reply_body;
380 	  ndmp9_data_get_env_reply ndmp9_data_get_env_reply_body;
381 	  ndmp9_data_stop_reply ndmp9_data_stop_reply_body;
382 	  ndmp9_data_start_recover_filehist_request ndmp9_data_start_recover_filehist_request_body;
383 	  ndmp9_data_start_recover_filehist_reply ndmp9_data_start_recover_filehist_reply_body;
384 	  ndmp9_data_listen_request ndmp9_data_listen_request_body;
385 	  ndmp9_data_listen_reply ndmp9_data_listen_reply_body;
386 	  ndmp9_data_connect_request ndmp9_data_connect_request_body;
387 	  ndmp9_data_connect_reply ndmp9_data_connect_reply_body;
388 	  ndmp9_notify_data_halted_request ndmp9_notify_data_halted_request_body;
389 	  ndmp9_notify_connected_request ndmp9_notify_connected_request_body;
390 	  ndmp9_notify_mover_halted_request ndmp9_notify_mover_halted_request_body;
391 	  ndmp9_notify_mover_paused_request ndmp9_notify_mover_paused_request_body;
392 	  ndmp9_notify_data_read_request ndmp9_notify_data_read_request_body;
393 	  ndmp9_log_file_request ndmp9_log_file_request_body;
394 	  ndmp9_log_message_request ndmp9_log_message_request_body;
395 	  ndmp9_fh_add_file_request ndmp9_fh_add_file_request_body;
396 	  ndmp9_fh_add_dir_request ndmp9_fh_add_dir_request_body;
397 	  ndmp9_fh_add_node_request ndmp9_fh_add_node_request_body;
398 	  ndmp9_mover_get_state_reply ndmp9_mover_get_state_reply_body;
399 	  ndmp9_mover_listen_request ndmp9_mover_listen_request_body;
400 	  ndmp9_mover_listen_reply ndmp9_mover_listen_reply_body;
401 	  ndmp9_mover_continue_reply ndmp9_mover_continue_reply_body;
402 	  ndmp9_mover_abort_reply ndmp9_mover_abort_reply_body;
403 	  ndmp9_mover_stop_reply ndmp9_mover_stop_reply_body;
404 	  ndmp9_mover_set_window_request ndmp9_mover_set_window_request_body;
405 	  ndmp9_mover_set_window_reply ndmp9_mover_set_window_reply_body;
406 	  ndmp9_mover_read_request ndmp9_mover_read_request_body;
407 	  ndmp9_mover_read_reply ndmp9_mover_read_reply_body;
408 	  ndmp9_mover_close_reply ndmp9_mover_close_reply_body;
409 	  ndmp9_mover_set_record_size_request ndmp9_mover_set_record_size_request_body;
410 	  ndmp9_mover_set_record_size_reply ndmp9_mover_set_record_size_reply_body;
411 	  ndmp9_mover_connect_request ndmp9_mover_connect_request_body;
412 	  ndmp9_mover_connect_reply ndmp9_mover_connect_reply_body;
413 	} body;
414 };
415 
416 struct ndmp_xa_buf {
417 	struct ndmp_msg_buf	request;
418 	struct ndmp_msg_buf	reply;
419 };
420 
421 
422 
423 #define MT_ndmp0_connect_open		NDMP0_CONNECT_OPEN
424 #define MT_ndmp0_connect_close		NDMP0_CONNECT_CLOSE
425 #define MT_ndmp0_notify_connected	NDMP0_NOTIFY_CONNECTED
426 
427 
428 #ifndef NDMOS_OPTION_NO_NDMP2
429 
430 #define MT_ndmp2_connect_open		NDMP2_CONNECT_OPEN
431 #define MT_ndmp2_connect_client_auth	NDMP2_CONNECT_CLIENT_AUTH
432 #define MT_ndmp2_connect_close		NDMP2_CONNECT_CLOSE
433 #define MT_ndmp2_connect_server_auth	NDMP2_CONNECT_SERVER_AUTH
434 #define MT_ndmp2_config_get_host_info	NDMP2_CONFIG_GET_HOST_INFO
435 #define MT_ndmp2_config_get_butype_attr	NDMP2_CONFIG_GET_BUTYPE_ATTR
436 #define MT_ndmp2_config_get_mover_type	NDMP2_CONFIG_GET_MOVER_TYPE
437 #define MT_ndmp2_config_get_auth_attr	NDMP2_CONFIG_GET_AUTH_ATTR
438 #define MT_ndmp2_scsi_open		NDMP2_SCSI_OPEN
439 #define MT_ndmp2_scsi_close		NDMP2_SCSI_CLOSE
440 #define MT_ndmp2_scsi_get_state		NDMP2_SCSI_GET_STATE
441 #define MT_ndmp2_scsi_set_target	NDMP2_SCSI_SET_TARGET
442 #define MT_ndmp2_scsi_reset_device	NDMP2_SCSI_RESET_DEVICE
443 #define MT_ndmp2_scsi_reset_bus		NDMP2_SCSI_RESET_BUS
444 #define MT_ndmp2_scsi_execute_cdb	NDMP2_SCSI_EXECUTE_CDB
445 #define MT_ndmp2_tape_open		NDMP2_TAPE_OPEN
446 #define MT_ndmp2_tape_close		NDMP2_TAPE_CLOSE
447 #define MT_ndmp2_tape_get_state		NDMP2_TAPE_GET_STATE
448 #define MT_ndmp2_tape_mtio		NDMP2_TAPE_MTIO
449 #define MT_ndmp2_tape_write		NDMP2_TAPE_WRITE
450 #define MT_ndmp2_tape_read		NDMP2_TAPE_READ
451 #define MT_ndmp2_tape_execute_cdb	NDMP2_TAPE_EXECUTE_CDB
452 #define MT_ndmp2_data_get_state		NDMP2_DATA_GET_STATE
453 #define MT_ndmp2_data_start_backup	NDMP2_DATA_START_BACKUP
454 #define MT_ndmp2_data_start_recover	NDMP2_DATA_START_RECOVER
455 #define MT_ndmp2_data_abort		NDMP2_DATA_ABORT
456 #define MT_ndmp2_data_get_env		NDMP2_DATA_GET_ENV
457 #define MT_ndmp2_data_stop		NDMP2_DATA_STOP
458 #define MT_ndmp2_data_start_recover_filehist NDMP2_DATA_START_RECOVER_FILEHIST
459 #define MT_ndmp2_notify_data_halted	NDMP2_NOTIFY_DATA_HALTED
460 #define MT_ndmp2_notify_connected	NDMP2_NOTIFY_CONNECTED
461 #define MT_ndmp2_notify_mover_halted	NDMP2_NOTIFY_MOVER_HALTED
462 #define MT_ndmp2_notify_mover_paused	NDMP2_NOTIFY_MOVER_PAUSED
463 #define MT_ndmp2_notify_data_read	NDMP2_NOTIFY_DATA_READ
464 #define MT_ndmp2_log_log		NDMP2_LOG_LOG
465 #define MT_ndmp2_log_debug		NDMP2_LOG_DEBUG
466 #define MT_ndmp2_log_file		NDMP2_LOG_FILE
467 #define MT_ndmp2_fh_add_unix_path	NDMP2_FH_ADD_UNIX_PATH
468 #define MT_ndmp2_fh_add_unix_dir	NDMP2_FH_ADD_UNIX_DIR
469 #define MT_ndmp2_fh_add_unix_node	NDMP2_FH_ADD_UNIX_NODE
470 #define MT_ndmp2_mover_get_state	NDMP2_MOVER_GET_STATE
471 #define MT_ndmp2_mover_listen		NDMP2_MOVER_LISTEN
472 #define MT_ndmp2_mover_continue		NDMP2_MOVER_CONTINUE
473 #define MT_ndmp2_mover_abort		NDMP2_MOVER_ABORT
474 #define MT_ndmp2_mover_stop		NDMP2_MOVER_STOP
475 #define MT_ndmp2_mover_set_window	NDMP2_MOVER_SET_WINDOW
476 #define MT_ndmp2_mover_read		NDMP2_MOVER_READ
477 #define MT_ndmp2_mover_close		NDMP2_MOVER_CLOSE
478 #define MT_ndmp2_mover_set_record_size	NDMP2_MOVER_SET_RECORD_SIZE
479 
480 #endif /* !NDMOS_OPTION_NO_NDMP2 */
481 
482 
483 
484 #ifndef NDMOS_OPTION_NO_NDMP3
485 
486 #define MT_ndmp3_connect_open		NDMP3_CONNECT_OPEN
487 #define MT_ndmp3_connect_client_auth	NDMP3_CONNECT_CLIENT_AUTH
488 #define MT_ndmp3_connect_close		NDMP3_CONNECT_CLOSE
489 #define MT_ndmp3_connect_server_auth	NDMP3_CONNECT_SERVER_AUTH
490 #define MT_ndmp3_config_get_host_info	NDMP3_CONFIG_GET_HOST_INFO
491 #define MT_ndmp3_config_get_connection_type NDMP3_CONFIG_GET_CONNECTION_TYPE
492 #define MT_ndmp3_config_get_auth_attr	NDMP3_CONFIG_GET_AUTH_ATTR
493 #define MT_ndmp3_config_get_butype_info	NDMP3_CONFIG_GET_BUTYPE_INFO
494 #define MT_ndmp3_config_get_fs_info	NDMP3_CONFIG_GET_FS_INFO
495 #define MT_ndmp3_config_get_tape_info	NDMP3_CONFIG_GET_TAPE_INFO
496 #define MT_ndmp3_config_get_scsi_info	NDMP3_CONFIG_GET_SCSI_INFO
497 #define MT_ndmp3_config_get_server_info	NDMP3_CONFIG_GET_SERVER_INFO
498 #define MT_ndmp3_scsi_open		NDMP3_SCSI_OPEN
499 #define MT_ndmp3_scsi_close		NDMP3_SCSI_CLOSE
500 #define MT_ndmp3_scsi_get_state		NDMP3_SCSI_GET_STATE
501 #define MT_ndmp3_scsi_set_target	NDMP3_SCSI_SET_TARGET
502 #define MT_ndmp3_scsi_reset_device	NDMP3_SCSI_RESET_DEVICE
503 #define MT_ndmp3_scsi_reset_bus		NDMP3_SCSI_RESET_BUS
504 #define MT_ndmp3_scsi_execute_cdb	NDMP3_SCSI_EXECUTE_CDB
505 #define MT_ndmp3_tape_open		NDMP3_TAPE_OPEN
506 #define MT_ndmp3_tape_close		NDMP3_TAPE_CLOSE
507 #define MT_ndmp3_tape_get_state		NDMP3_TAPE_GET_STATE
508 #define MT_ndmp3_tape_mtio		NDMP3_TAPE_MTIO
509 #define MT_ndmp3_tape_write		NDMP3_TAPE_WRITE
510 #define MT_ndmp3_tape_read		NDMP3_TAPE_READ
511 #define MT_ndmp3_tape_execute_cdb	NDMP3_TAPE_EXECUTE_CDB
512 #define MT_ndmp3_data_get_state		NDMP3_DATA_GET_STATE
513 #define MT_ndmp3_data_start_backup	NDMP3_DATA_START_BACKUP
514 #define MT_ndmp3_data_start_recover	NDMP3_DATA_START_RECOVER
515 #define MT_ndmp3_data_start_recover_filehist NDMP3_DATA_START_RECOVER_FILEHIST
516 #define MT_ndmp3_data_abort		NDMP3_DATA_ABORT
517 #define MT_ndmp3_data_get_env		NDMP3_DATA_GET_ENV
518 #define MT_ndmp3_data_stop		NDMP3_DATA_STOP
519 #define MT_ndmp3_data_listen		NDMP3_DATA_LISTEN
520 #define MT_ndmp3_data_connect		NDMP3_DATA_CONNECT
521 #define MT_ndmp3_notify_data_halted	NDMP3_NOTIFY_DATA_HALTED
522 #define MT_ndmp3_notify_connected	NDMP3_NOTIFY_CONNECTED
523 #define MT_ndmp3_notify_mover_halted	NDMP3_NOTIFY_MOVER_HALTED
524 #define MT_ndmp3_notify_mover_paused	NDMP3_NOTIFY_MOVER_PAUSED
525 #define MT_ndmp3_notify_data_read	NDMP3_NOTIFY_DATA_READ
526 #define MT_ndmp3_log_file		NDMP3_LOG_FILE
527 #define MT_ndmp3_log_message		NDMP3_LOG_MESSAGE
528 #define MT_ndmp3_fh_add_file		NDMP3_FH_ADD_FILE
529 #define MT_ndmp3_fh_add_dir		NDMP3_FH_ADD_DIR
530 #define MT_ndmp3_fh_add_node		NDMP3_FH_ADD_NODE
531 #define MT_ndmp3_mover_get_state	NDMP3_MOVER_GET_STATE
532 #define MT_ndmp3_mover_listen		NDMP3_MOVER_LISTEN
533 #define MT_ndmp3_mover_continue		NDMP3_MOVER_CONTINUE
534 #define MT_ndmp3_mover_abort		NDMP3_MOVER_ABORT
535 #define MT_ndmp3_mover_stop		NDMP3_MOVER_STOP
536 #define MT_ndmp3_mover_set_window	NDMP3_MOVER_SET_WINDOW
537 #define MT_ndmp3_mover_read		NDMP3_MOVER_READ
538 #define MT_ndmp3_mover_close		NDMP3_MOVER_CLOSE
539 #define MT_ndmp3_mover_set_record_size	NDMP3_MOVER_SET_RECORD_SIZE
540 #define MT_ndmp3_mover_connect		NDMP3_MOVER_CONNECT
541 
542 #endif /* !NDMOS_OPTION_NO_NDMP3 */
543 
544 
545 
546 #ifndef NDMOS_OPTION_NO_NDMP4
547 
548 #define MT_ndmp4_connect_open		NDMP4_CONNECT_OPEN
549 #define MT_ndmp4_connect_client_auth	NDMP4_CONNECT_CLIENT_AUTH
550 #define MT_ndmp4_connect_close		NDMP4_CONNECT_CLOSE
551 #define MT_ndmp4_connect_server_auth	NDMP4_CONNECT_SERVER_AUTH
552 #define MT_ndmp4_config_get_host_info	NDMP4_CONFIG_GET_HOST_INFO
553 #define MT_ndmp4_config_get_connection_type NDMP4_CONFIG_GET_CONNECTION_TYPE
554 #define MT_ndmp4_config_get_auth_attr	NDMP4_CONFIG_GET_AUTH_ATTR
555 #define MT_ndmp4_config_get_butype_info	NDMP4_CONFIG_GET_BUTYPE_INFO
556 #define MT_ndmp4_config_get_fs_info	NDMP4_CONFIG_GET_FS_INFO
557 #define MT_ndmp4_config_get_tape_info	NDMP4_CONFIG_GET_TAPE_INFO
558 #define MT_ndmp4_config_get_scsi_info	NDMP4_CONFIG_GET_SCSI_INFO
559 #define MT_ndmp4_config_get_server_info	NDMP4_CONFIG_GET_SERVER_INFO
560 #define MT_ndmp4_scsi_open		NDMP4_SCSI_OPEN
561 #define MT_ndmp4_scsi_close		NDMP4_SCSI_CLOSE
562 #define MT_ndmp4_scsi_get_state		NDMP4_SCSI_GET_STATE
563 #define MT_ndmp4_scsi_reset_device	NDMP4_SCSI_RESET_DEVICE
564 #define MT_ndmp4_scsi_execute_cdb	NDMP4_SCSI_EXECUTE_CDB
565 #define MT_ndmp4_tape_open		NDMP4_TAPE_OPEN
566 #define MT_ndmp4_tape_close		NDMP4_TAPE_CLOSE
567 #define MT_ndmp4_tape_get_state		NDMP4_TAPE_GET_STATE
568 #define MT_ndmp4_tape_mtio		NDMP4_TAPE_MTIO
569 #define MT_ndmp4_tape_write		NDMP4_TAPE_WRITE
570 #define MT_ndmp4_tape_read		NDMP4_TAPE_READ
571 #define MT_ndmp4_tape_execute_cdb	NDMP4_TAPE_EXECUTE_CDB
572 #define MT_ndmp4_data_get_state		NDMP4_DATA_GET_STATE
573 #define MT_ndmp4_data_start_backup	NDMP4_DATA_START_BACKUP
574 #define MT_ndmp4_data_start_recover	NDMP4_DATA_START_RECOVER
575 #define MT_ndmp4_data_start_recover_filehist NDMP4_DATA_START_RECOVER_FILEHIST
576 #define MT_ndmp4_data_abort		NDMP4_DATA_ABORT
577 #define MT_ndmp4_data_get_env		NDMP4_DATA_GET_ENV
578 #define MT_ndmp4_data_stop		NDMP4_DATA_STOP
579 #define MT_ndmp4_data_listen		NDMP4_DATA_LISTEN
580 #define MT_ndmp4_data_connect		NDMP4_DATA_CONNECT
581 #define MT_ndmp4_notify_data_halted	NDMP4_NOTIFY_DATA_HALTED
582 #define MT_ndmp4_notify_connection_status NDMP4_NOTIFY_CONNECTION_STATUS
583 #define MT_ndmp4_notify_mover_halted	NDMP4_NOTIFY_MOVER_HALTED
584 #define MT_ndmp4_notify_mover_paused	NDMP4_NOTIFY_MOVER_PAUSED
585 #define MT_ndmp4_notify_data_read	NDMP4_NOTIFY_DATA_READ
586 #define MT_ndmp4_log_file		NDMP4_LOG_FILE
587 #define MT_ndmp4_log_message		NDMP4_LOG_MESSAGE
588 #define MT_ndmp4_fh_add_file		NDMP4_FH_ADD_FILE
589 #define MT_ndmp4_fh_add_dir		NDMP4_FH_ADD_DIR
590 #define MT_ndmp4_fh_add_node		NDMP4_FH_ADD_NODE
591 #define MT_ndmp4_mover_get_state	NDMP4_MOVER_GET_STATE
592 #define MT_ndmp4_mover_listen		NDMP4_MOVER_LISTEN
593 #define MT_ndmp4_mover_continue		NDMP4_MOVER_CONTINUE
594 #define MT_ndmp4_mover_abort		NDMP4_MOVER_ABORT
595 #define MT_ndmp4_mover_stop		NDMP4_MOVER_STOP
596 #define MT_ndmp4_mover_set_window	NDMP4_MOVER_SET_WINDOW
597 #define MT_ndmp4_mover_read		NDMP4_MOVER_READ
598 #define MT_ndmp4_mover_close		NDMP4_MOVER_CLOSE
599 #define MT_ndmp4_mover_set_record_size	NDMP4_MOVER_SET_RECORD_SIZE
600 #define MT_ndmp4_mover_connect		NDMP4_MOVER_CONNECT
601 
602 #endif /* !NDMOS_OPTION_NO_NDMP4 */
603 
604 
605 
606 
607 #define MT_ndmp9_connect_open		NDMP9_CONNECT_OPEN
608 #define MT_ndmp9_connect_client_auth	NDMP9_CONNECT_CLIENT_AUTH
609 #define MT_ndmp9_connect_close		NDMP9_CONNECT_CLOSE
610 #define MT_ndmp9_connect_server_auth	NDMP9_CONNECT_SERVER_AUTH
611 #define MT_ndmp9_config_get_host_info	NDMP9_CONFIG_GET_HOST_INFO
612 #define MT_ndmp9_config_get_connection_type NDMP9_CONFIG_GET_CONNECTION_TYPE
613 #define MT_ndmp9_config_get_auth_attr	NDMP9_CONFIG_GET_AUTH_ATTR
614 #define MT_ndmp9_config_get_butype_info	NDMP9_CONFIG_GET_BUTYPE_INFO
615 #define MT_ndmp9_config_get_fs_info	NDMP9_CONFIG_GET_FS_INFO
616 #define MT_ndmp9_config_get_tape_info	NDMP9_CONFIG_GET_TAPE_INFO
617 #define MT_ndmp9_config_get_scsi_info	NDMP9_CONFIG_GET_SCSI_INFO
618 #define MT_ndmp9_config_get_server_info	NDMP9_CONFIG_GET_SERVER_INFO
619 #define MT_ndmp9_scsi_open		NDMP9_SCSI_OPEN
620 #define MT_ndmp9_scsi_close		NDMP9_SCSI_CLOSE
621 #define MT_ndmp9_scsi_get_state		NDMP9_SCSI_GET_STATE
622 #define MT_ndmp9_scsi_set_target	NDMP9_SCSI_SET_TARGET
623 #define MT_ndmp9_scsi_reset_device	NDMP9_SCSI_RESET_DEVICE
624 #define MT_ndmp9_scsi_reset_bus		NDMP9_SCSI_RESET_BUS
625 #define MT_ndmp9_scsi_execute_cdb	NDMP9_SCSI_EXECUTE_CDB
626 #define MT_ndmp9_tape_open		NDMP9_TAPE_OPEN
627 #define MT_ndmp9_tape_close		NDMP9_TAPE_CLOSE
628 #define MT_ndmp9_tape_get_state		NDMP9_TAPE_GET_STATE
629 #define MT_ndmp9_tape_mtio		NDMP9_TAPE_MTIO
630 #define MT_ndmp9_tape_write		NDMP9_TAPE_WRITE
631 #define MT_ndmp9_tape_read		NDMP9_TAPE_READ
632 #define MT_ndmp9_tape_execute_cdb	NDMP9_TAPE_EXECUTE_CDB
633 #define MT_ndmp9_data_get_state		NDMP9_DATA_GET_STATE
634 #define MT_ndmp9_data_start_backup	NDMP9_DATA_START_BACKUP
635 #define MT_ndmp9_data_start_recover	NDMP9_DATA_START_RECOVER
636 #define MT_ndmp9_data_start_recover_filehist NDMP9_DATA_START_RECOVER_FILEHIST
637 #define MT_ndmp9_data_abort		NDMP9_DATA_ABORT
638 #define MT_ndmp9_data_get_env		NDMP9_DATA_GET_ENV
639 #define MT_ndmp9_data_stop		NDMP9_DATA_STOP
640 #define MT_ndmp9_data_listen		NDMP9_DATA_LISTEN
641 #define MT_ndmp9_data_connect		NDMP9_DATA_CONNECT
642 #define MT_ndmp9_notify_data_halted	NDMP9_NOTIFY_DATA_HALTED
643 #define MT_ndmp9_notify_connected	NDMP9_NOTIFY_CONNECTED
644 #define MT_ndmp9_notify_mover_halted	NDMP9_NOTIFY_MOVER_HALTED
645 #define MT_ndmp9_notify_mover_paused	NDMP9_NOTIFY_MOVER_PAUSED
646 #define MT_ndmp9_notify_data_read	NDMP9_NOTIFY_DATA_READ
647 #define MT_ndmp9_log_file		NDMP9_LOG_FILE
648 #define MT_ndmp9_log_message		NDMP9_LOG_MESSAGE
649 #define MT_ndmp9_fh_add_file		NDMP9_FH_ADD_FILE
650 #define MT_ndmp9_fh_add_dir		NDMP9_FH_ADD_DIR
651 #define MT_ndmp9_fh_add_node		NDMP9_FH_ADD_NODE
652 #define MT_ndmp9_mover_get_state	NDMP9_MOVER_GET_STATE
653 #define MT_ndmp9_mover_listen		NDMP9_MOVER_LISTEN
654 #define MT_ndmp9_mover_continue		NDMP9_MOVER_CONTINUE
655 #define MT_ndmp9_mover_abort		NDMP9_MOVER_ABORT
656 #define MT_ndmp9_mover_stop		NDMP9_MOVER_STOP
657 #define MT_ndmp9_mover_set_window	NDMP9_MOVER_SET_WINDOW
658 #define MT_ndmp9_mover_read		NDMP9_MOVER_READ
659 #define MT_ndmp9_mover_close		NDMP9_MOVER_CLOSE
660 #define MT_ndmp9_mover_set_record_size	NDMP9_MOVER_SET_RECORD_SIZE
661 #define MT_ndmp9_mover_connect		NDMP9_MOVER_CONNECT
662 
663 #ifdef  __cplusplus
664 }
665 #endif
666