5762888 [rkeene@sledge /home/rkeene/devel/backuppcd/all/backuppcd-200601171056]$ cat -n backuppcd.h
  1 #ifndef _BACKUPPCD_H
  2 #define _BACKUPPCD_H 1
  3 /*
  4  * Copyright (C) 2005  Roy Keene
  5  *
  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.
 10  *
 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.
 15  *
 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.
 19  *
 20  * Author Information
 21  *      Roy Keene
 22  *      Planning Systems Inc
 23  *      Slidell, LA
 24  *      backuppcd-bugs@psislidell.com
 25  */
 26 
 27 /*
 28  * These define the values that we send and recieve over the wire denoting
 29  * what type of file is beiNg referenced.
 30  *
 31  * Must fit inside a uint8_t
 32  */
 33 typedef enum {
 34     BPC_FILE_DIR = 0,
 35     BPC_FILE_REG = 1,
 36     BPC_FILE_SYMLINK = 2,
 37     BPC_FILE_SOCKET = 3,
 38     BPC_FILE_FIFO = 4,
 39     BPC_FILE_BDEV = 5,
 40     BPC_FILE_CDEV = 6,
 41     BPC_FILE_HRDLINK = 7,
 42     BPC_FILE_UNKNOWN = 255
 43 } backuppc_filetype_t;
 44 
 45 /*
 46  * These define the values for each command sent and recieved over the wire.
 47  * Reply messages have their high-bit set.
 48  *
 49  * Must fit inside a uint8_t
 50  */
 51 typedef enum {
 52     BPC_CMD_NONE = 0,
 53     BPC_CMD_AUTH = 1,
 54     BPC_CMD_SSL = 2,
 55     BPC_CMD_KEY = 3,
 56     BPC_CMD_LIST = 4,
 57     BPC_CMD_GET = 5,
 58     BPC_CMD_PUT = 6,
 59     BPC_CMD_RDGET = 7,
 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),
 67 } backuppc_cmd_t;
 68 
 69 /*
 70  * These define the values we send and recieve over the wire to describe each
 71  * attribute for a referenced file.
 72  *
 73  * Must fit inside a uint16_t
 74  */
 75 typedef enum {
 76     BPC_ATTRID_NOP = 0,
 77     BPC_ATTRID_MTIME = 1,
 78     BPC_ATTRID_CTIME = 2,
 79     BPC_ATTRID_USER = 3,
 80     BPC_ATTRID_GROUP = 4,
 81     BPC_ATTRID_UID = 5,
 82     BPC_ATTRID_GID = 6,
 83     BPC_ATTRID_MD5 = 7,
 84     BPC_ATTRID_ACL = 8,
 85     BPC_ATTRID_PACL = 9,
 86     BPC_ATTRID_NTACL = 10,
 87     BPC_ATTRID_SYMLINKDEST = 11,
 88     BPC_ATTRID_HRDLINKDEST = 12,
 89     BPC_ATTRID_MD4 = 13,
 90     BPC_ATTRID_SHA1 = 14,
 91     BPC_ATTRID_BPCHASH = 15,
 92 } backuppc_attrid_t;
 93 
 94 /*
 95  * These define the values we send and recieve over the wire to describe the
 96  * hashing algorithm used for RDIFF
 97  *
 98  * Must fit inside a uint8_t
 99  */
100 typedef enum {
101     BPC_HASH_NONE = 0,
102     BPC_HASH_MD5 = 1,
103     BPC_HASH_MD4 = 2,
104     BPC_HASH_SHA1 = 3,
105     BPC_HASH_BPC = 4,
106 } backuppc_hashid_t;
107 
108 /*
109  * These are used for short status messages.
110  *
111  * Must fit inside a uint8_t
112  */
113 typedef enum {
114     BPC_STATUS_OKAY = 0,
115     BPC_STATUS_FAILED = 1,
116     BPC_STATUS_UNKNOWN = 255
117 } backuppc_status_t;
118 
119 /*
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).
123  *
124  * Must fit inside a uint16_t
125  */
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
138 
139 /*
140  * These values are used for the OPTIONS field in a LIST or GET request.
141  * They may be combined.
142  *
143  * Must fit inside a uint8_t when ORd together.
144  */
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
150 
151 /*
152  * Maximum pathname length to support.
153  */
154 #define BPC_MAXPATH_LEN 4096
155 
156 #endif
5762889 [rkeene@sledge /home/rkeene/devel/backuppcd/all/backuppcd-200601171056]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2005-08-22 17:48:06