1
2#ifndef _XTABLES_INTERNAL_H
3#define _XTABLES_INTERNAL_H 1
4
5#ifndef XT_LIB_DIR
6# define XT_LIB_DIR "/lib/xtables"
7#endif
8
9
10struct afinfo {
11
12 int family;
13
14
15 char *libprefix;
16
17
18 int ipproto;
19
20
21 char *kmod;
22
23
24 int so_rev_match;
25
26
27 int so_rev_target;
28};
29
30enum xt_tryload {
31 DONT_LOAD,
32 DURING_LOAD,
33 TRY_LOAD,
34 LOAD_MUST_SUCCEED
35};
36
37struct xtables_rule_match {
38 struct xtables_rule_match *next;
39 struct xtables_match *match;
40
41
42 unsigned int completed;
43};
44
45extern char *lib_dir;
46
47extern void *fw_calloc(size_t count, size_t size);
48extern void *fw_malloc(size_t size);
49
50extern const char *modprobe_program;
51extern int xtables_insmod(const char *modname, const char *modprobe, int quiet);
52extern int load_xtables_ko(const char *modprobe, int quiet);
53
54
55extern struct afinfo afinfo;
56
57
58extern struct xtables_match *xtables_matches;
59extern struct xtables_target *xtables_targets;
60
61extern struct xtables_match *find_match(const char *name, enum xt_tryload,
62 struct xtables_rule_match **match);
63extern struct xtables_target *find_target(const char *name, enum xt_tryload);
64
65extern void _init(void);
66
67#endif
68