aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-07-03 17:08:25 +0000
committerGuy Harris <guy@alum.mit.edu>2011-07-03 17:08:25 +0000
commit338af96b2e28196d8dc800a6ca844108bc8f3041 (patch)
treec14e85b721dcab2bb7cadd9787bffc7a551cb2e2 /epan/proto.h
parent8b303cc61a85c3efdb37171d21702ac112681e26 (diff)
Add a tvb_get_ephemeral_string_enc() routine that's like
tvb_get_ephemeral_string() but takes an ENC_ value for the character encoding. Use it in the MQ dissector to fetch strings to put, for example, into the Info column, so we properly handle EBCDIC strings there. svn path=/trunk/; revision=37876
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/epan/proto.h b/epan/proto.h
index fd54b3f179..a3abafe976 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -210,12 +210,6 @@ typedef struct _protocol protocol_t;
* ENC_LITTLE_ENDIAN as 0x80000000 - we're using the high-order bit
* so that we could put a field type and/or a value such as a character
* encoding in the lower bits.
- *
- * For protocols (FT_PROTOCOL), aggregate items with subtrees (FT_NONE),
- * opaque byte-array fields (FT_BYTES), and other fields where there
- * is no choice of encoding (either because it's "just a bucket
- * of bytes" or because the encoding is completely fixed), we
- * have ENC_NA (for "Not Applicable").
*/
#define ENC_BIG_ENDIAN 0x00000000
#define ENC_LITTLE_ENDIAN 0x80000000
@@ -230,8 +224,6 @@ typedef struct _protocol protocol_t;
#define ENC_TIME_TIMESPEC 0
#define ENC_TIME_NTP 2
-#define ENC_NA 0x00000000
-
/*
* Historically, the only place the representation mattered for strings
* was with FT_UINT_STRINGs, where we had FALSE for the string length
@@ -251,7 +243,16 @@ typedef struct _protocol protocol_t;
*/
#define ENC_CHARENCODING_MASK 0x7FFFFFFE /* mask out byte-order bits */
#define ENC_UTF_8 0x00000000
-#define ENC_EBCDIC 0x0EBCD1C0 /* XXX - multiple flavors of EBCDIC? */
+#define ENC_EBCDIC 0x0EBCD1C0
+
+/*
+ * For protocols (FT_PROTOCOL), aggregate items with subtrees (FT_NONE),
+ * opaque byte-array fields (FT_BYTES), and other fields where there
+ * is no choice of encoding (either because it's "just a bucket
+ * of bytes" or because the encoding is completely fixed), we
+ * have ENC_NA (for "Not Applicable").
+ */
+#define ENC_NA 0x00000000
/* Values for header_field_info.display */