nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* ws_mempbrk.h |
2 | * |
||
3 | * Wireshark - Network traffic analyzer |
||
4 | * By Gerald Combs <gerald@wireshark.org> |
||
5 | * Copyright 1998 Gerald Combs |
||
6 | * |
||
7 | * This program is free software; you can redistribute it and/or |
||
8 | * modify it under the terms of the GNU General Public License |
||
9 | * as published by the Free Software Foundation; either version 2 |
||
10 | * of the License, or (at your option) any later version. |
||
11 | * |
||
12 | * This program is distributed in the hope that it will be useful, |
||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
15 | * GNU General Public License for more details. |
||
16 | * |
||
17 | * You should have received a copy of the GNU General Public License |
||
18 | * along with this program; if not, write to the Free Software |
||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||
20 | */ |
||
21 | |||
22 | #ifndef __WS_MEMPBRK_H__ |
||
23 | #define __WS_MEMPBRK_H__ |
||
24 | |||
25 | #include "ws_symbol_export.h" |
||
26 | |||
27 | #ifdef HAVE_SSE4_2 |
||
28 | #include <emmintrin.h> |
||
29 | #endif |
||
30 | |||
31 | /** The pattern object used for ws_mempbrk_exec(). |
||
32 | */ |
||
33 | typedef struct { |
||
34 | gchar patt[256]; |
||
35 | #ifdef HAVE_SSE4_2 |
||
36 | gboolean use_sse42; |
||
37 | __m128i mask; |
||
38 | #endif |
||
39 | } ws_mempbrk_pattern; |
||
40 | |||
41 | /** Compile the pattern for the needles to find using ws_mempbrk_exec(). |
||
42 | */ |
||
43 | WS_DLL_PUBLIC void ws_mempbrk_compile(ws_mempbrk_pattern* pattern, const gchar *needles); |
||
44 | |||
45 | /** Scan for the needles specified by the compiled pattern. |
||
46 | */ |
||
47 | WS_DLL_PUBLIC const guint8 *ws_mempbrk_exec(const guint8* haystack, size_t haystacklen, const ws_mempbrk_pattern* pattern, guchar *found_needle); |
||
48 | |||
49 | #endif /* __WS_MEMPBRK_H__ */ |