00001
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #ifndef __CLONE_H
00046 #define __CLONE_H
00047
00049 typedef struct userclonestruct UserClone;
00050
00052 struct userclonestruct {
00054 char user[USERLEN];
00055
00057 int clones;
00058
00060 int trigger;
00061
00062
00064 flag_t uflags;
00065
00067 UserClone *next;
00068
00070 UserClone *previous;
00071 };
00072
00074 typedef struct hostclonestruct HostClone;
00075
00078 struct hostclonestruct {
00080 char host[HOSTLEN];
00081
00083 UserClone *firstUser;
00084
00086 UserClone *lastUser;
00087
00089 int trigger;
00090
00092 int clones;
00093
00095 int flags;
00096
00097 HostClone *next, *previous, *hashnext, *hashprev;
00098 };
00099
00101 typedef struct trigger_rule CloneRule;
00102
00104 struct trigger_rule {
00105
00107 char mask[HOSTLEN+USERLEN+2];
00108
00110 int trigger;
00111
00113 int utrigger;
00114
00116 long flags;
00117
00119 char *kill_msg;
00120
00122 char *warn_msg;
00123
00125 CloneRule *next;
00126 };
00127
00128 extern CloneRule *first_crule;
00129 CloneRule *GetCrule(char *);
00130 CloneRule *GetCruleMatch(char *);
00131 CloneRule *NewCrule();
00132 void AddCrule(CloneRule *, int);
00133 void RemoveCrule(CloneRule *);
00134 void UpdateCrule(CloneRule, CloneRule *);
00135 int addClone(char *, char *, char *);
00136 void delClone(char *, char *);
00137 HostClone *getCloneData(char *);
00138 UserClone *addUserClone(HostClone *, char *);
00139 void delUserClone(HostClone *, UserClone *);
00140 UserClone *getUserCloneData(HostClone *, char *);
00141 void initCloneData(HostClone *);
00142 #endif