From: Anoop Saldanha Date: Fri, 1 Nov 2013 05:36:14 +0000 (+0530) Subject: Removed unused function MpmMatcherGetMaxPatternLength. X-Git-Tag: suricata-2.0beta2~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c0456ebbe7840c87cdefe808b4044676a1e5993;p=thirdparty%2Fsuricata.git Removed unused function MpmMatcherGetMaxPatternLength. --- diff --git a/src/util-mpm.c b/src/util-mpm.c index 736c133221..989f927b61 100644 --- a/src/util-mpm.c +++ b/src/util-mpm.c @@ -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); } diff --git a/src/util-mpm.h b/src/util-mpm.h index 4ccff43a2a..d9c4b8c0c6 100644 --- a/src/util-mpm.h +++ b/src/util-mpm.h @@ -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);