1 /* @(#) $Id: ./src/analysisd/decoders/decoder.h, 2011/09/08 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
12 * License details at the LICENSE file included with OSSEC or
13 * online at: http://www.ossec.net/en/licensing.html
22 /* We need the eventinfo and os_regex in here */
24 #include "os_regex/os_regex.h"
26 #define AFTER_PARENT 0x001 /* 1 */
27 #define AFTER_PREMATCH 0x002 /* 2 */
28 #define AFTER_PREVREGEX 0x004 /* 4 */
29 #define AFTER_ERROR 0x010
33 /* Decoder structure */
38 u_int8_t use_own_name;
41 u_int16_t regex_offset;
42 u_int16_t prematch_offset;
51 OSMatch *program_name;
53 void (*plugindecoder)(void *lf);
54 void (**order)(void *lf, char *field);
58 typedef struct _OSDecoderNode
60 struct _OSDecoderNode *next;
61 struct _OSDecoderNode *child;
62 OSDecoderInfo *osdecoder;
67 /* Functions to Create the list, Add a osdecoder to the
68 * list and to get the first osdecoder.
70 void OS_CreateOSDecoderList();
71 int OS_AddOSDecoder(OSDecoderInfo *pi);
72 OSDecoderNode *OS_GetFirstOSDecoder(char *pname);
73 int getDecoderfromlist(char *name);