diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-08 19:30:18 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-09 15:59:59 +0000 |
commit | 2fe0fc5a1afbbd8218190736decbecec14582691 (patch) | |
tree | a5d7860915c351039bbb16979f0a05532533a276 /epan/dissectors/packet-kt.c | |
parent | 0aa9e9864721d5f425ffeba85bbb642ebd12e771 (diff) |
Convert some TCP subdissectors to "new" style.
Change-Id: I28ce51f3c06f78b85792bce4a13ef39eb75d7890
Reviewed-on: https://code.wireshark.org/review/11648
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-kt.c')
-rw-r--r-- | epan/dissectors/packet-kt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-kt.c b/epan/dissectors/packet-kt.c index 0161efb744..064656871d 100644 --- a/epan/dissectors/packet-kt.c +++ b/epan/dissectors/packet-kt.c @@ -605,8 +605,8 @@ dissect_kt_error(tvbuff_t *tvb, proto_tree *tree, gint offset) return new_offset; } -static void -dissect_kt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_kt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { gint magic; proto_item *ti; @@ -620,7 +620,7 @@ dissect_kt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* If the magic is not one of the known values, exit */ if (try_val_to_str(magic, kt_magic_vals) == NULL) - return; + return offset; /* Otherwise, the magic value is known. Continue */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "KT"); @@ -657,6 +657,8 @@ dissect_kt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item_set_len(ti, offset-offset_start); } + + return tvb_captured_length(tvb); } void @@ -778,7 +780,7 @@ proto_register_kt(void) }; proto_kt = proto_register_protocol("Kyoto Tycoon Protocol", "Kyoto Tycoon", "kt"); - register_dissector("kt", dissect_kt, proto_kt); + new_register_dissector("kt", dissect_kt, proto_kt); proto_register_field_array(proto_kt, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); |