Imported Upstream version 3.1.0
[debian/amanda] / ndmp-src / ndmp4_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
39
40 #ifndef NDMOS_OPTION_NO_NDMP4
41 extern int      ndmp_4to9_error (
42                         ndmp4_error *error4,
43                         ndmp9_error *error9);
44 extern int      ndmp_9to4_error (
45                         ndmp9_error *error9,
46                         ndmp4_error *error4);
47
48 extern int      ndmp_4to9_data_get_state_reply (
49                         ndmp4_data_get_state_reply *reply4,
50                         ndmp9_data_get_state_reply *reply9);
51 extern int      ndmp_9to4_data_get_state_reply (
52                         ndmp9_data_get_state_reply *reply9,
53                         ndmp4_data_get_state_reply *reply4);
54
55 extern int      ndmp_4to9_tape_get_state_reply (
56                         ndmp4_tape_get_state_reply *reply4,
57                         ndmp9_tape_get_state_reply *reply9);
58 extern int      ndmp_9to4_tape_get_state_reply (
59                         ndmp9_tape_get_state_reply *reply9,
60                         ndmp4_tape_get_state_reply *reply4);
61
62 extern int      ndmp_4to9_mover_get_state_reply (
63                         ndmp4_mover_get_state_reply *reply4,
64                         ndmp9_mover_get_state_reply *reply9);
65 extern int      ndmp_9to4_mover_get_state_reply (
66                         ndmp9_mover_get_state_reply *reply9,
67                         ndmp4_mover_get_state_reply *reply4);
68
69 extern int      ndmp_4to9_addr (
70                         ndmp4_addr *addr4,
71                         ndmp9_addr *addr9);
72 extern int      ndmp_9to4_addr (
73                         ndmp9_addr *addr9,
74                         ndmp4_addr *addr4);
75
76 extern int      ndmp_4to9_file_stat (
77                         ndmp4_file_stat *fstat4,
78                         ndmp9_file_stat *fstat9,
79                         ndmp9_u_quad node,
80                         ndmp9_u_quad fh_info);
81 extern int      ndmp_9to4_file_stat (
82                         ndmp9_file_stat *fstat9,
83                         ndmp4_file_stat *fstat4);
84
85 extern int      ndmp_4to9_pval (
86                         ndmp4_pval *pval4,
87                         ndmp9_pval *pval9);
88 extern int      ndmp_9to4_pval (
89                         ndmp9_pval *pval9,
90                         ndmp4_pval *pval4);
91
92 extern int      ndmp_4to9_pval_vec (
93                         ndmp4_pval *pval4,
94                         ndmp9_pval *pval9,
95                         unsigned n_pval);
96 extern int      ndmp_9to4_pval_vec (
97                         ndmp9_pval *pval9,
98                         ndmp4_pval *pval4,
99                         unsigned n_pval);
100
101 extern int      ndmp_4to9_name (
102                         ndmp4_name *name4,
103                         ndmp9_name *name9);
104 extern int      ndmp_9to4_name (
105                         ndmp9_name *name9,
106                         ndmp4_name *name4);
107
108 extern int      ndmp_4to9_name_vec (
109                         ndmp4_name *name4,
110                         ndmp9_name *name9,
111                         unsigned n_name);
112 extern int      ndmp_9to4_name_vec (
113                         ndmp9_name *name9,
114                         ndmp4_name *name4,
115                         unsigned n_name);
116
117 extern struct reqrep_xlate              ndmp4_reqrep_xlate_table[];
118
119 #endif /* !NDMOS_OPTION_NO_NDMP4 */