| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
ws_mempbrk.h
Go to the documentation of this file.
1
10#ifndef __WS_MEMPBRK_H__
11#define __WS_MEMPBRK_H__
12
13#include <wireshark.h>
14
15#ifdef HAVE_SSE4_2
16#include <emmintrin.h>
17#endif
18
21 typedef struct {
22 char patt[256];
23#ifdef HAVE_SSE4_2
24 bool use_sse42;
25 __m128i mask;
26#endif
27} ws_mempbrk_pattern;
28
39WS_DLL_PUBLIC void ws_mempbrk_compile(ws_mempbrk_pattern* pattern, const char *needles);
40
41
56WS_DLL_PUBLIC const uint8_t *ws_mempbrk_exec(const uint8_t* haystack, size_t haystacklen, const ws_mempbrk_pattern* pattern, unsigned char *found_needle);
57
58
74WS_DLL_PUBLIC const uint8_t *ws_memrpbrk_exec(const uint8_t* haystack, size_t haystacklen, const ws_mempbrk_pattern* pattern, unsigned char *found_needle);
75
76#endif /* __WS_MEMPBRK_H__ */
ws_mempbrk_pattern
Definition ws_mempbrk.h:21
ws_memrpbrk_exec
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)
Scan for the needles specified by the compiled pattern, starting at the end of the haystack and worki...
Definition ws_mempbrk.c:76
ws_mempbrk_compile
WS_DLL_PUBLIC void ws_mempbrk_compile(ws_mempbrk_pattern *pattern, const char *needles)
Compile the pattern for the needles to find using ws_mempbrk_exec().
Definition ws_mempbrk.c:31
ws_mempbrk_exec
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)
Scan for the needles specified by the compiled pattern.
Definition ws_mempbrk.c:65