1 /* $OpenBSD: types.h,v 1.4 1998/06/26 21:21:22 millert Exp $ */ 2 3 #ifndef __myTYPES_H__ 4 #define __myTYPES_H__ 5 6 /* 7 * $From: types.h,v 1.2 1996/01/30 01:52:24 mcooper Exp $ 8 */ 9 10 /* 11 * Dist Options. 12 * 13 * WARNING: This values are used by the server (rdistd) 14 */ 15 #define DO_VERIFY 0x000001 16 #define DO_WHOLE 0x000002 17 #define DO_YOUNGER 0x000004 18 #define DO_COMPARE 0x000008 19 #define DO_REMOVE 0x000010 20 #define DO_FOLLOW 0x000020 21 #define DO_IGNLNKS 0x000040 22 #define DO_QUIET 0x000100 23 #define DO_CHKNFS 0x000200 24 #define DO_CHKREADONLY 0x000400 25 #define DO_NOEXEC 0x000800 26 #define DO_SAVETARGETS 0x001000 27 #define DO_NODESCEND 0x002000 28 #define DO_NOCHKOWNER 0x004000 29 #define DO_NOCHKMODE 0x008000 30 #define DO_NOCHKGROUP 0x010000 31 #define DO_CHKSYM 0x020000 32 #define DO_NUMCHKGROUP 0x040000 33 #define DO_NUMCHKOWNER 0x080000 34 #define DO_SPARSE 0x100000 35 36 /* 37 * Dist option information 38 */ 39 typedef long opt_t; 40 struct _distoptinfo { 41 opt_t do_value; 42 char *do_name; 43 }; 44 typedef struct _distoptinfo DISTOPTINFO; 45 46 /* Debug Message types */ 47 #define DM_CALL 0x01 48 #define DM_PROTO 0x02 49 #define DM_CHILD 0x04 50 #define DM_MISC 0x10 51 #define DM_ALL 0x17 52 53 /* 54 * Description of a message type 55 */ 56 struct _msgtype { 57 int mt_type; /* Type (bit) */ 58 char *mt_name; /* Name of message type */ 59 }; 60 typedef struct _msgtype MSGTYPE; 61 62 /* 63 * Message Type definitions 64 */ 65 #define MT_DEBUG 0x0001 /* Debugging messages */ 66 #define MT_NERROR 0x0002 /* Normal errors */ 67 #define MT_FERROR 0x0004 /* Fatal errors */ 68 #define MT_WARNING 0x0010 /* Warning messages */ 69 #define MT_CHANGE 0x0020 /* Something changed */ 70 #define MT_INFO 0x0040 /* General information */ 71 #define MT_NOTICE 0x0100 /* Notice's */ 72 #define MT_SYSLOG 0x0200 /* System log, but not user */ 73 #define MT_REMOTE 0x0400 /* Ensure msg to remote */ 74 #define MT_NOREMOTE 0x1000 /* Don't log to remote host */ 75 #define MT_VERBOSE 0x2000 /* Verbose messages */ 76 #define MT_ALL (MT_NERROR|MT_FERROR|\ 77 MT_WARNING|MT_CHANGE|\ 78 MT_INFO|MT_NOTICE|\ 79 MT_SYSLOG|MT_VERBOSE) 80 81 /* 82 * Description of message facilities 83 */ 84 struct _msgfacility { 85 /* compile time initialized data */ 86 int mf_msgfac; /* One of MF_* from below */ 87 char *mf_name; /* Name of this facility */ 88 void (*mf_sendfunc)(); /* Function to send msg */ 89 /* run time initialized data */ 90 int mf_msgtypes; /* Bitmask of MT_* from above*/ 91 char *mf_filename; /* Name of file */ 92 FILE *mf_fptr; /* File pointer to output to */ 93 }; 94 typedef struct _msgfacility MSGFACILITY; 95 96 /* 97 * Message Facilities 98 */ 99 #define MF_STDOUT 1 /* Standard Output */ 100 #define MF_NOTIFY 2 /* Notify mail service */ 101 #define MF_FILE 3 /* A normal file */ 102 #define MF_SYSLOG 4 /* syslog() */ 103 104 #endif /* __myTYPES_H__ */ 105