|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <stddef.h>#include <ws_symbol_export.h>Go to the source code of this file.
Classes | |
| struct | ws_enum_t |
| Represents a symbolic enumeration entry. More... | |
Functions | |
| WS_DLL_PUBLIC const ws_enum_t * | ws_enums_bsearch (const ws_enum_t *enums, size_t count, const char *needle) |
| Performs a binary search for a symbolic enumeration entry. | |
Copyright 2021, João Valverde j@v6e.nosp@m..pt
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| WS_DLL_PUBLIC const ws_enum_t * ws_enums_bsearch | ( | const ws_enum_t * | enums, |
| size_t | count, | ||
| const char * | needle | ||
| ) |
Performs a binary search for a symbolic enumeration entry.
Searches a sorted array of ws_enum_t entries for the given symbolic name. The array must be sorted by the symbol field in ascending order for binary search to work.
| enums | Pointer to the array of enumeration entries. |
| count | Number of entries in the array. |
| needle | The symbolic name to search for. |
ws_enum_t entry, or NULL if not found.