diff options
Diffstat (limited to 'epan/dissectors/packet-agentx.c')
-rw-r--r-- | epan/dissectors/packet-agentx.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/epan/dissectors/packet-agentx.c b/epan/dissectors/packet-agentx.c index 7de74ef404..9eaff52650 100644 --- a/epan/dissectors/packet-agentx.c +++ b/epan/dissectors/packet-agentx.c @@ -824,8 +824,8 @@ get_agentx_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) return plen + 20; } -static void -dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { int offset = 0; proto_tree* agentx_tree, *pdu_hdr_tree, *flags_tree; @@ -857,7 +857,7 @@ dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(!tree) - return; + return 0; /*t_item = proto_tree_add_item(tree, proto_agentx, tvb, 0, -1, ENC_NA);*/ t_item = proto_tree_add_protocol_format(tree, proto_agentx, tvb, 0, -1, @@ -954,13 +954,16 @@ dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissect_response_pdu(tvb, agentx_tree, offset, payload_len, flags); break; } + + return tvb_length(tvb); } -static void -dissect_agentx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_agentx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 20, get_agentx_pdu_len, - dissect_agentx_pdu); + dissect_agentx_pdu, data); + return tvb_length(tvb); } static const true_false_string tfs_agentx_include = { "Yes", "No" }; @@ -1180,7 +1183,7 @@ proto_reg_handoff_agentx(void) static guint agentx_tcp_port; if(!agentx_prefs_initialized) { - agentx_handle = create_dissector_handle(dissect_agentx, proto_agentx); + agentx_handle = new_create_dissector_handle(dissect_agentx, proto_agentx); agentx_prefs_initialized = TRUE; } else { |