Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,6 @@ EXTRA_DIST = \
tests/detect-http-stat-msg.c \
tests/detect-http-uri.c \
tests/detect-http-user-agent.c \
tests/detect-snmp-community.c \
tests/detect-ssl-state.c \
tests/detect-ssl-version.c \
tests/detect-template-buffer.c \
Expand Down
19 changes: 3 additions & 16 deletions src/detect-snmp-community.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,17 @@
static int DetectSNMPCommunitySetup(DetectEngineCtx *, Signature *,
const char *);
static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms,
Flow *f, const uint8_t flow_flags,
void *txv, const int list_id);
#ifdef UNITTESTS
static void DetectSNMPCommunityRegisterTests(void);
#endif
const DetectEngineTransforms *transforms, Flow *f, const uint8_t flow_flags, void *txv,
const int list_id);
static int g_snmp_rust_id = 0;

void DetectSNMPCommunityRegister(void)
{
sigmatch_table[DETECT_AL_SNMP_COMMUNITY].name = "snmp.community";
sigmatch_table[DETECT_AL_SNMP_COMMUNITY].desc =
"SNMP content modifier to match on the SNMP community";
sigmatch_table[DETECT_AL_SNMP_COMMUNITY].Setup =
DetectSNMPCommunitySetup;
#ifdef UNITTESTS
sigmatch_table[DETECT_AL_SNMP_COMMUNITY].RegisterTests = DetectSNMPCommunityRegisterTests;
#endif
sigmatch_table[DETECT_AL_SNMP_COMMUNITY].Setup = DetectSNMPCommunitySetup;
sigmatch_table[DETECT_AL_SNMP_COMMUNITY].url = "/rules/snmp-keywords.html#snmp-community";

sigmatch_table[DETECT_AL_SNMP_COMMUNITY].flags |= SIGMATCH_NOOPT|SIGMATCH_INFO_STICKY_BUFFER;

/* register inspect engines */
Expand Down Expand Up @@ -108,7 +99,3 @@ static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,

return buffer;
}

#ifdef UNITTESTS
#include "tests/detect-snmp-community.c"
#endif /* UNITTESTS */
113 changes: 0 additions & 113 deletions src/tests/detect-snmp-community.c

This file was deleted.