Update Packaging Spec file
[external/iptables.git] / include / iptables.h
1 #ifndef _IPTABLES_USER_H
2 #define _IPTABLES_USER_H
3
4 #include <netinet/ip.h>
5 #include <xtables.h>
6 #include <libiptc/libiptc.h>
7 #include <iptables/internal.h>
8
9 /* Your shared library should call one of these. */
10 extern int do_command(int argc, char *argv[], char **table,
11                       struct iptc_handle **handle);
12 extern int delete_chain(const ipt_chainlabel chain, int verbose,
13                         struct iptc_handle *handle);
14 extern int flush_entries(const ipt_chainlabel chain, int verbose, 
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);
18 extern void print_rule(const struct ipt_entry *e,
19                 struct iptc_handle *handle, const char *chain, int counters);
20
21 /* kernel revision handling */
22 extern int kernel_version;
23 extern void get_kernel_version(void);
24 #define LINUX_VERSION(x,y,z)    (0x10000*(x) + 0x100*(y) + z)
25 #define LINUX_VERSION_MAJOR(x)  (((x)>>16) & 0xFF)
26 #define LINUX_VERSION_MINOR(x)  (((x)>> 8) & 0xFF)
27 #define LINUX_VERSION_PATCH(x)  ( (x)      & 0xFF)
28
29 extern struct xtables_globals iptables_globals;
30
31 #endif /*_IPTABLES_USER_H*/