1 /* @(#) $Id: ./src/analysisd/lists.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 3) as published by the FSF - Free Software
14 /* Rules are needed for lists */
17 #include "cdb/uint32.h"
19 #define LR_STRING_MATCH 0
20 #define LR_STRING_NOT_MATCH 1
21 #define LR_STRING_MATCH_VALUE 2
23 #define LR_ADDRESS_MATCH 10
24 #define LR_ADDRESS_NOT_MATCH 11
25 #define LR_ADDRESS_MATCH_VALUE 12
28 typedef struct ListNode
34 struct ListNode *next;
37 typedef struct ListRule
45 struct ListRule *next;
48 /* create the rule list */
49 void OS_CreateListsList();
50 /* Add rule information to the list */
51 int OS_AddList( ListNode *new_listnode );
52 int Lists_OP_LoadList(char *listfile);
53 int OS_DBSearchKey(ListRule *lrule, char *key);
54 int OS_DBSearch(ListRule *lrule, char *key);
55 void OS_ListLoadRules();
56 ListRule *OS_AddListRule(ListRule *first_rule_list, int lookup_type, int field, char *listname, OSMatch *matcher);
57 ListNode *OS_GetFirstList();
58 ListNode *OS_FindList(char *listname);