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 3) as published by the FSF - Free Software
10 /* 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
26 typedef struct ListNode {
31 struct ListNode *next;
34 typedef struct ListRule {
41 struct ListRule *next;
44 /* Create the rule list */
45 void OS_CreateListsList(void);
47 /* Add rule information to the list */
48 int OS_AddList( ListNode *new_listnode );
50 int Lists_OP_LoadList(char *listfile);
52 int OS_DBSearchKey(ListRule *lrule, char *key);
54 int OS_DBSearch(ListRule *lrule, char *key);
56 void OS_ListLoadRules(void);
58 ListRule *OS_AddListRule(ListRule *first_rule_list, int lookup_type, int field, char *listname, OSMatch *matcher);
60 ListNode *OS_GetFirstList(void);
62 ListNode *OS_FindList(const char *listname);
64 void Lists_OP_CreateLists(void);
66 #endif /* __LISTS_H */