From 22da8a38efe07af7686e7e42320afb34d87cf633 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sat, 6 Dec 2014 16:21:07 -0500 Subject: [PATCH] Remove annex_a_used from packet_info structure. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I660caa8283aecff5060c6ed476f316bc5793373e Reviewed-on: https://code.wireshark.org/review/5643 Reviewed-by: Michael Tüxen --- epan/dissectors/packet-frame.c | 1 - epan/dissectors/packet-mtp2.c | 5 +++-- epan/packet.c | 2 -- epan/packet_info.h | 6 ------ 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c index 5be786bd19..bed2d82dcf 100644 --- a/epan/dissectors/packet-frame.c +++ b/epan/dissectors/packet-frame.c @@ -231,7 +231,6 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* pinfo->p2p_dir = pinfo->pseudo_header->mtp2.sent ? P2P_DIR_SENT : P2P_DIR_RECV; pinfo->link_number = pinfo->pseudo_header->mtp2.link_number; - pinfo->annex_a_used = pinfo->pseudo_header->mtp2.annex_a_used; break; case WTAP_ENCAP_GSM_UM: diff --git a/epan/dissectors/packet-mtp2.c b/epan/dissectors/packet-mtp2.c index 249e6350a2..728b3adc2d 100644 --- a/epan/dissectors/packet-mtp2.c +++ b/epan/dissectors/packet-mtp2.c @@ -338,10 +338,11 @@ dissect_mtp2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea proto_item *mtp2_item; proto_tree *mtp2_tree; - if (pinfo->annex_a_used == MTP2_ANNEX_A_USED_UNKNOWN) + if ((pinfo->phdr->rec_type != WTAP_ENCAP_MTP2_WITH_PHDR) || + (pinfo->pseudo_header->mtp2.annex_a_used == MTP2_ANNEX_A_USED_UNKNOWN)) use_extended_sequence_numbers = use_extended_sequence_numbers_default; else - use_extended_sequence_numbers = (pinfo->annex_a_used == MTP2_ANNEX_A_USED); + use_extended_sequence_numbers = (pinfo->pseudo_header->mtp2.annex_a_used == MTP2_ANNEX_A_USED); col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP2"); diff --git a/epan/packet.c b/epan/packet.c index 0b515ac8eb..3dd079dd16 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -468,7 +468,6 @@ dissect_record(epan_dissect_t *edt, int file_type_subtype, edt->pi.noreassembly_reason = ""; edt->pi.ptype = PT_NONE; edt->pi.p2p_dir = P2P_DIR_UNKNOWN; - edt->pi.annex_a_used = MTP2_ANNEX_A_USED_UNKNOWN; edt->pi.link_dir = LINK_DIR_UNKNOWN; edt->pi.layers = wmem_list_new(edt->pi.pool); edt->tvb = tvb; @@ -533,7 +532,6 @@ dissect_file(epan_dissect_t *edt, struct wtap_pkthdr *phdr, edt->pi.noreassembly_reason = ""; edt->pi.ptype = PT_NONE; edt->pi.p2p_dir = P2P_DIR_UNKNOWN; - edt->pi.annex_a_used = MTP2_ANNEX_A_USED_UNKNOWN; edt->pi.link_dir = LINK_DIR_UNKNOWN; edt->pi.layers = wmem_list_new(edt->pi.pool); edt->tvb = tvb; diff --git a/epan/packet_info.h b/epan/packet_info.h index a2d9b05a6a..679faf0cae 100644 --- a/epan/packet_info.h +++ b/epan/packet_info.h @@ -153,12 +153,6 @@ typedef struct _packet_info { wmem_list_t *layers; /**< layers of each protocol */ guint8 curr_layer_num; /**< The current "depth" or layer number in the current frame */ guint16 link_number; - guint8 annex_a_used; /**< used in packet-mtp2.c - * defined in wtap.h - * MTP2_ANNEX_A_NOT_USED 0 - * MTP2_ANNEX_A_USED 1 - * MTP2_ANNEX_A_USED_UNKNOWN 2 - */ guint16 profinet_type; /**< the type of PROFINET packet (0: not a PROFINET packet) */ guint16 clnp_srcref; /**< clnp/cotp source reference (can't use srcport, this would confuse tpkt) */