From e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:34:10 +0200 Subject: Adding upstream version 4.2.2. Signed-off-by: Daniel Baumann --- epan/introspection.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 epan/introspection.c (limited to 'epan/introspection.c') diff --git a/epan/introspection.c b/epan/introspection.c new file mode 100644 index 00000000..4499b741 --- /dev/null +++ b/epan/introspection.c @@ -0,0 +1,31 @@ +/* + * Copyright 2021, João Valverde + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include "config.h" +#include "introspection.h" +#include +#include + +#include "introspection-enums.c" + +const ws_enum_t *epan_inspect_enums(void) +{ + return all_enums; +} + +size_t epan_inspect_enums_count(void) +{ + /* Exclude null terminator */ + return sizeof(all_enums)/sizeof(ws_enum_t) - 1; +} + +const ws_enum_t *epan_inspect_enums_bsearch(const char *needle) +{ + return ws_enums_bsearch(all_enums, epan_inspect_enums_count(), needle); +} -- cgit v1.2.3