6 #define iswhitespace(X) ((((X) == ' ') || ((X) == '\t'))?1:0)
7 #define RULE_MAX_STACK 32
8 #define RULES_FILE 0x01
11 #define RULETAB_FILE 0x02
12 #define RULETAB_ALL 0x01
13 #define RULETAB_ONLY_BOOT 0x02
14 #define RULETAB_SPECIFIC 0x03
29 struct groupdevid
**list
;
32 struct groupdevid
*next
;
33 TAILQ_HEAD(, groupdevid
) list
;
35 TAILQ_ENTRY(groupdevid
) link
;
46 struct groupdevid
*id
;
53 TAILQ_ENTRY(rule
) link
;
59 const char *rule_file
;
60 TAILQ_ENTRY(rule_tab
) link
;
64 typedef int (rule_iterate_callback_t
)(struct rule
*rule
,
65 struct groupdevid
*id
);
66 typedef int (rule_parser_t
)(char **);
68 struct groupdevid
*new_id(const char *, int);
69 struct groupdevid
*get_id(const char *);
70 struct groupdevid
*get_group(const char *, int);
71 struct rule
*new_rule(int, struct groupdevid
*);
72 void add_rule(struct rule
*);
74 void dump_config(void);
75 int read_config(const char *, int);
76 int syntax_error(const char *fmt
, ...);
78 void delete_rules(void);