aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pagp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-24 21:59:51 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-25 13:15:11 +0000
commitdcfea6a06ddf7adeafc8613efe74310251201789 (patch)
tree04c70020bc89a90670634230a5be0560af7c9c3e /epan/dissectors/packet-pagp.c
parent479ab3bcdc8d79b27bfc99fcde073457f72126ac (diff)
create_dissector_handle -> new_create_dissector_handle
This finalizes the transformation for dissectors. Change-Id: Ie5986b72bb69a6e8779ca3f5e20a80357c9e6fea Reviewed-on: https://code.wireshark.org/review/12122 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-pagp.c')
-rw-r--r--epan/dissectors/packet-pagp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/epan/dissectors/packet-pagp.c b/epan/dissectors/packet-pagp.c
index af69587ffe..80020bb1d8 100644
--- a/epan/dissectors/packet-pagp.c
+++ b/epan/dissectors/packet-pagp.c
@@ -147,8 +147,8 @@ static const true_false_string automode = {
};
/* Code to actually dissect the PAGP packets */
-static void
-dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint32 raw_word;
guint16 num_tlvs;
@@ -207,7 +207,7 @@ dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(pagp_tree, hf_pagp_flush_transaction_id, tvb,
PAGP_FLUSH_TRANSACTION_ID, 4, raw_word);
- return;
+ return tvb_captured_length(tvb);
}
/* Info PDU */
@@ -283,12 +283,12 @@ dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ( len == 0 ) {
expert_add_info_format(pinfo, len_item, &ei_pagp_tlv_length,
"Unknown data - TLV len=0");
- return;
+ return offset;
}
if ( tvb_reported_length_remaining(tvb, offset) < len ) {
expert_add_info_format(pinfo, len_item, &ei_pagp_tlv_length,
"TLV length too large");
- return;
+ return offset;
}
switch (tlv) {
@@ -311,6 +311,7 @@ dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += len;
}
+ return tvb_captured_length(tvb);
}
@@ -491,7 +492,7 @@ proto_reg_handoff_pagp(void)
{
dissector_handle_t pagp_handle;
- pagp_handle = create_dissector_handle(dissect_pagp, proto_pagp);
+ pagp_handle = new_create_dissector_handle(dissect_pagp, proto_pagp);
dissector_add_uint("llc.cisco_pid", 0x0104, pagp_handle);
}