diff options
Diffstat (limited to 'src/conntrack/snprintf_xml.c')
-rw-r--r-- | src/conntrack/snprintf_xml.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/conntrack/snprintf_xml.c b/src/conntrack/snprintf_xml.c index ff34e86..928fc0b 100644 --- a/src/conntrack/snprintf_xml.c +++ b/src/conntrack/snprintf_xml.c @@ -53,33 +53,17 @@ * </flow> */ -static char *proto2str[IPPROTO_MAX] = { - [IPPROTO_TCP] = "tcp", - [IPPROTO_UDP] = "udp", - [IPPROTO_UDPLITE] = "udplite", - [IPPROTO_ICMP] = "icmp", - [IPPROTO_ICMPV6] = "icmp6", - [IPPROTO_SCTP] = "sctp", - [IPPROTO_GRE] = "gre", - [IPPROTO_UDPLITE] = "udplite", - [IPPROTO_DCCP] = "dccp", -}; -static char *l3proto2str[AF_MAX] = { - [AF_INET] = "ipv4", - [AF_INET6] = "ipv6" -}; - enum { __ADDR_SRC = 0, __ADDR_DST, }; -static char *__proto2str(u_int8_t protonum) +static const char *__proto2str(u_int8_t protonum) { return proto2str[protonum] ? proto2str[protonum] : "unknown"; } -static char *__l3proto2str(u_int8_t protonum) +static const char *__l3proto2str(u_int8_t protonum) { return l3proto2str[protonum] ? l3proto2str[protonum] : "unknown"; } |