1
1
#ifndef _IPTABLES_USER_H
2
2
#define _IPTABLES_USER_H
5
#include "libiptc/libiptc.h"
7
#ifndef IPT_SO_GET_REVISION_MATCH /* Old kernel source. */
8
#define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2)
9
#define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3)
10
#endif /* IPT_SO_GET_REVISION_MATCH Old kernel source */
12
#define iptables_rule_match xtables_rule_match
13
#define ipt_tryload xt_tryload
4
#include <netinet/ip.h>
6
#include <libiptc/libiptc.h>
7
#include <iptables/internal.h>
17
9
/* Your shared library should call one of these. */
18
10
extern int do_command(int argc, char *argv[], char **table,
19
iptc_handle_t *handle);
11
struct iptc_handle **handle);
20
12
extern int delete_chain(const ipt_chainlabel chain, int verbose,
21
iptc_handle_t *handle);
13
struct iptc_handle *handle);
22
14
extern int flush_entries(const ipt_chainlabel chain, int verbose,
23
iptc_handle_t *handle);
24
extern int for_each_chain(int (*fn)(const ipt_chainlabel, int, iptc_handle_t *),
25
int verbose, int builtinstoo, iptc_handle_t *handle);
15
struct iptc_handle *handle);
16
extern int for_each_chain(int (*fn)(const ipt_chainlabel, int, struct iptc_handle *),
17
int verbose, int builtinstoo, struct iptc_handle *handle);
26
18
extern void print_rule(const struct ipt_entry *e,
27
iptc_handle_t *handle, const char *chain, int counters);
19
struct iptc_handle *handle, const char *chain, int counters);
29
21
/* kernel revision handling */
30
22
extern int kernel_version;