1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
14 #include "os_regex/os_regex.h"
16 #define AFTER_PARENT 0x001 /* 1 */
17 #define AFTER_PREMATCH 0x002 /* 2 */
18 #define AFTER_PREVREGEX 0x004 /* 4 */
19 #define AFTER_ERROR 0x010
24 /* Decoder structure */
28 u_int8_t use_own_name;
31 u_int16_t regex_offset;
32 u_int16_t prematch_offset;
45 OSMatch *program_name;
48 OSPcre2 *prematch_pcre2;
49 OSPcre2 *program_name_pcre2;
51 void (*plugindecoder)(void *lf);
52 void* (**order)(struct _Eventinfo *, char *, int);
56 typedef struct _OSDecoderNode {
57 struct _OSDecoderNode *next;
58 struct _OSDecoderNode *child;
59 OSDecoderInfo *osdecoder;
62 /* Functions to Create the list, add a osdecoder to the
63 * list and to get the first osdecoder
65 void OS_CreateOSDecoderList(void);
66 int OS_AddOSDecoder(OSDecoderInfo *pi);
67 OSDecoderNode *OS_GetFirstOSDecoder(const char *pname);
68 int getDecoderfromlist(const char *name);
69 char *GetGeoInfobyIP(char *ip_addr);
70 int SetDecodeXML(void);
71 void HostinfoInit(void);
72 void SyscheckInit(void);
73 void RootcheckInit(void);
75 int ReadDecodeXML(const char *file);