summaryrefslogtreecommitdiffstats
path: root/include/libipset/args.h
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2017-10-09 18:43:04 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2018-01-02 21:47:27 +0100
commitd71dd93599b932693f045301424c2276cd25a87e (patch)
treed1779c04b8bb2a44915483751ac33e498b1a2ad9 /include/libipset/args.h
parente2a84a4a7bb8cdebfe4c0990b79179e2fd717a48 (diff)
Userspace revision handling is reworked
In order to make it simpler and more straightforward to express the revisions of the set type, all keywords and their parsing are separated from the individual set types. All backward compatibility arguments are recognized and ignored arguments are supported. Recognized but ignored arguments will be removed in a later release.
Diffstat (limited to 'include/libipset/args.h')
-rw-r--r--include/libipset/args.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/include/libipset/args.h b/include/libipset/args.h
new file mode 100644
index 0000000..cdec180
--- /dev/null
+++ b/include/libipset/args.h
@@ -0,0 +1,71 @@
+/* Copyright 2017 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef LIBIPSET_ARGS_H
+#define LIBIPSET_ARGS_H
+
+/* Keywords */
+enum ipset_keywords {
+ IPSET_ARG_NONE = 0,
+ /* Family and aliases */
+ IPSET_ARG_FAMILY, /* family */
+ IPSET_ARG_INET, /* -4 */
+ IPSET_ARG_INET6, /* -6 */
+ /* Hash types */
+ IPSET_ARG_HASHSIZE, /* hashsize */
+ IPSET_ARG_MAXELEM, /* maxelem */
+ /* Ignored options: backward compatibilty */
+ IPSET_ARG_PROBES, /* probes */
+ IPSET_ARG_RESIZE, /* resize */
+ IPSET_ARG_GC, /* gc */
+ IPSET_ARG_IGNORED_FROM, /* from */
+ IPSET_ARG_IGNORED_TO, /* to */
+ IPSET_ARG_IGNORED_NETWORK, /* network */
+ /* List type */
+ IPSET_ARG_SIZE, /* size */
+ /* IP-type elements */
+ IPSET_ARG_IPRANGE, /* range */
+ IPSET_ARG_NETMASK, /* netmask */
+ /* Port-type elements */
+ IPSET_ARG_PORTRANGE, /* range */
+ /* Setname type elements */
+ IPSET_ARG_BEFORE, /* before */
+ IPSET_ARG_AFTER, /* after */
+ /* Backward compatibility */
+ IPSET_ARG_FROM_IP, /* from */
+ IPSET_ARG_TO_IP, /* to */
+ IPSET_ARG_NETWORK, /* network */
+ IPSET_ARG_FROM_PORT, /* from */
+ IPSET_ARG_TO_PORT, /* to */
+ /* Extra flags, options */
+ IPSET_ARG_FORCEADD, /* forceadd */
+ IPSET_ARG_MARKMASK, /* markmask */
+ IPSET_ARG_NOMATCH, /* nomatch */
+ /* Extensions */
+ IPSET_ARG_TIMEOUT, /* timeout */
+ IPSET_ARG_COUNTERS, /* counters */
+ IPSET_ARG_PACKETS, /* packets */
+ IPSET_ARG_BYTES, /* bytes */
+ IPSET_ARG_COMMENT, /* comment */
+ IPSET_ARG_ADT_COMMENT, /* comment */
+ IPSET_ARG_SKBINFO, /* skbinfo */
+ IPSET_ARG_SKBMARK, /* skbmark */
+ IPSET_ARG_SKBPRIO, /* skbprio */
+ IPSET_ARG_SKBQUEUE, /* skbqueue */
+ IPSET_ARG_MAX,
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const struct ipset_arg * ipset_keyword(enum ipset_keywords i);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBIPSET_ARGS_H */