Imported Upstream version 3.1.0
[debian/amanda] / ndmp-src / ndmp2_translate.h
1 /*
2  * Copyright (c) 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
38 #ifndef NDMOS_OPTION_NO_NDMP2
39 extern int      ndmp_2to9_error (
40                         ndmp2_error *error2,
41                         ndmp9_error *error9);
42 extern int      ndmp_9to2_error (
43                         ndmp9_error *error9,
44                         ndmp2_error *error2);
45
46 extern int      ndmp_2to9_data_get_state_reply (
47                         ndmp2_data_get_state_reply *reply2,
48                         ndmp9_data_get_state_reply *reply9);
49 extern int      ndmp_9to2_data_get_state_reply (
50                         ndmp9_data_get_state_reply *reply9,
51                         ndmp2_data_get_state_reply *reply2);
52
53 extern int      ndmp_2to9_tape_get_state_reply (
54                         ndmp2_tape_get_state_reply *reply2,
55                         ndmp9_tape_get_state_reply *reply9);
56 extern int      ndmp_9to2_tape_get_state_reply (
57                         ndmp9_tape_get_state_reply *reply9,
58                         ndmp2_tape_get_state_reply *reply2);
59
60 extern int      ndmp_2to9_mover_get_state_reply (
61                         ndmp2_mover_get_state_reply *reply2,
62                         ndmp9_mover_get_state_reply *reply9);
63 extern int      ndmp_9to2_mover_get_state_reply (
64                         ndmp9_mover_get_state_reply *reply9,
65                         ndmp2_mover_get_state_reply *reply2);
66
67 extern int      ndmp_2to9_mover_addr (
68                         ndmp2_mover_addr *addr2,
69                         ndmp9_addr *addr9);
70 extern int      ndmp_9to2_mover_addr (
71                         ndmp9_addr *addr9,
72                         ndmp2_mover_addr *addr2);
73
74 extern int      ndmp_2to9_unix_file_stat (
75                         ndmp2_unix_file_stat *fstat2,
76                         ndmp9_file_stat *fstat9);
77 extern int      ndmp_9to2_unix_file_stat (
78                         ndmp9_file_stat *fstat9,
79                         ndmp2_unix_file_stat *fstat2);
80
81 extern int      ndmp_2to9_pval (
82                         ndmp2_pval *pval2,
83                         ndmp9_pval *pval9);
84 extern int      ndmp_9to2_pval (
85                         ndmp9_pval *pval9,
86                         ndmp2_pval *pval2);
87
88 extern int      ndmp_2to9_pval_vec (
89                         ndmp2_pval *pval2,
90                         ndmp9_pval *pval9,
91                         unsigned n_pval);
92 extern int      ndmp_9to2_pval_vec (
93                         ndmp9_pval *pval9,
94                         ndmp2_pval *pval2,
95                         unsigned n_pval);
96
97 extern int      ndmp_2to9_name (
98                         ndmp2_name *name2,
99                         ndmp9_name *name9);
100 extern int      ndmp_9to2_name (
101                         ndmp9_name *name9,
102                         ndmp2_name *name2);
103
104 extern int      ndmp_2to9_name_vec (
105                         ndmp2_name *name2,
106                         ndmp9_name *name9,
107                         unsigned n_name);
108 extern int      ndmp_9to2_name_vec (
109                         ndmp9_name *name9,
110                         ndmp2_name *name2,
111                         unsigned n_name);
112
113 extern struct reqrep_xlate              ndmp2_reqrep_xlate_table[];
114
115 #endif /* !NDMOS_OPTION_NO_NDMP2 */