From 99dce740ef3ab5bdeb0d5fc1c2fa6499a230132b Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 16 Sep 2016 18:29:18 +0200 Subject: [PATCH] detect: mark alproto in keyword reg deprecated No existing code uses it, and it had been useless for some time. --- src/detect.c | 6 +----- src/detect.h | 7 ++++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/detect.c b/src/detect.c index 7a779f3ae4..b1d1c6d5a7 100644 --- a/src/detect.c +++ b/src/detect.c @@ -4204,8 +4204,6 @@ static inline void SigMultilinePrint(int i, char *prefix) if (sigmatch_table[i].desc) { printf("%sDescription: %s\n", prefix, sigmatch_table[i].desc); } - printf("%sProtocol: %s\n", prefix, - AppLayerGetProtoName(sigmatch_table[i].alproto)); printf("%sFeatures: ", prefix); PrintFeatureList(sigmatch_table[i].flags, ','); if (sigmatch_table[i].url) { @@ -4218,7 +4216,6 @@ void SigTableList(const char *keyword) { size_t size = sizeof(sigmatch_table) / sizeof(SigTableElmt); size_t i; - char *proto_name; if (keyword == NULL) { printf("=====Supported keywords=====\n"); @@ -4243,8 +4240,7 @@ void SigTableList(const char *keyword) printf("%s", sigmatch_table[i].desc); } /* Build feature */ - proto_name = AppLayerGetProtoName(sigmatch_table[i].alproto); - printf(";%s;", proto_name ? proto_name : "Unset"); + printf(";Unset;"); // this used to be alproto PrintFeatureList(sigmatch_table[i].flags, ':'); printf(";"); if (sigmatch_table[i].url) { diff --git a/src/detect.h b/src/detect.h index 4123922fac..807dcafc2c 100644 --- a/src/detect.h +++ b/src/detect.h @@ -889,9 +889,6 @@ typedef struct SigTableElmt_ { Flow *, /**< *LOCKED* flow */ uint8_t flags, File *, Signature *, SigMatch *); - /** app layer proto from app-layer-protos.h this match applies to */ - AppProto alproto; - /** keyword setup function pointer */ int (*Setup)(DetectEngineCtx *, Signature *, char *); @@ -899,6 +896,10 @@ typedef struct SigTableElmt_ { void (*RegisterTests)(void); uint8_t flags; + + /** unused: warn user. Will be removed in the future. */ + AppProto alproto __attribute__((deprecated)); + char *name; /**< keyword name alias */ char *alias; /**< name alias */ char *desc;