Skip to content

Commit

Permalink
mpm/ac-ks: rename files from -tile to -ks
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Feb 21, 2019
1 parent 6fcd2db commit aab03dd
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions src/util-mpm-ac-tile-small.c → src/util-mpm-ac-ks-small.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
*
* \author Ken Steele <[email protected]>
* 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
Expand Down
26 changes: 13 additions & 13 deletions src/util-mpm-ac-tile.c → src/util-mpm-ac-ks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -1280,47 +1280,47 @@ 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
#undef SINDEX
#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
#undef SINDEX
#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
#undef SINDEX
#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
#undef SINDEX
#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
#undef SINDEX
#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.
Expand All @@ -1334,47 +1334,47 @@ 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
#undef SINDEX
#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
#undef SINDEX
#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
#undef SINDEX
#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
#undef SINDEX
#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
#undef SINDEX
#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"


/**
Expand Down
6 changes: 3 additions & 3 deletions src/util-mpm-ac-tile.h → src/util-mpm-ac-ks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/util-mpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit aab03dd

Please sign in to comment.