]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/file: Remove centralized proto definition
authorJeff Lucovsky <jlucovsky@oisf.net>
Mon, 10 Jul 2023 14:41:08 +0000 (10:41 -0400)
committerVictor Julien <vjulien@oisf.net>
Fri, 14 Jul 2023 15:57:40 +0000 (17:57 +0200)
Issue: 4145

Remove centralized protocol definitions for file handling in favor of
consolidated file access handling.

src/detect-engine-file.c
src/detect-engine-file.h

index 1738c9458919661d6298fe8d49eb8face8d6a228..e7fd9e0c4ad75275fa7adf82245aee3603a42b9a 100644 (file)
 #include "util-profiling.h"
 #include "util-validate.h"
 
-FileAppProto file_protos_ts_static[] = {
-    { ALPROTO_HTTP1, HTP_REQUEST_BODY },
-    { ALPROTO_SMTP, 0 },
-    { ALPROTO_FTP, 0 },
-    { ALPROTO_FTPDATA, 0 },
-    { ALPROTO_SMB, 0 },
-    { ALPROTO_NFS, 0 },
-    { ALPROTO_HTTP2, HTTP2StateDataClient },
-    { ALPROTO_UNKNOWN, 0 },
-};
-
-FileAppProto file_protos_tc_static[] = {
-    { ALPROTO_HTTP1, HTP_RESPONSE_BODY },
-    { ALPROTO_FTP, 0 },
-    { ALPROTO_FTPDATA, 0 },
-    { ALPROTO_SMB, 0 },
-    { ALPROTO_NFS, 0 },
-    { ALPROTO_HTTP2, HTTP2StateDataServer },
-    { ALPROTO_UNKNOWN, 0 },
-};
-
-FileAppProto *file_protos_ts = file_protos_ts_static;
-FileAppProto *file_protos_tc = file_protos_tc_static;
-
 /**
  *  \brief Inspect the file inspecting keywords.
  *
index 2f731087eada49dc4561713d3c8029665387aa12..3705a8f6e60176a1d8b8cadc4262cb77f1e0c649 100644 (file)
@@ -28,12 +28,4 @@ uint8_t DetectFileInspectGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx
         const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f,
         uint8_t flags, void *_alstate, void *tx, uint64_t tx_id);
 
-typedef struct FileAppProto {
-    AppProto alproto;
-    int progress;
-} FileAppProto;
-
-extern FileAppProto *file_protos_ts;
-extern FileAppProto *file_protos_tc;
-
 #endif /* __DETECT_ENGINE_FILE_H__ */