diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-04-26 07:58:45 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-04-26 07:58:45 +0000 |
commit | 59f9aa6a8cf7b71a60697423b48b2d16a1503fb5 (patch) | |
tree | 22884a283ae2cfb25ac6c0f76af341495908f680 /epan/dissectors/packet-ndmp.c | |
parent | 7f5fc8b8d95be284a0769605efb24d6752dd84db (diff) |
NOTIFY_[DATA|MOVER]_HALTED requests no longer take an XDR string containing the reason for version 4 of ndmp and forward.
svn path=/trunk/; revision=18002
Diffstat (limited to 'epan/dissectors/packet-ndmp.c')
-rw-r--r-- | epan/dissectors/packet-ndmp.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index 2fd8a09c30..d50c87d018 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -1891,9 +1891,34 @@ dissect_notify_data_halted_request(tvbuff_t *tvb, int offset, proto_tree_add_item(tree, hf_ndmp_halt, tvb, offset, 4, FALSE); offset += 4; - /* reason */ - offset = dissect_rpc_string(tvb, tree, - hf_ndmp_halt_reason, offset, NULL); + switch(ndmp_protocol_version){ + case NDMP_PROTOCOL_V2: + case NDMP_PROTOCOL_V3: + /* reason : only in version 2, 3 */ + offset = dissect_rpc_string(tvb, tree, + hf_ndmp_halt_reason, offset, NULL); + break; + } + + return offset; +} + +static int +dissect_notify_mover_halted_request(tvbuff_t *tvb, int offset, + packet_info *pinfo _U_, proto_tree *tree, guint32 seq _U_) +{ + /* halt */ + proto_tree_add_item(tree, hf_ndmp_halt, tvb, offset, 4, FALSE); + offset += 4; + + switch(ndmp_protocol_version){ + case NDMP_PROTOCOL_V2: + case NDMP_PROTOCOL_V3: + /* reason : only in version 2, 3 */ + offset = dissect_rpc_string(tvb, tree, + hf_ndmp_halt_reason, offset, NULL); + break; + } return offset; } @@ -2642,7 +2667,7 @@ static const ndmp_command ndmp_commands[] = { {NDMP_NOTIFY_CONNECTED, dissect_notify_connected_request, NULL}, {NDMP_NOTIFY_MOVER_HALTED, - dissect_notify_data_halted_request, NULL}, + dissect_notify_mover_halted_request, NULL}, {NDMP_NOTIFY_MOVER_PAUSED, dissect_notify_mover_paused_request, NULL}, {NDMP_NOTIFY_DATA_READ, |