Skip to content

Commit

Permalink
detect/file: Remove centralized proto definition
Browse files Browse the repository at this point in the history
Issue: 4145

Remove centralized protocol definitions for file handling in favor of
consolidated file access handling.
  • Loading branch information
jlucovsky authored and victorjulien committed Jul 14, 2023
1 parent f735e30 commit 59fea84
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
24 changes: 0 additions & 24 deletions src/detect-engine-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,6 @@
#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.
*
Expand Down
8 changes: 0 additions & 8 deletions src/detect-engine-file.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */

0 comments on commit 59fea84

Please sign in to comment.