Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

signature.h

Go to the documentation of this file.
00001 /* $Id$ */
00002 /*
00003 ** Copyright (C) 2002 Sourcefire, Inc.
00004 ** Author(s):   Andrew R. Baker <andrewb@sourcefire.com>
00005 **
00006 ** This program is free software; you can redistribute it and/or modify
00007 ** it under the terms of the GNU General Public License as published by
00008 ** the Free Software Foundation; either version 2 of the License, or
00009 ** (at your option) any later version.
00010 **
00011 ** This program is distributed in the hope that it will be useful,
00012 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 ** GNU General Public License for more details.
00015 **
00016 ** You should have received a copy of the GNU General Public License
00017 ** along with this program; if not, write to the Free Software
00018 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00019 */
00020 #ifndef __SIGNATURE_H__
00021 #define __SIGNATURE_H__
00022 
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026 #ifdef OSF1
00027 #include <sys/bitypes.h>
00028 #endif
00029 
00030 #include <sys/types.h>
00031 #include <stdio.h>
00032 
00033 struct _OptTreeNode;
00034 
00035 /* this contains a list of the URLs for various reference systems */
00036 typedef struct _ReferenceSystemNode
00037 {
00038     char *name;
00039     char *url;
00040     struct _ReferenceSystemNode *next;
00041 } ReferenceSystemNode;
00042 
00043 extern ReferenceSystemNode *referenceSytems;
00044 ReferenceSystemNode *ReferenceSystemAdd(char *name, char *id);
00045 ReferenceSystemNode *ReferenceSystemLookup(char *name);
00046 void ParseReferenceSystemConfig(char *args);
00047     
00048 
00049 
00050 /* XXX: update to point to the ReferenceURLNode in the referenceURL list */
00051 typedef struct _ReferenceNode
00052 {
00053     char *id;
00054     ReferenceSystemNode *system;
00055     struct _ReferenceNode *next;
00056 } ReferenceNode;
00057 
00058 ReferenceNode *AddReference(ReferenceNode *, char *system, char *id);
00059 void FPrintReference(FILE *, ReferenceNode *);
00060 void ParseReference(char *args, struct _OptTreeNode *otn);
00061 
00062 /* struct for rule classification */
00063 typedef struct _ClassType
00064 {
00065     char *type;      /* classification type */
00066     int id;          /* classification id */
00067     char *name;      /* "pretty" classification name */
00068     int priority;    /* priority */
00069     struct _ClassType *next;
00070 } ClassType;
00071 
00072 void ParseClassificationConfig(char *args);
00073 void ParsePriority(char *priority, struct _OptTreeNode *otn);
00074 void ParseClassType(char *classtype, struct _OptTreeNode *otn);
00075 ClassType *ClassTypeLookupByType(char *type);
00076 ClassType *ClassTypeLookupById(int id);
00077 
00078 void ParseSID(char *sid, struct _OptTreeNode *otn);
00079 void ParseRev(char *sid, struct _OptTreeNode *otn);
00080 
00081 
00082 typedef struct _SigInfo
00083 {
00084     u_int32_t generator;
00085     u_int32_t id;
00086     u_int32_t rev;
00087     u_int32_t class_id;
00088     ClassType *classType;
00089     u_int32_t priority;
00090     char *message;
00091     ReferenceNode *refs;
00092 } SigInfo;
00093 
00094 
00095 
00096 
00097 #endif /* SIGNATURE */

Generated on Sun May 14 14:51:18 2006 by  doxygen 1.4.2