Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 1 | #ifndef _IPTABLES_USER_H |
| 2 | #define _IPTABLES_USER_H |
| 3 | |
Jan Engelhardt | ef18e81 | 2008-08-04 12:47:48 +0200 | [diff] [blame] | 4 | #include <netinet/ip.h> |
| 5 | #include <xtables.h> |
| 6 | #include <libiptc/libiptc.h> |
Jan Engelhardt | c02e808 | 2009-02-10 10:40:15 +0100 | [diff] [blame] | 7 | #include <iptables/internal.h> |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 8 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 9 | /* Your shared library should call one of these. */ |
Maciej Zenczykowski | c1e04bd | 2011-04-04 15:38:11 +0200 | [diff] [blame^] | 10 | extern int do_command4(int argc, char *argv[], char **table, |
Jan Engelhardt | fd18731 | 2008-11-10 16:59:27 +0100 | [diff] [blame] | 11 | struct iptc_handle **handle); |
Maciej Zenczykowski | e5c061a | 2011-04-04 15:36:14 +0200 | [diff] [blame] | 12 | extern int delete_chain4(const ipt_chainlabel chain, int verbose, |
Jan Engelhardt | 1c9015b | 2008-11-10 17:00:41 +0100 | [diff] [blame] | 13 | struct iptc_handle *handle); |
Maciej Zenczykowski | cc38d05 | 2011-04-04 15:35:20 +0200 | [diff] [blame] | 14 | extern int flush_entries4(const ipt_chainlabel chain, int verbose, |
Jan Engelhardt | 1c9015b | 2008-11-10 17:00:41 +0100 | [diff] [blame] | 15 | struct iptc_handle *handle); |
Maciej Zenczykowski | e70844a | 2011-04-04 15:34:28 +0200 | [diff] [blame] | 16 | extern int for_each_chain4(int (*fn)(const ipt_chainlabel, int, struct iptc_handle *), |
Jan Engelhardt | 1c9015b | 2008-11-10 17:00:41 +0100 | [diff] [blame] | 17 | int verbose, int builtinstoo, struct iptc_handle *handle); |
Maciej Zenczykowski | bb9fe80 | 2011-04-04 15:37:13 +0200 | [diff] [blame] | 18 | extern void print_rule4(const struct ipt_entry *e, |
Jan Engelhardt | 1c9015b | 2008-11-10 17:00:41 +0100 | [diff] [blame] | 19 | struct iptc_handle *handle, const char *chain, int counters); |
Phil Oester | 8cf6591 | 2005-09-19 15:00:33 +0000 | [diff] [blame] | 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 | |
Jamal Hadi Salim | 617d3d1 | 2009-02-11 16:28:31 -0500 | [diff] [blame] | 29 | extern struct xtables_globals iptables_globals; |
| 30 | |
Marc Boucher | e6869a8 | 2000-03-20 06:03:29 +0000 | [diff] [blame] | 31 | #endif /*_IPTABLES_USER_H*/ |