summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-04-29 08:02:44 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-04-29 08:02:44 +0000
commitf905153266e99bd58b8677833d66b755ca42042f (patch)
treea747e6af9cd43592ea255c408821675352f11b2f
parent1b361d5c8aef32122f0b575eccc29ab0ccde717e (diff)
downloadwireshark-f905153266e99bd58b8677833d66b755ca42042f.tar.gz
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
-rw-r--r--epan/dissectors/packet-ndmp.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c
index 9af4094500..a5c3214ccc 100644
--- a/epan/dissectors/packet-ndmp.c
+++ b/epan/dissectors/packet-ndmp.c
@@ -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, {