diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-01-13 16:03:26 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-01-14 00:04:13 +0000 |
commit | d9da77afe85ce91086be80df8802c565c8f9d84d (patch) | |
tree | ee196dee355f757f02ebd8732c43b862540d5b4a /epan/dissectors/packet-catapult-dct2000.c | |
parent | 7c2eaefd07e2fb68ae8603c72e1151e5a81dd1b6 (diff) |
Have various ATM dissectors use the data arguments for pseudo-headers.
Don't use the pseudo-header pointed to by pinfo->pseudo_header; have the
argument either point to a struct atm_phdr or to a pwatm_private_data_t.
Don't *overwrite* the pseudo-header pointed to by pinfo->pseudo_header
if you need to construct an ATM pseudo-header for a dissector; have your
own struct atm_phdr structure, fill it in, and pass a pointer to *that*
to the sub-dissector.
Cleans things up a bit.
Change-Id: I4464924def4de41c625002b2d273592bd529e46e
Reviewed-on: https://code.wireshark.org/review/13270
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-catapult-dct2000.c')
-rw-r--r-- | epan/dissectors/packet-catapult-dct2000.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index b1c3cd16d9..349dd9645b 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -2091,6 +2091,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo int encap; dissector_handle_t protocol_handle = 0; dissector_handle_t heur_protocol_handle = 0; + void *protocol_data = 0; int sub_dissector_result = 0; const char *protocol_name; gboolean is_comment, is_sprint = FALSE; @@ -2349,6 +2350,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo break; case WTAP_ENCAP_ATM_PDUS_UNTRUNCATED: protocol_handle = find_dissector("atm_untruncated"); + protocol_data = &pinfo->pseudo_header->dct2000.inner_pseudo_header.atm; break; case WTAP_ENCAP_PPP: protocol_handle = find_dissector("ppp_hdlc"); @@ -2804,7 +2806,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo if (protocol_handle != 0) { /* Dissect the remainder of the frame using chosen protocol handle */ next_tvb = tvb_new_subset_remaining(tvb, offset); - sub_dissector_result = call_dissector_only(protocol_handle, next_tvb, pinfo, tree, NULL); + sub_dissector_result = call_dissector_only(protocol_handle, next_tvb, pinfo, tree, protocol_data); } |