diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-02-07 08:18:12 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-02-07 08:18:12 +0000 |
commit | 4f7ae8bf3a5ba262884ed1f506b1353a65b8235e (patch) | |
tree | 80900a2db7e2fb3e89591e737abf335d411ce63d /epan/proto.h | |
parent | 8fc6e28b6a6be6e4d335424352118a33c2033315 (diff) | |
download | wireshark-4f7ae8bf3a5ba262884ed1f506b1353a65b8235e.tar.gz |
For FT_{ABSOLUTE,RELATIVE}_TIME, make the rest of the encoding
orthogonal to the byte order.
This means that we can't just test for a non-zero encoding to determine
whether the format is big-endian or little-endian when we set the
field's endianness flag; instead, for the types where we accept any
non-zero value as meaning "litle-endian", map it to ENC_LITTLE_ENDIAN.
When we use ENC_TIME_NTP, OR in the byte order flag. While we're at it,
in the dissectors that used ENC_TIME_NTP, update all the other encoding
items in proto_tree_add_item() calls to use the appropriate ENC_ value.
svn path=/trunk/; revision=35841
Diffstat (limited to 'epan/proto.h')
-rw-r--r-- | epan/proto.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/epan/proto.h b/epan/proto.h index 6dc5f70425..457211e0cd 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -205,13 +205,16 @@ typedef struct _protocol protocol_t; */ #define ENC_BIG_ENDIAN 0x00000000 #define ENC_LITTLE_ENDIAN 0x80000000 -/* Historically FT_TIMEs were only timespecs, the only question was whether - * they were stored in big- or little-endian format. These macros use the - * big/little-endian values for backwards compatibility. + +/* + * Historically FT_TIMEs were only timespecs; the only question was whether + * they were stored in big- or little-endian format. + * + * For backwards compatibility, we interpret an encoding of 1 as meaning + * "little-endian timespec", so that passing TRUE is interpreted as that. */ -#define ENC_TIME_TIMESPEC_BE ENC_BIG_ENDIAN -#define ENC_TIME_TIMESPEC_LE ENC_LITTLE_ENDIAN -#define ENC_TIME_NTP 0x00000002 +#define ENC_TIME_TIMESPEC 0 +#define ENC_TIME_NTP 2 #define ENC_NA 0x00000000 |