From 3fd6b24ace319b139ec3c4e3031a5f05d21e304e Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Tue, 15 Jun 2010 13:30:55 +0200 Subject: ipset 5 in an almost ready state - milestone 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 --- include/libipset/session.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'include/libipset/session.h') 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 /* printf */ #include /* enum ipset_cmd */ -#include /* 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); -- cgit v1.2.3