3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef __WS_MEMPBRK_H__
11 #define __WS_MEMPBRK_H__
13 #include <wireshark.h>
16 #include <emmintrin.h>
19 /** The pattern object used for ws_mempbrk_exec().
29 /** Compile the pattern for the needles to find using ws_mempbrk_exec().
31 WS_DLL_PUBLIC
void ws_mempbrk_compile(ws_mempbrk_pattern
* pattern
, const char *needles
);
33 /** Scan for the needles specified by the compiled pattern.
35 WS_DLL_PUBLIC
const uint8_t *ws_mempbrk_exec(const uint8_t* haystack
, size_t haystacklen
, const ws_mempbrk_pattern
* pattern
, unsigned char *found_needle
);
37 /** Scan for the needles specified by the compiled pattern, starting at the
38 * end of the haystack and working backwards.
40 WS_DLL_PUBLIC
const uint8_t *ws_memrpbrk_exec(const uint8_t* haystack
, size_t haystacklen
, const ws_mempbrk_pattern
* pattern
, unsigned char *found_needle
);
42 #endif /* __WS_MEMPBRK_H__ */