Imported Upstream version 3.1.0
[debian/amanda] / ndmp-src / ndmp0.h
1 /*
2  * Please do not edit this file.
3  * It was generated using rpcgen.
4  */
5
6 #ifndef _NDMP0_H_RPCGEN
7 #define _NDMP0_H_RPCGEN
8
9 #include <rpc/rpc.h>
10
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 #define NDMPPORT 10000
17
18 enum ndmp0_error {
19         NDMP0_NO_ERR = 0,
20         NDMP0_NOT_SUPPORTED_ERR = 1,
21         NDMP0_DEVICE_BUSY_ERR = 2,
22         NDMP0_DEVICE_OPENED_ERR = 3,
23         NDMP0_NOT_AUTHORIZED_ERR = 4,
24         NDMP0_PERMISSION_ERR = 5,
25         NDMP0_DEV_NOT_OPEN_ERR = 6,
26         NDMP0_IO_ERR = 7,
27         NDMP0_TIMEOUT_ERR = 8,
28         NDMP0_ILLEGAL_ARGS_ERR = 9,
29         NDMP0_NO_TAPE_LOADED_ERR = 10,
30         NDMP0_WRITE_PROTECT_ERR = 11,
31         NDMP0_EOF_ERR = 12,
32         NDMP0_EOM_ERR = 13,
33         NDMP0_FILE_NOT_FOUND_ERR = 14,
34         NDMP0_BAD_FILE_ERR = 15,
35         NDMP0_NO_DEVICE_ERR = 16,
36         NDMP0_NO_BUS_ERR = 17,
37         NDMP0_XDR_DECODE_ERR = 18,
38         NDMP0_ILLEGAL_STATE_ERR = 19,
39         NDMP0_UNDEFINED_ERR = 20,
40         NDMP0_XDR_ENCODE_ERR = 21,
41         NDMP0_NO_MEM_ERR = 22,
42 };
43 typedef enum ndmp0_error ndmp0_error;
44
45 enum ndmp0_header_message_type {
46         NDMP0_MESSAGE_REQUEST = 0,
47         NDMP0_MESSAGE_REPLY = 1,
48 };
49 typedef enum ndmp0_header_message_type ndmp0_header_message_type;
50
51 enum ndmp0_message {
52         NDMP0_CONNECT_OPEN = 0x900,
53         NDMP0_CONNECT_CLOSE = 0x902,
54         NDMP0_NOTIFY_CONNECTED = 0x502,
55 };
56 typedef enum ndmp0_message ndmp0_message;
57
58 struct ndmp0_header {
59         u_long sequence;
60         u_long time_stamp;
61         ndmp0_header_message_type message_type;
62         ndmp0_message message;
63         u_long reply_sequence;
64         ndmp0_error error;
65 };
66 typedef struct ndmp0_header ndmp0_header;
67
68 struct ndmp0_connect_open_request {
69         u_short protocol_version;
70 };
71 typedef struct ndmp0_connect_open_request ndmp0_connect_open_request;
72
73 struct ndmp0_connect_open_reply {
74         ndmp0_error error;
75 };
76 typedef struct ndmp0_connect_open_reply ndmp0_connect_open_reply;
77
78 enum ndmp0_connect_reason {
79         NDMP0_CONNECTED = 0,
80         NDMP0_SHUTDOWN = 1,
81         NDMP0_REFUSED = 2,
82 };
83 typedef enum ndmp0_connect_reason ndmp0_connect_reason;
84
85 struct ndmp0_notify_connected_request {
86         ndmp0_connect_reason reason;
87         u_short protocol_version;
88         char *text_reason;
89 };
90 typedef struct ndmp0_notify_connected_request ndmp0_notify_connected_request;
91
92 /* the xdr functions */
93
94 #if defined(__STDC__) || defined(__cplusplus)
95 extern  bool_t xdr_ndmp0_error (XDR *, ndmp0_error*);
96 extern  bool_t xdr_ndmp0_header_message_type (XDR *, ndmp0_header_message_type*);
97 extern  bool_t xdr_ndmp0_message (XDR *, ndmp0_message*);
98 extern  bool_t xdr_ndmp0_header (XDR *, ndmp0_header*);
99 extern  bool_t xdr_ndmp0_connect_open_request (XDR *, ndmp0_connect_open_request*);
100 extern  bool_t xdr_ndmp0_connect_open_reply (XDR *, ndmp0_connect_open_reply*);
101 extern  bool_t xdr_ndmp0_connect_reason (XDR *, ndmp0_connect_reason*);
102 extern  bool_t xdr_ndmp0_notify_connected_request (XDR *, ndmp0_notify_connected_request*);
103
104 #else /* K&R C */
105 extern bool_t xdr_ndmp0_error ();
106 extern bool_t xdr_ndmp0_header_message_type ();
107 extern bool_t xdr_ndmp0_message ();
108 extern bool_t xdr_ndmp0_header ();
109 extern bool_t xdr_ndmp0_connect_open_request ();
110 extern bool_t xdr_ndmp0_connect_open_reply ();
111 extern bool_t xdr_ndmp0_connect_reason ();
112 extern bool_t xdr_ndmp0_notify_connected_request ();
113
114 #endif /* K&R C */
115
116 #ifdef __cplusplus
117 }
118 #endif
119
120 #endif /* !_NDMP0_H_RPCGEN */