1 #ifndef _XTABLES_INTERNAL_H
2 #define _XTABLES_INTERNAL_H 1
5 # define XT_LIB_DIR "/usr/local/lib/iptables"
8 /* protocol family dependent informations */
13 /* prefix of library name (ex "libipt_" */
16 /* used by setsockopt (ex IPPROTO_IP */
19 /* kernel module (ex "ip_tables" */
22 /* optname to check revision support of match */
25 /* optname to check revision support of match */
36 struct xtables_rule_match {
37 struct xtables_rule_match *next;
38 struct xtables_match *match;
39 /* Multiple matches of the same type: the ones before
40 the current one are completed from parsing point of view */
41 unsigned int completed;
46 extern void *fw_calloc(size_t count, size_t size);
47 extern void *fw_malloc(size_t size);
49 extern const char *modprobe_program;
50 extern int xtables_insmod(const char *modname, const char *modprobe, int quiet);
51 extern int load_xtables_ko(const char *modprobe, int quiet);
53 /* This is decleared in ip[6]tables.c */
54 extern struct afinfo afinfo;
56 /* Keeping track of external matches and targets: linked lists. */
57 extern struct xtables_match *xtables_matches;
58 extern struct xtables_target *xtables_targets;
60 extern struct xtables_match *find_match(const char *name, enum xt_tryload,
61 struct xtables_rule_match **match);
62 extern struct xtables_target *find_target(const char *name, enum xt_tryload);
64 extern void _init(void);
66 #endif /* _XTABLES_INTERNAL_H */