Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

clone.h

Go to the documentation of this file.
00001 
00013 /*
00014  * Copyright (c) 1996-1997 Chip Norkus
00015  * Copyright (c) 1997 Max Byrd
00016  * Copyright (c) 1997 Greg Poma
00017  * Copyright (c) 2000-2001 James Hess
00018  * All rights reserved.
00019  *
00020  * Redistribution and use in source and binary forms, with or without
00021  * modification, are permitted provided that the following conditions
00022  * are met:
00023  * 1. Redistributions of source code must retain the above copyright
00024  *    notice, this list of conditions and the following disclaimer.
00025  * 2. Redistributions in binary form must reproduce the above copyright
00026  *    notice, this list of conditions and the following disclaimer in the
00027  *    documentation and/or other materials provided with the distribution.
00028  * 3. Neither the name of the authors nor the names of its contributors
00029  *    may be used to endorse or promote products derived from this software
00030  *    without specific prior written permission.
00031  *
00032  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
00033  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00034  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00035  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
00036  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00037  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00038  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00039  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00040  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00041  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00042  * SUCH DAMAGE.
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

Generated at Sat Oct 25 20:56:07 2003 for Services using Doxygen.
Services Copyr. 1996-2001 Chip Norkus, Max Byrd, Greg Poma, Michael Graff, James Hess, Dafydd James. All rights reserved See LICENSE for licensing information.