diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-02-28 18:21:09 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-06-22 10:47:03 +0200 |
commit | ebff9f7226ec4077e88253991edf5e1260b98144 (patch) | |
tree | 761ba2eb42716b27f1bb9c277e01a60f94a35549 | |
parent | 8cc931c15b42a71ce0d28384ae03bfa8a0a06d32 (diff) | |
download | conntrack-tools-ebff9f7226ec4077e88253991edf5e1260b98144.tar.gz conntrack-tools-ebff9f7226ec4077e88253991edf5e1260b98144.zip |
conntrack: expand array that maps option-flags to option-names
This patch is a cleanup, it expands an array that contains the
correspondence between the option-flags and the option-names.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | src/conntrack.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/conntrack.c b/src/conntrack.c index b8806bd..8006a60 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -59,9 +59,29 @@ #include <libnetfilter_conntrack/libnetfilter_conntrack.h> static const char *optflags[NUMBER_OF_OPT] = { -"src","dst","reply-src","reply-dst","protonum","timeout","status","zero", -"event-mask","tuple-src","tuple-dst","mask-src","mask-dst","nat-range","mark", -"id","family","src-nat","dst-nat","output","secmark","buffersize"}; + [CT_OPT_ORIG_SRC_BIT] = "src", + [CT_OPT_ORIG_DST_BIT] = "dst", + [CT_OPT_REPL_SRC_BIT] = "reply-src", + [CT_OPT_REPL_DST_BIT] = "reply-dst", + [CT_OPT_PROTO_BIT] = "protonum", + [CT_OPT_TIMEOUT_BIT] = "timeout", + [CT_OPT_STATUS_BIT] = "status", + [CT_OPT_ZERO_BIT] = "zero", + [CT_OPT_EVENT_MASK_BIT] = "event-mask", + [CT_OPT_EXP_SRC_BIT] = "tuple-src", + [CT_OPT_EXP_DST_BIT] = "tuple-dst", + [CT_OPT_MASK_SRC_BIT] = "mask-src", + [CT_OPT_MASK_DST_BIT] = "mask-dst", + [CT_OPT_NATRANGE_BIT] = "nat-range", + [CT_OPT_MARK_BIT] = "mark", + [CT_OPT_ID_BIT] = "id", + [CT_OPT_FAMILY_BIT] = "family", + [CT_OPT_SRC_NAT_BIT] = "src-nat", + [CT_OPT_DST_NAT_BIT] = "dst-nat", + [CT_OPT_OUTPUT_BIT] = "output", + [CT_OPT_SECMARK_BIT] = "secmark", + [CT_OPT_BUFFERSIZE_BIT] = "buffer-size" +}; static struct option original_opts[] = { {"dump", 2, 0, 'L'}, |