diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-04-14 10:36:07 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-04-14 10:36:07 +0200 |
commit | a1586cea00b32b401c76f17aab4121967051d883 (patch) | |
tree | 8d5e64845459b35636a9f04c3bf74ccd6f4292cd /src/conntrack/snprintf_default.c | |
parent | 7533cca286edee99db29eb1238653a2040738d3e (diff) |
snprintf: remove duplicated protocol string definitions
This patch merges duplicated protocol string definitions in the
snprintf infrastructure. I have also fixed the size of the string
array. This patch is a cleanup.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/conntrack/snprintf_default.c')
-rw-r--r-- | src/conntrack/snprintf_default.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/conntrack/snprintf_default.c b/src/conntrack/snprintf_default.c index 4802c47..5934306 100644 --- a/src/conntrack/snprintf_default.c +++ b/src/conntrack/snprintf_default.c @@ -7,60 +7,6 @@ #include "internal/internal.h" -static char *proto2str[IPPROTO_MAX] = { - [IPPROTO_TCP] = "tcp", - [IPPROTO_UDP] = "udp", - [IPPROTO_UDPLITE] = "udplite", - [IPPROTO_ICMP] = "icmp", - [IPPROTO_ICMPV6] = "icmpv6", - [IPPROTO_SCTP] = "sctp", - [IPPROTO_GRE] = "gre", - [IPPROTO_UDPLITE] = "udplite", - [IPPROTO_DCCP] = "dccp", -}; - -static char *l3proto2str[AF_MAX] = { - [AF_INET] = "ipv4", - [AF_INET6] = "ipv6" -}; - -static const char *states[] = { - "NONE", - "SYN_SENT", - "SYN_RECV", - "ESTABLISHED", - "FIN_WAIT", - "CLOSE_WAIT", - "LAST_ACK", - "TIME_WAIT", - "CLOSE", - "LISTEN" -}; - -static const char *sctp_states[] = { - "NONE", - "CLOSED", - "COOKIE_WAIT", - "COOKIE_ECHOED", - "ESTABLISHED", - "SHUTDOWN_SENT", - "SHUTDOWN_RECD", - "SHUTDOWN_ACK_SENT", -}; - -static const char *dccp_states[] = { - "NONE", - "REQUEST", - "RESPOND", - "PARTOPEN", - "OPEN", - "CLOSEREQ", - "CLOSING", - "TIMEWAIT", - "IGNORE", - "INVALID", -}; - static int __snprintf_l3protocol(char *buf, unsigned int len, const struct nf_conntrack *ct) |