attr_dissector_fn_t
[wireshark-sm.git] / epan / introspection.h
blob013fc133d7ba9c489c5a9630569cc4633153a581
1 /** @file
2 * Copyright 2021, João Valverde <j@v6e.pt>
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
11 #ifndef _EPAN_INTROSPECTION_H_
12 #define _EPAN_INTROSPECTION_H_
14 #include <stddef.h>
15 #include <ws_symbol_export.h>
16 #include <wsutil/introspection.h>
18 /** Returns an array of ws_enum_t elements. The array is sorted and
19 * ends with {NULL, 0}.
21 * It can be used by language bindings to the Wireshark API to obtain
22 * the value of some magic constants. The array can be binary searched,
23 * imported to a hash table, serialized, etc.
25 WS_DLL_PUBLIC
26 const ws_enum_t *epan_inspect_enums(void);
28 /** Returns size of enums array not including null terminator. */
29 WS_DLL_PUBLIC
30 size_t epan_inspect_enums_count(void);
32 /** Performs a binary search for the magic constant "needle". */
33 WS_DLL_PUBLIC
34 const ws_enum_t *epan_inspect_enums_bsearch(const char *needle);
36 #endif