]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Removed unused function MpmMatcherGetMaxPatternLength.
authorAnoop Saldanha <anoopsaldanha@gmail.com>
Fri, 1 Nov 2013 05:36:14 +0000 (11:06 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 3 Dec 2013 16:48:48 +0000 (17:48 +0100)
src/util-mpm.c
src/util-mpm.h

index 736c13322107210ffd900bb33fde9a2025bb3709..989f927b61728a39b300e68d31aa006d84f244ee 100644 (file)
@@ -557,19 +557,6 @@ void PmqFree(PatternMatcherQueue *pmq) {
     PmqCleanup(pmq);
 }
 
-/**
- * \brief Return the pattern max length of a registered matcher
- * \retval 0 if it has no limit
- * \retval max_pattern_length of the specified matcher type
- * \retval -1 if the type is not registered return -1
- */
-int32_t MpmMatcherGetMaxPatternLength(uint16_t matcher) {
-    if (matcher < MPM_TABLE_SIZE)
-        return mpm_table[matcher].max_pattern_length;
-    else
-        return -1;
-}
-
 void MpmInitThreadCtx(MpmThreadCtx *mpm_thread_ctx, uint16_t matcher, uint32_t max_id) {
     mpm_table[matcher].InitThreadCtx(NULL, mpm_thread_ctx, max_id);
 }
index 4ccff43a2a036d7fee2d1db82130d3436811c5b5..d9c4b8c0c698d6ace3e9d6f48ed4a9c490227d4c 100644 (file)
@@ -112,11 +112,14 @@ typedef struct MpmCtx_ {
     void *ctx;
     uint16_t mpm_type;
 
-    /* used uint16_t here to avoiding using a pad.  You can use a uint8_t
-     * here as well */
+    /* Indicates if this a global mpm_ctx.  Global mpm_ctx is the one that
+     * is instantiated when we use "single".  Non-global is "full", i.e.
+     * one per sgh.  We are using a uint16_t here to avoiding using a pad.
+     * You can use a uint8_t here as well. */
     uint16_t global;
 
-    uint32_t pattern_cnt;       /* unique patterns */
+    /* unique patterns */
+    uint32_t pattern_cnt;
 
     uint16_t minlen;
     uint16_t maxlen;
@@ -240,9 +243,6 @@ void PmqFree(PatternMatcherQueue *);
 void MpmTableSetup(void);
 void MpmRegisterTests(void);
 
-/** Return the max pattern length of a Matcher type given as arg */
-int32_t MpmMatcherGetMaxPatternLength(uint16_t);
-
 int MpmVerifyMatch(MpmThreadCtx *, PatternMatcherQueue *, uint32_t);
 void MpmInitCtx(MpmCtx *mpm_ctx, uint16_t matcher);
 void MpmInitThreadCtx(MpmThreadCtx *mpm_thread_ctx, uint16_t, uint32_t);