summaryrefslogtreecommitdiffstats
path: root/include/libipset/session.h
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-06-15 13:30:55 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-06-15 13:30:55 +0200
commit3fd6b24ace319b139ec3c4e3031a5f05d21e304e (patch)
treee6ac952e95fa44968196149e0172b1ef13e8236f /include/libipset/session.h
parent00bcb2b40450eca4c7ad785bf85b12692e8d29af (diff)
ipset 5 in an almost ready state - milestonev5.0-pre1
Reworked protocol and internal interfaces, missing set types added, backward compatibility verified, lots of tests added (and thanks to the tests, bugs fixed), even the manpage is rewritten ;-). Countless changes everywhere... The missing bits before announcing ipset 5: - net namespace support - new iptables/ip6tables extension library - iptables/ip6tables match and target tests (backward/forward compatibility) - tests on catching syntax errors
Diffstat (limited to 'include/libipset/session.h')
-rw-r--r--include/libipset/session.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/libipset/session.h b/include/libipset/session.h
index 71b8e02..cc0940e 100644
--- a/include/libipset/session.h
+++ b/include/libipset/session.h
@@ -12,7 +12,6 @@
#include <stdio.h> /* printf */
#include <libipset/linux_ip_set.h> /* enum ipset_cmd */
-#include <libipset/ui.h> /* enum ipset_envopt */
/* Report and output buffer sizes */
#define IPSET_ERRORBUFLEN 1024
@@ -54,6 +53,23 @@ extern const char * ipset_session_warning(const struct ipset_session *session);
#define ipset_session_data_get(session, opt) \
ipset_data_get(ipset_session_data(session), opt)
+/* Environment option flags */
+enum ipset_envopt {
+ IPSET_ENV_BIT_SORTED = 0,
+ IPSET_ENV_SORTED = (1 << IPSET_ENV_BIT_SORTED),
+ IPSET_ENV_BIT_QUIET = 1,
+ IPSET_ENV_QUIET = (1 << IPSET_ENV_BIT_QUIET),
+ IPSET_ENV_BIT_RESOLVE = 2,
+ IPSET_ENV_RESOLVE = (1 << IPSET_ENV_BIT_RESOLVE),
+ IPSET_ENV_BIT_EXIST = 3,
+ IPSET_ENV_EXIST = (1 << IPSET_ENV_BIT_EXIST),
+};
+
+extern int ipset_envopt_parse(struct ipset_session *session,
+ int env, const char *str);
+extern bool ipset_envopt_test(struct ipset_session *session,
+ enum ipset_envopt env);
+
enum ipset_output_mode {
IPSET_LIST_NONE,
IPSET_LIST_PLAIN,
@@ -61,10 +77,6 @@ enum ipset_output_mode {
IPSET_LIST_XML,
};
-extern int ipset_envopt_parse(struct ipset_session *session,
- int env, const char *str);
-extern bool ipset_envopt_test(struct ipset_session *session,
- enum ipset_envopt env);
extern int ipset_session_output(struct ipset_session *session,
enum ipset_output_mode mode);