summaryrefslogtreecommitdiffstats
path: root/include/libipset
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-05-23 23:27:42 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-05-23 23:27:42 +0200
commit0907c31db34713f0e74b90f725fabb5c91c5f45f (patch)
tree16874dabcd4e4ee0cc534fde44009ee7d1df7723 /include/libipset
parent4b913c17499935074c6ef33cea79cdb6abd097d1 (diff)
Allow saving to/restoring from a file without shell redirection
Mathieu Bridon suggested that in some environments where there is no access to a full shell with input/output redirection, it'd be useful to read from/write to directly a file (bugzilla #788). The patch adds the new "-file" option to specify a filename to print into when listing/saving sets or read from when restoring sets.
Diffstat (limited to 'include/libipset')
-rw-r--r--include/libipset/session.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libipset/session.h b/include/libipset/session.h
index 467bb2f..988233e 100644
--- a/include/libipset/session.h
+++ b/include/libipset/session.h
@@ -97,6 +97,8 @@ extern int ipset_cmd(struct ipset_session *session, enum ipset_cmd cmd,
typedef int (*ipset_outfn)(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
+extern int ipset_session_outfn(struct ipset_session *session,
+ ipset_outfn outfn);
extern struct ipset_session *ipset_session_init(ipset_outfn outfn);
extern int ipset_session_fini(struct ipset_session *session);