aboutsummaryrefslogtreecommitdiffstats
path: root/epan/charsets.h
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2013-12-09 20:46:27 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2013-12-09 20:46:27 +0000
commitcb1cb946d39b29938c9578881a8a121c5f8519f2 (patch)
tree2c76617831b0984c5e99af7edbb56c6ec989d564 /epan/charsets.h
parent3ae2e5ece2d10ec6efedee69a455b0d7851755f6 (diff)
From Jakub
support DVB-SI character tables (EN 300 468) in a generic way From me move things to charsets.c/.h distinguish between single and multi byte encoding for some tables (so that the highlighted bytes match the displayed value) no character table byte -> length 0, use default table svn path=/trunk/; revision=53886
Diffstat (limited to 'epan/charsets.h')
-rw-r--r--epan/charsets.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/epan/charsets.h b/epan/charsets.h
index 7997ffefa7..42747518af 100644
--- a/epan/charsets.h
+++ b/epan/charsets.h
@@ -26,10 +26,62 @@
#include "ws_symbol_export.h"
+#include <epan/tvbuff.h>
+#include <epan/value_string.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
+typedef enum {
+ DVB_ENCODING_INVALID = -3, /* length invalid */
+ DVB_ENCODING_RESERVED = -2, /* reserved by spec */
+
+ DVB_ENCODING_UNKNOWN = -1, /* not defined by spec */
+
+ DVB_ENCODING_LATIN = 0,
+ DVB_ENCODING_ISO_8859_5,
+ DVB_ENCODING_ISO_8859_6,
+ DVB_ENCODING_ISO_8859_7,
+ DVB_ENCODING_ISO_8859_8,
+ DVB_ENCODING_ISO_8859_9,
+ DVB_ENCODING_ISO_8859_10,
+ DVB_ENCODING_ISO_8859_11,
+ /* 0x08 is reserved */
+ DVB_ENCODING_ISO_8859_13 = 9,
+ DVB_ENCODING_ISO_8859_14,
+ DVB_ENCODING_ISO_8859_15,
+
+ /* TODO: 0x11...0x15 */
+
+ DVB_ENCODING_EXT_BASE = 0x100000,
+ DVB_ENCODING_EXT_ISO_8859_1 = DVB_ENCODING_EXT_BASE | 1,
+ DVB_ENCODING_EXT_ISO_8859_2 = DVB_ENCODING_EXT_BASE | 2,
+ DVB_ENCODING_EXT_ISO_8859_3 = DVB_ENCODING_EXT_BASE | 3,
+ DVB_ENCODING_EXT_ISO_8859_4 = DVB_ENCODING_EXT_BASE | 4,
+ DVB_ENCODING_EXT_ISO_8859_5 = DVB_ENCODING_EXT_BASE | 5,
+ DVB_ENCODING_EXT_ISO_8859_6 = DVB_ENCODING_EXT_BASE | 6,
+ DVB_ENCODING_EXT_ISO_8859_7 = DVB_ENCODING_EXT_BASE | 7,
+ DVB_ENCODING_EXT_ISO_8859_8 = DVB_ENCODING_EXT_BASE | 8,
+ DVB_ENCODING_EXT_ISO_8859_9 = DVB_ENCODING_EXT_BASE | 9,
+ DVB_ENCODING_EXT_ISO_8859_10 = DVB_ENCODING_EXT_BASE | 10,
+ DVB_ENCODING_EXT_ISO_8859_11 = DVB_ENCODING_EXT_BASE | 11,
+ /* DVB_ENCODING_ISO_8859_12 = DVB_ENCODING_EXT_BASE | 12 */
+ DVB_ENCODING_EXT_ISO_8859_13 = DVB_ENCODING_EXT_BASE | 13,
+ DVB_ENCODING_EXT_ISO_8859_14 = DVB_ENCODING_EXT_BASE | 14,
+ DVB_ENCODING_EXT_ISO_8859_15 = DVB_ENCODING_EXT_BASE | 15,
+} dvb_encoding_e;
+
+extern const value_string dvb_string_encoding_vals[];
+
+WS_DLL_PUBLIC
+guint dvb_analyze_string_charset(tvbuff_t *tvb, int offset, int length,
+ dvb_encoding_e *encoding);
+
+WS_DLL_PUBLIC
+guint dvb_enc_to_item_enc(dvb_encoding_e encoding);
+
+
#if 0
void ASCII_to_EBCDIC(guint8 *buf, guint bytes);
guint8 ASCII_to_EBCDIC1(guint8 c);