diff options
Diffstat (limited to 'epan/dissectors/packet-winsrepl.c')
-rw-r--r-- | epan/dissectors/packet-winsrepl.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/epan/dissectors/packet-winsrepl.c b/epan/dissectors/packet-winsrepl.c index c1337b7f5d..dd0dc82e91 100644 --- a/epan/dissectors/packet-winsrepl.c +++ b/epan/dissectors/packet-winsrepl.c @@ -631,21 +631,19 @@ dissect_winsrepl_replication(tvbuff_t *winsrepl_tvb, packet_info *pinfo, return winsrepl_offset; } -static void -dissect_winsrepl_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_winsrepl_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { int offset = 0; - proto_item *winsrepl_item = NULL; - proto_tree *winsrepl_tree = NULL; + proto_item *winsrepl_item; + proto_tree *winsrepl_tree; enum wrepl_mess_type mess_type; col_set_str(pinfo->cinfo, COL_PROTOCOL, "WINS-Replication"); col_clear(pinfo->cinfo, COL_INFO); - if (parent_tree) { - winsrepl_item = proto_tree_add_item(parent_tree, proto_winsrepl, tvb, offset, -1, ENC_NA); - winsrepl_tree = proto_item_add_subtree(winsrepl_item, ett_winsrepl); - } + winsrepl_item = proto_tree_add_item(parent_tree, proto_winsrepl, tvb, offset, -1, ENC_NA); + winsrepl_tree = proto_item_add_subtree(winsrepl_item, ett_winsrepl); /* SIZE */ proto_tree_add_item(winsrepl_tree, hf_winsrepl_size, tvb, offset, 4, ENC_BIG_ENDIAN); @@ -689,7 +687,7 @@ dissect_winsrepl_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) break; } - return; + return tvb_length(tvb); } static guint @@ -701,10 +699,11 @@ get_winsrepl_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) return pdu_len+4; } -static void -dissect_winsrepl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_winsrepl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data) { - tcp_dissect_pdus(tvb, pinfo, parent_tree, winsrepl_reassemble, 4, get_winsrepl_pdu_len, dissect_winsrepl_pdu); + tcp_dissect_pdus(tvb, pinfo, parent_tree, winsrepl_reassemble, 4, get_winsrepl_pdu_len, dissect_winsrepl_pdu, data); + return tvb_length(tvb); } void @@ -886,6 +885,6 @@ proto_reg_handoff_winsrepl(void) { dissector_handle_t winsrepl_handle; - winsrepl_handle = create_dissector_handle(dissect_winsrepl, proto_winsrepl); + winsrepl_handle = new_create_dissector_handle(dissect_winsrepl, proto_winsrepl); dissector_add_uint("tcp.port", glb_winsrepl_tcp_port, winsrepl_handle); } |