]>
git.proxmox.com Git - mirror_iproute2.git/blob - include/xt-internal.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _XTABLES_INTERNAL_H
3 #define _XTABLES_INTERNAL_H 1
6 # define XT_LIB_DIR "/lib/xtables"
9 /* protocol family dependent informations */
14 /* prefix of library name (ex "libipt_" */
17 /* used by setsockopt (ex IPPROTO_IP */
20 /* kernel module (ex "ip_tables" */
23 /* optname to check revision support of match */
26 /* optname to check revision support of match */
37 struct xtables_rule_match
{
38 struct xtables_rule_match
*next
;
39 struct xtables_match
*match
;
40 /* Multiple matches of the same type: the ones before
41 the current one are completed from parsing point of view */
42 unsigned int completed
;
47 extern void *fw_calloc(size_t count
, size_t size
);
48 extern void *fw_malloc(size_t size
);
50 extern const char *modprobe_program
;
51 extern int xtables_insmod(const char *modname
, const char *modprobe
, int quiet
);
52 extern int load_xtables_ko(const char *modprobe
, int quiet
);
54 /* This is decleared in ip[6]tables.c */
55 extern struct afinfo afinfo
;
57 /* Keeping track of external matches and targets: linked lists. */
58 extern struct xtables_match
*xtables_matches
;
59 extern struct xtables_target
*xtables_targets
;
61 extern struct xtables_match
*find_match(const char *name
, enum xt_tryload
,
62 struct xtables_rule_match
**match
);
63 extern struct xtables_target
*find_target(const char *name
, enum xt_tryload
);
65 extern void _init(void);
67 #endif /* _XTABLES_INTERNAL_H */