From bc5a0374bfd162d08834f5f7503bebd33d8ec943 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 23 Jan 2016 19:40:51 -0800 Subject: Add the packet number to the packet_info structure, and use it. That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris --- plugins/mate/mate_runtime.c | 8 ++++---- plugins/mate/packet-mate.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/mate') diff --git a/plugins/mate/mate_runtime.c b/plugins/mate/mate_runtime.c index 2fbd0db5aa..1c7f651cbc 100644 --- a/plugins/mate/mate_runtime.c +++ b/plugins/mate/mate_runtime.c @@ -846,7 +846,7 @@ extern void mate_analyze_frame(packet_info *pinfo, proto_tree* tree) { rd->now = (float) nstime_to_sec(&pinfo->rel_ts); if ( proto_tracking_interesting_fields(tree) - && rd->highest_analyzed_frame < pinfo->fd->num ) { + && rd->highest_analyzed_frame < pinfo->num ) { for ( i = 0; i < mc->pducfglist->len; i++ ) { cfg = (mate_cfg_pdu *)g_ptr_array_index(mc->pducfglist,i); @@ -862,7 +862,7 @@ extern void mate_analyze_frame(packet_info *pinfo, proto_tree* tree) { dbg_print (dbg_pdu,3,dbg_facility,"mate_analyze_frame: found matching proto, extracting: %s",cfg->name); proto = (field_info*) g_ptr_array_index(protos,j); - pdu = new_pdu(cfg, pinfo->fd->num, proto, tree); + pdu = new_pdu(cfg, pinfo->num, proto, tree); if (cfg->criterium) { criterium_match = new_avpl_from_match(cfg->criterium_match_mode,"",pdu->avpl,cfg->criterium,FALSE); @@ -897,7 +897,7 @@ extern void mate_analyze_frame(packet_info *pinfo, proto_tree* tree) { } if (!last) { - g_hash_table_insert(rd->frames,GINT_TO_POINTER(pinfo->fd->num),pdu); + g_hash_table_insert(rd->frames,GINT_TO_POINTER(pinfo->num),pdu); last = pdu; } else { last->next_in_frame = pdu; @@ -910,7 +910,7 @@ extern void mate_analyze_frame(packet_info *pinfo, proto_tree* tree) { } } - rd->highest_analyzed_frame = pinfo->fd->num; + rd->highest_analyzed_frame = pinfo->num; } } diff --git a/plugins/mate/packet-mate.c b/plugins/mate/packet-mate.c index 3b5bfa3a7b..5ece48b188 100644 --- a/plugins/mate/packet-mate.c +++ b/plugins/mate/packet-mate.c @@ -306,7 +306,7 @@ mate_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) mate_analyze_frame(pinfo,tree); - if (( pdus = mate_get_pdus(pinfo->fd->num) )) { + if (( pdus = mate_get_pdus(pinfo->num) )) { for ( ; pdus; pdus = pdus->next_in_frame) { mate_i = proto_tree_add_protocol_format(tree,mc->hfid_mate,tvb,0,0,"MATE"); mate_t = proto_item_add_subtree(mate_i, mc->ett_root); -- cgit v1.2.3