aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ndmp.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-04-29 08:02:44 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-04-29 08:02:44 +0000
commitf6fc462b21159c968b893fc1c98ad57efabc0d7a (patch)
treea747e6af9cd43592ea255c408821675352f11b2f /epan/dissectors/packet-ndmp.c
parent1af2ca50e1782de629359e4674e81109012b38d3 (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14228 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ndmp.c')
-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, {