Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Macros | Functions | Variables
iana_charsets.h File Reference

Go to the source code of this file.

Macros

#define _DEFAULT_WS_ENC   ENC_ASCII
 
#define IANA_CHARSETS_WS_ENCODING_MAP_LIST(XXX, YYY, ZZZ)
 
#define ICWE_SELECT_ALL(N, ...)   ICWE_SELECT_ALL_##N(__VA_ARGS__)
 Select all records regardless of marker.
 
#define ICWE_SELECT_ALL_0(...)   __VA_ARGS__
 
#define ICWE_SELECT_ALL_1(...)   __VA_ARGS__
 
#define ICWE_SELECT_N1(N, ...)   ICWE_SELECT_N1_##N(__VA_ARGS__)
 Ignore records marked 0 and only select records marked 1.
 
#define ICWE_SELECT_N1_0(...)
 
#define ICWE_SELECT_N1_1(...)   __VA_ARGS__
 
#define ICWE_MAP_TO_VS_RECORD(XXX, ic_enum_name, ic_enum_val, ic_name, ws_enc)   XXX(ic_enum_name, ic_enum_val, ic_name)
 Convert an IANA charset / Wireshark encoding map entry to a value_string macro record and pass it to XXX.
 
#define ICWE_MAP_TO_EV_RECORD(XXX, ic_enum_name, ic_enum_val, ic_name, ws_enc)   XXX(ic_enum_name, ic_enum_val, ic_name, ic_name)
 Convert an IANA charset / Wireshark encoding map entry to an enum_val_t macro record and pass it to XXX.
 
#define ICWE_MAP_TO_ENUM_MAP_ONLY(XXX, ic_enum_name, ic_enum_val, ic_name, ws_enc)   XXX(ic_enum_val, ws_enc)
 Convert an IANA charset / Wireshark encoding map entry to an enum value-only map entry and pass it to XXX.
 
#define mibenum_vals_character_sets_VALUE_STRING_LIST(XXX)   IANA_CHARSETS_WS_ENCODING_MAP_LIST(XXX, ICWE_MAP_TO_VS_RECORD, ICWE_SELECT_ALL)
 Macro for creating the IANA charset enumeration type, value_string array, and enum_val_t array (all charsets).
 
#define ws_supported_mibenum_vals_character_sets_VALUE_STRING_LIST(XXX)   IANA_CHARSETS_WS_ENCODING_MAP_LIST(XXX, ICWE_MAP_TO_VS_RECORD, ICWE_SELECT_N1)
 Macro for creating the Wireshark-supported IANA charset enum_val_t array (supported charsets only).
 

Functions

WS_DLL_PUBLIC unsigned mibenum_charset_to_encoding (unsigned charset)
 Map a MIBenum code for a charset to a Wireshark string encoding.
 
typedef VALUE_STRING_ENUM (mibenum_vals_character_sets) mibenum_vals_character_sets_type_t
 IANA charset enumeration type.
 
 VS_LIST_TO_ENUM_VAL_T_ARRAY_GLOBAL_DCL (mibenum_vals_character_sets_ev_array)
 Global declaration of the IANA charset enum_val_t array.
 
 VS_LIST_TO_ENUM_VAL_T_ARRAY_GLOBAL_DCL (ws_supported_mibenum_vals_character_sets_ev_array)
 Global declaration of the Wireshark-supported IANA charset enum_val_t array.
 

Variables

WS_DLL_PUBLIC value_string_ext mibenum_vals_character_sets_ext
 

Detailed Description

Declarations for IANA-registered character sets

http://www.iana.org/assignments/character-sets/character-sets.xhtml

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

WAP dissector based on original work by Ben Fowler Updated by Neil Hunter neil..nosp@m.hunt.nosp@m.er@en.nosp@m.ergi.nosp@m.s-squ.nosp@m.ared.nosp@m..com WTLS support by Alexandre P. Ferreira (Splice IP)

SPDX-License-Identifier: GPL-2.0-or-later

Macro Definition Documentation

◆ ICWE_MAP_TO_ENUM_MAP_ONLY

#define ICWE_MAP_TO_ENUM_MAP_ONLY (   XXX,
  ic_enum_name,
  ic_enum_val,
  ic_name,
  ws_enc 
)    XXX(ic_enum_val, ws_enc)

Convert an IANA charset / Wireshark encoding map entry to an enum value-only map entry and pass it to XXX.

Parameters
XXXThe destination macro to invoke.
ic_enum_nameThe IANA charset enum name (unused here).
ic_enum_valThe IANA charset enum value.
ic_nameThe IANA charset name string (unused here).
ws_encThe Wireshark encoding value.

◆ ICWE_MAP_TO_EV_RECORD

#define ICWE_MAP_TO_EV_RECORD (   XXX,
  ic_enum_name,
  ic_enum_val,
  ic_name,
  ws_enc 
)    XXX(ic_enum_name, ic_enum_val, ic_name, ic_name)

Convert an IANA charset / Wireshark encoding map entry to an enum_val_t macro record and pass it to XXX.

Parameters
XXXThe destination macro to invoke.
ic_enum_nameThe IANA charset enum name.
ic_enum_valThe IANA charset enum value.
ic_nameThe IANA charset name string.
ws_encThe Wireshark encoding value (unused here).

◆ ICWE_MAP_TO_VS_RECORD

#define ICWE_MAP_TO_VS_RECORD (   XXX,
  ic_enum_name,
  ic_enum_val,
  ic_name,
  ws_enc 
)    XXX(ic_enum_name, ic_enum_val, ic_name)

Convert an IANA charset / Wireshark encoding map entry to a value_string macro record and pass it to XXX.

Parameters
XXXThe destination macro to invoke.
ic_enum_nameThe IANA charset enum name.
ic_enum_valThe IANA charset enum value.
ic_nameThe IANA charset name string.
ws_encThe Wireshark encoding value (unused here).

◆ ICWE_SELECT_ALL

#define ICWE_SELECT_ALL (   N,
  ... 
)    ICWE_SELECT_ALL_##N(__VA_ARGS__)

Select all records regardless of marker.

Parameters
NThe marker value (0 or 1).
...The record contents to pass through.

◆ ICWE_SELECT_N1

#define ICWE_SELECT_N1 (   N,
  ... 
)    ICWE_SELECT_N1_##N(__VA_ARGS__)

Ignore records marked 0 and only select records marked 1.

Parameters
NThe marker value (0 or 1).
...The record contents to pass through if N is 1.

Function Documentation

◆ mibenum_charset_to_encoding()

WS_DLL_PUBLIC unsigned mibenum_charset_to_encoding ( unsigned  charset)

Map a MIBenum code for a charset to a Wireshark string encoding.

Parameters
charsetThe character set code.
Returns
The corresponding Wireshark encoding, or ENC_NA if not found.