3 /* Copyright (C) 2009 Trend Micro Inc.
6 * This program is a free software; you can redistribute it
7 * and/or modify it under the terms of the GNU General Public
8 * License (version 3) as published by the FSF - Free Software
13 /* Rules are needed for lists */
16 #include "cdb/uint32.h"
18 #define LR_STRING_MATCH 0
19 #define LR_STRING_NOT_MATCH 1
20 #define LR_STRING_MATCH_VALUE 2
22 #define LR_ADDRESS_MATCH 10
23 #define LR_ADDRESS_NOT_MATCH 11
24 #define LR_ADDRESS_MATCH_VALUE 12
27 typedef struct ListNode
33 struct ListNode *next;
36 typedef struct ListRule
44 struct ListRule *next;
47 /* create the rule list */
48 void OS_CreateListsList();
49 /* Add rule information to the list */
50 int OS_AddList( ListNode *new_listnode );
51 int Lists_OP_LoadList(char *listfile);
52 int OS_DBSearchKey(ListRule *lrule, char *key);
53 int OS_DBSearch(ListRule *lrule, char *key);
54 void OS_ListLoadRules();
55 ListRule *OS_AddListRule(ListRule *first_rule_list, int lookup_type, int field, char *listname, OSMatch *matcher);
56 ListNode *OS_GetFirstList();
57 ListNode *OS_FindList(char *listname);