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 #include "introspection.h"
17 compare_enum(const void *needle
, const void *memb
)
19 return strcmp(needle
, ((const ws_enum_t
*)memb
)->symbol
);
23 ws_enums_bsearch(const ws_enum_t
*enums
, size_t count
,
26 return bsearch(needle
, enums
, count
, sizeof(ws_enum_t
), compare_enum
);