Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

policy.h

Go to the documentation of this file.
00001 /****************************************************************************/
00002 /****************************************************************************/
00007 /****************************************************************************/
00008 
00009 #include "types.h"
00010 
00011 #ifndef POLICY_H
00012 #define POLICY_H
00013 
00014 struct POLICY_OUTPUT_S;
00015 struct POLICY_PROTO_S;
00016 struct POLICY_TEST_S;
00017 struct POLICY_RESULT_S;
00018 struct POLICY_INITS_S;
00019 struct POLICY_INPUT_S;
00020 
00021 typedef struct POLICY_HEAD_S {
00022   struct POLICY_PROTO_S *top;
00023   struct POLICY_OUTPUT_S *def;
00024   struct POLICY_INITS_S *inits;
00025   struct POLICY_INPUT_S *input;
00026 } POLICY_HEAD;
00027 
00028 typedef struct POLICY_INPUT_S {
00029   char *plugname;
00030   unsigned short weight;
00031   char *sSrc;
00032   int iSrc;
00033   struct POLICY_INPUT_S *next;
00034 } POLICY_INPUT;
00035 
00036 typedef struct POLICY_INITS_S {
00037   char *plugname;
00038   char **init_string;
00039   unsigned int string_count;
00040   unsigned int space;
00041   struct POLICY_INITS_S *next;
00042 } POLICY_INITS;
00043 
00044 typedef struct POLICY_PROTO_S {
00045   PROTO proto_num;
00046   char *proto_name;
00047   struct POLICY_TEST_S  *test;
00048   struct POLICY_PROTO_S *next;
00049 } POLICY_PROTO;
00050 
00051 #define POLICY_TEST_TYPE_MASKED   0x01
00052 #define POLICY_TEST_TYPE_VAR      0x02
00053 #define POLICY_TEST_TYPE_ANALYSIS 0x03
00054 
00055 #define POLICY_TEST_V_TYPE_8   'b'
00056 #define POLICY_TEST_V_TYPE_U8  'B'
00057 #define POLICY_TEST_V_TYPE_16  's'
00058 #define POLICY_TEST_V_TYPE_U16 'S'
00059 #define POLICY_TEST_V_TYPE_32  'l'
00060 #define POLICY_TEST_V_TYPE_U32 'L'
00061 
00062 typedef struct POLICY_TEST_S {
00063   PROTO p_num;
00064   char *p_name;
00065   char test_type;
00066   /* masked test */
00067   BYTE *m_val;
00068   BYTE *m_mask;
00069   unsigned long m_offset;
00070   unsigned long m_len;
00071   char m_type; /* = or ! */
00072   /* var test */
00073   unsigned long v_val;
00074   char v_vType;    /* see the variable types above */
00075   char *v_tType; /* != == < > >= =< */ 
00076   unsigned long v_offset;
00077   /* analysis test */
00078   char *a_name;
00079   char *a_args;
00080   /* pointers */
00081   struct POLICY_RESULT_S *result;
00082 } POLICY_TEST;
00083 
00084 typedef struct POLICY_RESULT_S {
00085   char *sResult;
00086   unsigned short iResult;
00087   struct POLICY_RESULT_S *next;
00088   struct POLICY_OUTPUT_S *match;
00089 } POLICY_RESULT;
00090 
00091 typedef struct POLICY_OUTPUT_S {
00092   char *name;
00093   char *args;
00094   char eof;
00095   struct POLICY_OUTPUT_S *oNext;
00096   struct POLICY_TEST_S *tNext;
00097 } POLICY_OUTPUT;
00098 
00099 
00100 
00101 
00102 
00103 #endif /* POLICY_H */

Generated at Mon Jul 8 15:16:50 2002 for RUBICON by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000