From aab03dde8742b580d9c6f9a93e9f28e33aa2a22a Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 21 Feb 2019 10:21:42 +0100 Subject: [PATCH] mpm/ac-ks: rename files from -tile to -ks --- src/Makefile.am | 4 +-- ...ac-tile-small.c => util-mpm-ac-ks-small.c} | 4 +-- src/{util-mpm-ac-tile.c => util-mpm-ac-ks.c} | 26 +++++++++---------- src/{util-mpm-ac-tile.h => util-mpm-ac-ks.h} | 6 ++--- src/util-mpm.c | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) rename src/{util-mpm-ac-tile-small.c => util-mpm-ac-ks-small.c} (96%) rename src/{util-mpm-ac-tile.c => util-mpm-ac-ks.c} (99%) rename src/{util-mpm-ac-tile.h => util-mpm-ac-ks.h} (97%) diff --git a/src/Makefile.am b/src/Makefile.am index a54f5f3cd586..79b49c8adf00 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -447,8 +447,8 @@ util-memrchr.c util-memrchr.h \ util-misc.c util-misc.h \ util-mpm-ac-bs.c util-mpm-ac-bs.h \ util-mpm-ac.c util-mpm-ac.h \ -util-mpm-ac-tile.c util-mpm-ac-tile.h \ -util-mpm-ac-tile-small.c \ +util-mpm-ac-ks.c util-mpm-ac-ks.h \ +util-mpm-ac-ks-small.c \ util-mpm-hs.c util-mpm-hs.h \ util-mpm.c util-mpm.h \ util-napatech.c util-napatech.h \ diff --git a/src/util-mpm-ac-tile-small.c b/src/util-mpm-ac-ks-small.c similarity index 96% rename from src/util-mpm-ac-tile-small.c rename to src/util-mpm-ac-ks-small.c index c47a4f134ef2..44f51d02b9fb 100644 --- a/src/util-mpm-ac-tile-small.c +++ b/src/util-mpm-ac-ks-small.c @@ -20,12 +20,12 @@ * * \author Ken Steele - * Included by util-mpm-ac-tile.c with different SLOAD, SINDEX and + * Included by util-mpm-ac-ks.c with different SLOAD, SINDEX and * FUNC_NAME * */ -/* Only included into util-mpm-ac-tile.c, which defines FUNC_NAME +/* Only included into util-mpm-ac-ks.c, which defines FUNC_NAME * */ #ifdef FUNC_NAME diff --git a/src/util-mpm-ac-tile.c b/src/util-mpm-ac-ks.c similarity index 99% rename from src/util-mpm-ac-tile.c rename to src/util-mpm-ac-ks.c index ec7ba00e1064..cb521decd293 100644 --- a/src/util-mpm-ac-tile.c +++ b/src/util-mpm-ac-ks.c @@ -78,7 +78,7 @@ #include "util-unittest-helper.h" #include "util-memcmp.h" #include "util-memcpy.h" -#include "util-mpm-ac-tile.h" +#include "util-mpm-ac-ks.h" #if __BYTE_ORDER == __LITTLE_ENDIAN @@ -1280,7 +1280,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchSmall256 // y = 256 * (x & 0x7FFF) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 8, 15) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 128 */ #undef FUNC_NAME @@ -1288,7 +1288,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchSmall128 // y = 128 * (x & 0x7FFF) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 7, 15) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 64 */ #undef FUNC_NAME @@ -1296,7 +1296,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchSmall64 // y = 64 * (x & 0x7FFF) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 6, 15) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 32 */ #undef FUNC_NAME @@ -1304,7 +1304,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchSmall32 // y = 32 * (x & 0x7FFF) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 5, 15) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 16 */ #undef FUNC_NAME @@ -1312,7 +1312,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchSmall16 // y = 16 * (x & 0x7FFF) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 4, 15) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 8 */ #undef FUNC_NAME @@ -1320,7 +1320,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchSmall8 // y = 8 * (x & 0x7FFF) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 3, 15) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* * Search with Alphabet size of 256 and 8-bit next-state entries. @@ -1334,7 +1334,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchTiny256 // y = 256 * (x & 0x7F) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 8, 7) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 128 */ #undef FUNC_NAME @@ -1342,7 +1342,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchTiny128 // y = 128 * (x & 0x7F) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 7, 7) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 64 */ #undef FUNC_NAME @@ -1350,7 +1350,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchTiny64 // y = 64 * (x & 0x7F) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 6, 7) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 32 */ #undef FUNC_NAME @@ -1358,7 +1358,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchTiny32 // y = 32 * (x & 0x7F) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 5, 7) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 16 */ #undef FUNC_NAME @@ -1366,7 +1366,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchTiny16 // y = 16 * (x & 0x7F) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 4, 7) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /* Search with Alphabet size of 8 */ #undef FUNC_NAME @@ -1374,7 +1374,7 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr #define FUNC_NAME SCACTileSearchTiny8 // y = 8 * (x & 0x7F) #define SINDEX(y,x) SINDEX_INTERNAL(y, x, 3, 7) -#include "util-mpm-ac-tile-small.c" +#include "util-mpm-ac-ks-small.c" /** diff --git a/src/util-mpm-ac-tile.h b/src/util-mpm-ac-ks.h similarity index 97% rename from src/util-mpm-ac-tile.h rename to src/util-mpm-ac-ks.h index da2e21b407a7..05e0168b45d9 100644 --- a/src/util-mpm-ac-tile.h +++ b/src/util-mpm-ac-ks.h @@ -90,9 +90,9 @@ typedef struct SCACTileCtx_ { int32_t (*goto_table)[256]; int32_t *failure_table; - /* Number of states used by ac-tile */ + /* Number of states used */ uint32_t state_count; - /* Number of states allocated for ac-tile. */ + /* Number of states allocated. */ uint32_t allocated_state_count; uint32_t alpha_hist[256]; @@ -135,7 +135,7 @@ typedef struct SCACTileSearchCtx_ { /* Number of bytes in the array of bits. One bit per pattern in this MPM. */ uint32_t mpm_bitarray_size; - /* Number of states used by ac-tile */ + /* Number of states used */ uint32_t state_count; uint32_t pattern_cnt; diff --git a/src/util-mpm.c b/src/util-mpm.c index 8d851fe1d7dd..bae22d571fdc 100644 --- a/src/util-mpm.c +++ b/src/util-mpm.c @@ -30,7 +30,7 @@ /* include pattern matchers */ #include "util-mpm-ac.h" #include "util-mpm-ac-bs.h" -#include "util-mpm-ac-tile.h" +#include "util-mpm-ac-ks.h" #include "util-mpm-hs.h" #include "util-hashlist.h"