dcerpc-netlogon: remove unused variable
[wireshark-sm.git] / epan / iana_charsets.c
blob5efed6ffb6a7b3049e81c1bd66ba6e080fd62b2c
1 /* iana_charsets.c
3 * Routines and tables for IANA-registered character sets
5 * http://www.iana.org/assignments/character-sets/character-sets.xhtml
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * WAP dissector based on original work by Ben Fowler
12 * Updated by Neil Hunter <neil.hunter@energis-squared.com>
13 * WTLS support by Alexandre P. Ferreira (Splice IP)
15 * SPDX-License-Identifier: GPL-2.0-or-later
18 #include "config.h"
20 #include <glib.h>
22 #include <epan/proto.h>
23 #include <epan/value_string.h>
24 #include <epan/params.h>
26 #include <epan/iana_charsets.h>
28 #define _ICWE_CASE_AND_RETURN(ic_enum_val, ws_enc) case (ic_enum_val): return (ws_enc);
31 * Map a MIBenum code for a charset to a Wireshark string encoding.
33 unsigned
34 mibenum_charset_to_encoding (unsigned charset)
36 switch (charset) {
37 /* Expand macro result in:
39 * case IANA_CS_US_ASCII:
40 * return ENC_NA|ENC_ASCII;
42 * case IANA_CS_ISO_8859_1:
43 * return ENC_NA|ENC_ISO_8859_1;
44 * ...
46 IANA_CHARSETS_WS_ENCODING_MAP_LIST(_ICWE_CASE_AND_RETURN, ICWE_MAP_TO_ENUM_MAP_ONLY, ICWE_SELECT_N1)
48 default:
49 return ENC_NA|_DEFAULT_WS_ENC;
53 /* define a value_string array named mibenum_vals_character_sets */
54 VALUE_STRING_ARRAY(mibenum_vals_character_sets);
56 value_string_ext mibenum_vals_character_sets_ext = VALUE_STRING_EXT_INIT(mibenum_vals_character_sets);
58 /* define an iana charset enum_val_t array named mibenum_vals_character_sets_ev_array */
59 VS_LIST_TO_ENUM_VAL_T_ARRAY_GLOBAL_DEF(mibenum_vals_character_sets, mibenum_vals_character_sets_ev_array);
61 /* define an Wireshark supported iana charset enum_val_t array */
62 VS_LIST_TO_ENUM_VAL_T_ARRAY_GLOBAL_DEF(ws_supported_mibenum_vals_character_sets, ws_supported_mibenum_vals_character_sets_ev_array);
65 * Editor modelines - https://www.wireshark.org/tools/modelines.html
67 * Local variables:
68 * c-basic-offset: 4
69 * tab-width: 8
70 * indent-tabs-mode: nil
71 * End:
73 * vi: set shiftwidth=4 tabstop=8 expandtab:
74 * :indentSize=4:tabSize=8:noTabs=true: