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
11 #ifndef _WTAP_INTROSPECTION_H_
12 #define _WTAP_INTROSPECTION_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.
26 const ws_enum_t
*wtap_inspect_enums(void);
28 /** Returns size of enums array not including null terminator. */
30 size_t wtap_inspect_enums_count(void);
32 /** Performs a binary search for the magic constant "needle". */
34 const ws_enum_t
*wtap_inspect_enums_bsearch(const char *needle
);