path: root/include/iptables.h
diff options
author/C=EU/ST=EU/CN=Patrick McHardy/ </C=EU/ST=EU/CN=Patrick McHardy/>2008-05-13 11:08:26 +0000
committer/C=EU/ST=EU/CN=Patrick McHardy/ </C=EU/ST=EU/CN=Patrick McHardy/>2008-05-13 11:08:26 +0000
commit36a36fc3c41b8b868e8fbd181c50e1ca3ac6d4c5 (patch)
tree8ae6e4457a0d70a40b573b606488744a62a7a3bb /include/iptables.h
parent6a10cb1a5848240c2946f9c24bf82b0f8efb8e4e (diff)
[patch 3/4] iptables --list-rules command
Adds iptables --list-rules (-S) command, acting as a combination of iptables --list and iptables-save. The primary motivation behind this patch is to get iptables-save like output capabilities in iptables-restore, allowing "iptables-restore -n" to be used as a consistent API to iptables for all kind of operations, not only blind updates.. As a bonus iptables also gets the capability of printing the rules as-is. This completely replaces the earlier patch which added the --rules option. Henrik Nordstrom <>
Diffstat (limited to 'include/iptables.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/include/iptables.h b/include/iptables.h
index e5f8b40..ecc7168 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -23,6 +23,8 @@ extern int flush_entries(const ipt_chainlabel chain, int verbose,
iptc_handle_t *handle);
extern int for_each_chain(int (*fn)(const ipt_chainlabel, int, iptc_handle_t *),
int verbose, int builtinstoo, iptc_handle_t *handle);
+extern void print_rule(const struct ipt_entry *e,
+ iptc_handle_t *handle, const char *chain, int counters);
/* kernel revision handling */
extern int kernel_version;