add the missing MODE field in mover_get_state that was introduced in version 4.

also change bytes_left_to_read to be a INT64 and not a UINT64.
It iss supposed to be an UINT64  but some implementations are buggy and it is easier to make sense of this field one for those buggy clients if it is printed as an INT64.
This change/violation will not affect any correct/valid NDMP implementation or how ethereal decodes its output  unless your entire backup is > 2**63 bytes in size.



svn path=/trunk/; revision=14228
This commit is contained in:
Ronnie Sahlberg 2005-04-29 08:02:44 +00:00
parent 1b361d5c8a
commit f905153266
1 changed files with 13 additions and 5 deletions

View File

@ -1664,6 +1664,12 @@ dissect_mover_get_state_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* error */
offset=dissect_error(tvb, offset, pinfo, tree, seq);
/* mode is only present in version 4 and beyond */
if(ndmp_protocol_version>=NDMP_PROTOCOL_V4){
proto_tree_add_item(tree, hf_ndmp_mover_mode, tvb, offset, 4, FALSE);
offset += 4;
}
/* mover state */
proto_tree_add_item(tree, hf_ndmp_mover_state, tvb, offset, 4, FALSE);
offset += 4;
@ -1716,11 +1722,13 @@ dissect_mover_get_state_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
#define NDMP_MOVER_MODE_READ 0
#define NDMP_MOVER_MODE_WRITE 1
#define NDMP_MOVER_MODE_READ 0
#define NDMP_MOVER_MODE_WRITE 1
#define NDMP_MOVER_MODE_NOACTION 2
static const value_string mover_mode_vals[] = {
{NDMP_MOVER_MODE_READ, "MODE_READ"},
{NDMP_MOVER_MODE_WRITE, "MOVER_MODE_WRITE"},
{NDMP_MOVER_MODE_READ, "MOVER_MODE_READ"},
{NDMP_MOVER_MODE_WRITE, "MOVER_MODE_WRITE"},
{NDMP_MOVER_MODE_NOACTION, "MOVER_MODE_NOACTION"},
{0, NULL}
};
@ -3329,7 +3337,7 @@ proto_register_ndmp(void)
NULL, 0, "Current seek position on device", HFILL }},
{ &hf_ndmp_bytes_left_to_read, {
"Bytes left to read", "ndmp.bytes_left_to_read", FT_UINT64, BASE_DEC,
"Bytes left to read", "ndmp.bytes_left_to_read", FT_INT64, BASE_DEC,
NULL, 0, "Number of bytes left to be read from the device", HFILL }},
{ &hf_ndmp_window_offset, {