+#define NO_FILTERS 0
+#define SERVER_FILTERS 1
+#define ALL_FILTERS 2
+
+#define XFLG_FATAL_ERRORS (1<<0)
+#define XFLG_DEF_INCLUDE (1<<1)
+#define XFLG_DEF_EXCLUDE (1<<2)
+#define XFLG_WORD_SPLIT (1<<3)
+#define XFLG_DIRECTORY (1<<4)
+#define XFLG_NO_PREFIXES (1<<5)
+#define XFLG_ANCHORED2ABS (1<<6)
+
+#define PERMS_REPORT (1<<0)
+#define PERMS_SKIP_MTIME (1<<1)
+
+#define FULL_FLUSH 1
+#define NORMAL_FLUSH 0
+
+#define PDIR_CREATE 1
+#define PDIR_DELETE 0
+
+/* Note: 0x00 - 0x7F are used for basis_dir[] indexes! */
+#define FNAMECMP_BASIS_DIR_LOW 0x00 /* Must remain 0! */
+#define FNAMECMP_BASIS_DIR_HIGH 0x7F
+#define FNAMECMP_FNAME 0x80
+#define FNAMECMP_PARTIAL_DIR 0x81
+#define FNAMECMP_BACKUP 0x82
+
+/* For calling delete_file() */
+#define DEL_DIR (1<<0)
+#define DEL_NO_RECURSE (1<<1)
+#define DEL_FORCE_RECURSE (1<<2) /* recurse even w/o --force */
+#define DEL_TERSE (1<<3)
+
+
+/* Log-message categories. FLOG is only used on the daemon side to
+ * output messages to the log file. */
+enum logcode { FERROR=1, FINFO=2, FLOG=3 };
+
+/* Messages types that are sent over the message channel. The logcode
+ * values must all be present here with identical numbers. */
+enum msgcode {
+ MSG_DONE=5, /* current phase is done */
+ MSG_REDO=4, /* reprocess indicated flist index */
+ MSG_ERROR=FERROR, MSG_INFO=FINFO, MSG_LOG=FLOG, /* remote logging */
+ MSG_DATA=0 /* raw data on the multiplexed stream */
+};