Make AppProtoToString compilation fail on missing 'case's.
const char *AppProtoToString(AppProto alproto)
{
const char *proto_name = NULL;
+ enum AppProtoEnum proto = alproto;
- switch (alproto) {
+ switch (proto) {
case ALPROTO_HTTP:
proto_name = "http";
break;
#ifndef __APP_LAYER_PROTOS_H__
#define __APP_LAYER_PROTOS_H__
-enum {
+enum AppProtoEnum {
ALPROTO_UNKNOWN = 0,
ALPROTO_HTTP,
ALPROTO_FTP,
ALPROTO_MAX,
};
+/* not using the enum as that is a unsigned int, so 4 bytes */
typedef uint16_t AppProto;
/**