]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: mark alproto in keyword reg deprecated
authorVictor Julien <victor@inliniac.net>
Fri, 16 Sep 2016 16:29:18 +0000 (18:29 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 19 Sep 2016 11:03:48 +0000 (13:03 +0200)
No existing code uses it, and it had been useless for some time.

src/detect.c
src/detect.h

index 7a779f3ae4aedf0e0c410c2f09baf43cfb15970f..b1d1c6d5a7bc035c756bb3b2f09e60313b766266 100644 (file)
@@ -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) {
index 4123922fac0b47a7b2c611bdcc9d056e2d78f5bc..807dcafc2cf3917a23b68d1552fa920d5655e5dc 100644 (file)
@@ -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;