4 * Copyright (C) 2005 Roy Keene
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * Planning Systems Inc
24 * backuppcd-bugs@psislidell.com
28 * These define the values that we send and recieve over the wire denoting
29 * what type of file is beiNg referenced.
31 * Must fit inside a uint8_t
42 BPC_FILE_UNKNOWN = 255
43 } backuppc_filetype_t;
46 * These define the values for each command sent and recieved over the wire.
47 * Reply messages have their high-bit set.
49 * Must fit inside a uint8_t
60 BPC_CMD_AUTH_REPLY = (BPC_CMD_AUTH | 0x80),
61 BPC_CMD_SSL_REPLY = (BPC_CMD_SSL | 0x80),
62 BPC_CMD_KEY_REPLY = (BPC_CMD_KEY | 0x80),
63 BPC_CMD_LIST_REPLY = (BPC_CMD_LIST | 0x80),
64 BPC_CMD_GET_REPLY = (BPC_CMD_GET | 0x80),
65 BPC_CMD_PUT_REPLY = (BPC_CMD_PUT | 0x80),
66 BPC_CMD_RDGET_REPLY = (BPC_CMD_RDGET | 0x80),
70 * These define the values we send and recieve over the wire to describe each
71 * attribute for a referenced file.
73 * Must fit inside a uint16_t
86 BPC_ATTRID_NTACL = 10,
87 BPC_ATTRID_SYMLINKDEST = 11,
88 BPC_ATTRID_HRDLINKDEST = 12,
91 BPC_ATTRID_BPCHASH = 15,
95 * These define the values we send and recieve over the wire to describe the
96 * hashing algorithm used for RDIFF
98 * Must fit inside a uint8_t
109 * These are used for short status messages.
111 * Must fit inside a uint8_t
115 BPC_STATUS_FAILED = 1,
116 BPC_STATUS_UNKNOWN = 255
120 * These values are used to in the ACL entry for a LIST or GET reply.
121 * They are the values for an ACL entry. Extended ACLs will be either
122 * PACL (POSIX ACL) or NTACL (Microsoft NT ACL).
124 * Must fit inside a uint16_t
126 #define BPC_ACL_XOTH 00001
127 #define BPC_ACL_WOTH 00002
128 #define BPC_ACL_ROTH 00004
129 #define BPC_ACL_XGRP 00010
130 #define BPC_ACL_WGRP 00020
131 #define BPC_ACL_RGRP 00040
132 #define BPC_ACL_XUSR 00100
133 #define BPC_ACL_WUSR 00200
134 #define BPC_ACL_RUSR 00400
135 #define BPC_ACL_STCK 01000
136 #define BPC_ACL_SGID 02000
137 #define BPC_ACL_SUID 04000
140 * These values are used for the OPTIONS field in a LIST or GET request.
141 * They may be combined.
143 * Must fit inside a uint8_t when ORd together.
145 #define BPC_OPT_RECURSIVE 0x01
146 #define BPC_OPT_MD5 0x02
147 #define BPC_OPT_MD4 0x04
148 #define BPC_OPT_SHA1 0x08
149 #define BPC_OPT_BPCHASH 0x10
152 * Maximum pathname length to support.
154 #define BPC_MAXPATH_LEN 4096