diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-23 10:56:36 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-23 17:36:39 +0000 |
commit | 57e18b00346f86f0b5d182fcc749a1a005fadb96 (patch) | |
tree | 9e588cfef7c1110e8f7423a550787e8c06c35e69 /epan/dissectors/packet-tn3270.c | |
parent | 5afbf7e0e5c8116002cbd06abce48b410855d5e1 (diff) |
register_dissector -> new_register_dissector
Change-Id: Ifc8208e1b96e2a3bf297912500a5f252bfa8eed9
Reviewed-on: https://code.wireshark.org/review/12073
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-tn3270.c')
-rw-r--r-- | epan/dissectors/packet-tn3270.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-tn3270.c b/epan/dissectors/packet-tn3270.c index e7c879c9a5..b7fbabc150 100644 --- a/epan/dissectors/packet-tn3270.c +++ b/epan/dissectors/packet-tn3270.c @@ -5234,8 +5234,8 @@ dissect_inbound_stream(proto_tree *tn3270_tree, packet_info *pinfo, tvbuff_t *tv } -static void -dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_tree *tn3270_tree; proto_item *pi; @@ -5257,7 +5257,7 @@ dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if (tn3270_info == NULL) - return; + return 0; pi = proto_tree_add_item(tree, proto_tn3270, tvb, offset, -1, ENC_NA); tn3270_tree = proto_item_add_subtree(pi, ett_tn3270); @@ -5268,7 +5268,7 @@ dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return offset; if (pinfo->srcport == tn3270_info->outbound_port) { col_set_str(pinfo->cinfo, COL_INFO, "TN3270 Data from Mainframe"); @@ -5288,6 +5288,7 @@ dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } + return tvb_captured_length(tvb); } void @@ -7665,7 +7666,7 @@ proto_register_tn3270(void) expert_module_t* expert_tn3270; proto_tn3270 = proto_register_protocol("TN3270 Protocol", "TN3270", "tn3270"); - register_dissector("tn3270", dissect_tn3270, proto_tn3270); + new_register_dissector("tn3270", dissect_tn3270, proto_tn3270); proto_register_field_array(proto_tn3270, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); expert_tn3270 = expert_register_protocol(proto_tn3270); |