diff --git a/asn1/rrc/packet-rrc-template.c b/asn1/rrc/packet-rrc-template.c index cb78c1cb4e..03e78a8c8e 100644 --- a/asn1/rrc/packet-rrc-template.c +++ b/asn1/rrc/packet-rrc-template.c @@ -197,7 +197,7 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) struct rrc_info *rrcinf; top_tree = tree; - rrcinf = (struct rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc); + rrcinf = (struct rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc, 0); /* make entry in the Protocol column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC"); diff --git a/asn1/rrc/rrc.cnf b/asn1/rrc/rrc.cnf index 80db1b10f4..f27bc426c2 100644 --- a/asn1/rrc/rrc.cnf +++ b/asn1/rrc/rrc.cnf @@ -404,7 +404,7 @@ fp_info *fpinf ; %(DEFAULT_BODY)s - fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp); + fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp, 0); if(fpinf && ((c_inf = (rrc_ciphering_info *)g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) != NULL) ){ c_inf->setup_frame = actx->pinfo->fd->num; } @@ -718,7 +718,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE num_chans_per_flow[flowd]++; if(num_chans_per_flow[flowd] > 1 ){ - rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc); + rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0); if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){ expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI"); } @@ -754,7 +754,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE if(num_chans_per_flow[flowd] > 1 ){ - rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc); + rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0); if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){ expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI"); } @@ -785,10 +785,10 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE %(DEFAULT_BODY)s #.FN_FTR H-RNTI - rrcinf = (struct rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc); + rrcinf = (struct rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0); if (!rrcinf) { rrcinf = se_new0(struct rrc_info); - p_add_proto_data(actx->pinfo->fd, proto_rrc, rrcinf); + p_add_proto_data(actx->pinfo->fd, proto_rrc, 0, rrcinf); } rrcinf->hrnti[actx->pinfo->fd->subnum] = tvb_get_ntohs(hrnti_tvb, 0); @@ -802,7 +802,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE %(DEFAULT_BODY)s /*We base this map on communication context from fp*/ - fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp); + fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp, 0); /*If no info found, skip all this*/ if(fpinf == NULL){ @@ -854,7 +854,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE - fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp); + fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp, 0); %(DEFAULT_BODY)s diff --git a/asn1/spnego/packet-spnego-template.c b/asn1/spnego/packet-spnego-template.c index 357cd9f2f2..1afe18e48f 100644 --- a/asn1/spnego/packet-spnego-template.c +++ b/asn1/spnego/packet-spnego-template.c @@ -1273,7 +1273,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) * It has to be per-frame as there can be more than one GSS-API * negotiation in a conversation. */ - next_level_value = (gssapi_oid_value *)p_get_proto_data(pinfo->fd, proto_spnego); + next_level_value = (gssapi_oid_value *)p_get_proto_data(pinfo->fd, proto_spnego, 0); if (!next_level_value && !pinfo->fd->flags.visited) { /* * No handle attached to this frame, but it's the first @@ -1289,7 +1289,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) next_level_value = (gssapi_oid_value *)conversation_get_proto_data(conversation, proto_spnego); if (next_level_value) - p_add_proto_data(pinfo->fd, proto_spnego, next_level_value); + p_add_proto_data(pinfo->fd, proto_spnego, 0, next_level_value); } } diff --git a/asn1/t38/packet-t38-template.c b/asn1/t38/packet-t38-template.c index 87966844f5..24fbca9dfe 100644 --- a/asn1/t38/packet-t38-template.c +++ b/asn1/t38/packet-t38-template.c @@ -422,7 +422,7 @@ init_t38_info_conv(packet_info *pinfo) p_t38_conv = NULL; /* Use existing packet info if available */ - p_t38_packet_conv = (t38_conv *)p_get_proto_data(pinfo->fd, proto_t38); + p_t38_packet_conv = (t38_conv *)p_get_proto_data(pinfo->fd, proto_t38, 0); /* find the conversation used for Reassemble and Setup Info */ @@ -479,7 +479,7 @@ init_t38_info_conv(packet_info *pinfo) memcpy(&(p_t38_packet_conv->src_t38_info), &(p_t38_conv->src_t38_info), sizeof(t38_conv_info)); memcpy(&(p_t38_packet_conv->dst_t38_info), &(p_t38_conv->dst_t38_info), sizeof(t38_conv_info)); - p_add_proto_data(pinfo->fd, proto_t38, p_t38_packet_conv); + p_add_proto_data(pinfo->fd, proto_t38, 0, p_t38_packet_conv); } if (ADDRESSES_EQUAL(&p_conv->key_ptr->addr1, &pinfo->net_src)) { diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c index f01da072dd..394c876c97 100644 --- a/epan/dissectors/packet-6lowpan.c +++ b/epan/dissectors/packet-6lowpan.c @@ -699,7 +699,7 @@ lowpan_dlsrc_to_ifcid(packet_info *pinfo, guint8 *ifcid) /* Lookup the IEEE 802.15.4 addressing hints. */ hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, - proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN)); + proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN), 0); if (hints) { lowpan_addr16_to_ifcid(hints->src16, ifcid); return TRUE; @@ -738,7 +738,7 @@ lowpan_dldst_to_ifcid(packet_info *pinfo, guint8 *ifcid) /* Lookup the IEEE 802.15.4 addressing hints. */ hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, - proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN)); + proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN), 0); if (hints) { lowpan_addr16_to_ifcid(hints->dst16, ifcid); return TRUE; @@ -1371,7 +1371,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d /* Lookup the IEEE 802.15.4 addressing hints. */ hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, - proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN)); + proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN), 0); hint_panid = (hints) ? (hints->src_pan) : (IEEE802154_BCAST_PAN); /* Create a tree for the IPHC header. */ diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c index 6664807f14..6e0235f186 100644 --- a/epan/dissectors/packet-ajp13.c +++ b/epan/dissectors/packet-ajp13.c @@ -793,7 +793,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * state for use later on when we're called out of order (see * comments at top of this file) */ - fd = (ajp13_frame_data*)p_get_proto_data(pinfo->fd, proto_ajp13); + fd = (ajp13_frame_data*)p_get_proto_data(pinfo->fd, proto_ajp13, 0); if (!fd) { /*printf("ajp13:dissect_ajp13_common():no frame data, adding");*/ /* since there's no per-packet user data, this must be the first @@ -801,7 +801,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * pass through the data. */ fd = se_new(ajp13_frame_data); - p_add_proto_data(pinfo->fd, proto_ajp13, fd); + p_add_proto_data(pinfo->fd, proto_ajp13, fd, 0); fd->is_request_body = FALSE; if (cd->content_length) { /* this is screwy, see AJPv13.html. the idea is that if the diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c index ee3e3a97cf..41cbe8903c 100644 --- a/epan/dissectors/packet-arp.c +++ b/epan/dissectors/packet-arp.c @@ -756,7 +756,7 @@ static void request_seen(packet_info *pinfo) { /* Don't count frame again after already recording first time around. */ - if (p_get_proto_data(pinfo->fd, proto_arp) == 0) + if (p_get_proto_data(pinfo->fd, proto_arp, 0) == 0) { arp_request_count++; } @@ -768,10 +768,10 @@ check_for_storm_count(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { gboolean report_storm = FALSE; - if (p_get_proto_data(pinfo->fd, proto_arp) != 0) + if (p_get_proto_data(pinfo->fd, proto_arp, 0) != 0) { /* Read any previous stored packet setting */ - report_storm = (p_get_proto_data(pinfo->fd, proto_arp) == (void*)STORM); + report_storm = (p_get_proto_data(pinfo->fd, proto_arp, 0) == (void*)STORM); } else { @@ -787,7 +787,7 @@ check_for_storm_count(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Time period elapsed without threshold being exceeded */ arp_request_count = 1; time_at_start_of_count = pinfo->fd->abs_ts; - p_add_proto_data(pinfo->fd, proto_arp, (void*)NO_STORM); + p_add_proto_data(pinfo->fd, proto_arp, 0, (void*)NO_STORM); return; } else @@ -795,13 +795,13 @@ check_for_storm_count(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { /* Storm detected, record and reset start time. */ report_storm = TRUE; - p_add_proto_data(pinfo->fd, proto_arp, (void*)STORM); + p_add_proto_data(pinfo->fd, proto_arp, 0, (void*)STORM); time_at_start_of_count = pinfo->fd->abs_ts; } else { /* Threshold not exceeded yet - no storm */ - p_add_proto_data(pinfo->fd, proto_arp, (void*)NO_STORM); + p_add_proto_data(pinfo->fd, proto_arp, 0, (void*)NO_STORM); } } diff --git a/epan/dissectors/packet-beep.c b/epan/dissectors/packet-beep.c index 5bd40119e3..67a95f3e7b 100644 --- a/epan/dissectors/packet-beep.c +++ b/epan/dissectors/packet-beep.c @@ -779,7 +779,7 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * info first. */ - beep_frame_data = (struct beep_proto_data *)p_get_proto_data(pinfo->fd, proto_beep); + beep_frame_data = (struct beep_proto_data *)p_get_proto_data(pinfo->fd, proto_beep, 0); if (!beep_frame_data) { @@ -873,7 +873,7 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) beep_frame_data->pl_size = 0; beep_frame_data->mime_hdr = 0; - p_add_proto_data(pinfo->fd, proto_beep, beep_frame_data); + p_add_proto_data(pinfo->fd, proto_beep, 0, beep_frame_data); } @@ -889,7 +889,7 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) beep_frame_data->pl_size = 0; beep_frame_data->mime_hdr = 0; - p_add_proto_data(pinfo->fd, proto_beep, beep_frame_data); + p_add_proto_data(pinfo->fd, proto_beep, 0, beep_frame_data); } diff --git a/epan/dissectors/packet-brdwlk.c b/epan/dissectors/packet-brdwlk.c index 8ed3a29cf5..12fc4971bb 100644 --- a/epan/dissectors/packet-brdwlk.c +++ b/epan/dissectors/packet-brdwlk.c @@ -295,7 +295,7 @@ dissect_brdwlk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * We therefore attach a non-null pointer as frame data to * any frame preceded by dropped packets. */ - if (p_get_proto_data(pinfo->fd, proto_brdwlk) != NULL) + if (p_get_proto_data(pinfo->fd, proto_brdwlk, 0) != NULL) dropped_packets = TRUE; } else { /* @@ -316,7 +316,7 @@ dissect_brdwlk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * packets. (The data we use as the frame data doesn't * matter - it just matters that it's non-null.) */ - p_add_proto_data(pinfo->fd, proto_brdwlk, &packet_count); + p_add_proto_data(pinfo->fd, proto_brdwlk, 0, &packet_count); } } diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index 46439789eb..b9c0e2ea42 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -1109,7 +1109,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, gint offset, guint8 channelId; /* Look this up so can update channel info */ - p_pdcp_lte_info = (struct pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte); + p_pdcp_lte_info = (struct pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte, 0); if (p_pdcp_lte_info == NULL) { /* This really should be set...can't dissect anything without it */ return; @@ -1443,7 +1443,7 @@ static void attach_fp_info(packet_info *pinfo, gboolean received, const char *pr int calculated_variant; /* Only need to set info once per session. */ - struct fp_info *p_fp_info = (struct fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + struct fp_info *p_fp_info = (struct fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); if (p_fp_info != NULL) { return; } @@ -1568,7 +1568,7 @@ static void attach_fp_info(packet_info *pinfo, gboolean received, const char *pr if (strcmp(protocol_name, "fpiur_r5") == 0) { /* Store info in packet */ p_fp_info->iface_type = IuR_Interface; - p_add_proto_data(pinfo->fd, proto_fp, p_fp_info); + p_add_proto_data(pinfo->fd, proto_fp, 0, p_fp_info); return; } @@ -1632,7 +1632,7 @@ static void attach_fp_info(packet_info *pinfo, gboolean received, const char *pr p_fp_info->iface_type = IuB_Interface; /* Store info in packet */ - p_add_proto_data(pinfo->fd, proto_fp, p_fp_info); + p_add_proto_data(pinfo->fd, proto_fp, 0, p_fp_info); } @@ -1642,7 +1642,7 @@ static void attach_rlc_info(packet_info *pinfo, guint32 urnti, guint8 rbid, gboo { /* Only need to set info once per session. */ struct fp_info *p_fp_info; - struct rlc_info *p_rlc_info = (struct rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + struct rlc_info *p_rlc_info = (struct rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (p_rlc_info != NULL) { return; @@ -1698,7 +1698,7 @@ static void attach_rlc_info(packet_info *pinfo, guint32 urnti, guint8 rbid, gboo p_rlc_info->li_size[0] = (enum rlc_li_size)outhdr_values[0]; /* Store info in packet */ - p_add_proto_data(pinfo->fd, proto_rlc, p_rlc_info); + p_add_proto_data(pinfo->fd, proto_rlc, 0, p_rlc_info); /* Also store minimal FP info consulted by RLC dissector TODO: Don't really know direction, but use S/R flag to make @@ -1706,7 +1706,7 @@ static void attach_rlc_info(packet_info *pinfo, guint32 urnti, guint8 rbid, gboo but RLC dissector seems to not use anyway... */ p_fp_info->is_uplink = is_sent; p_fp_info->cur_tb = 0; /* Always the first/only one */ - p_add_proto_data(pinfo->fd, proto_fp, p_fp_info); + p_add_proto_data(pinfo->fd, proto_fp, 0, p_fp_info); } @@ -1840,7 +1840,7 @@ static void attach_rlc_lte_info(packet_info *pinfo) unsigned int i = 0; /* Only need to set info once per session. */ - p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte); + p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte, 0); if (p_rlc_lte_info != NULL) { return; } @@ -1858,7 +1858,7 @@ static void attach_rlc_lte_info(packet_info *pinfo) p_rlc_lte_info->pduLength = outhdr_values[i]; /* Store info in packet */ - p_add_proto_data(pinfo->fd, proto_rlc_lte, p_rlc_lte_info); + p_add_proto_data(pinfo->fd, proto_rlc_lte, 0, p_rlc_lte_info); } /* Fill in a PDCP LTE packet info struct and attach it to the packet for the PDCP LTE @@ -1869,7 +1869,7 @@ static void attach_pdcp_lte_info(packet_info *pinfo) unsigned int i = 0; /* Only need to set info once per session. */ - p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte); + p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte, 0); if (p_pdcp_lte_info != NULL) { return; } @@ -1896,7 +1896,7 @@ static void attach_pdcp_lte_info(packet_info *pinfo) /* Remaining 2 (fixed) fields are ah_length and gre_checksum */ /* Store info in packet */ - p_add_proto_data(pinfo->fd, proto_pdcp_lte, p_pdcp_lte_info); + p_add_proto_data(pinfo->fd, proto_pdcp_lte, 0, p_pdcp_lte_info); } diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c index 41e0253bcc..651de5b8e0 100644 --- a/epan/dissectors/packet-cip.c +++ b/epan/dissectors/packet-cip.c @@ -2479,7 +2479,7 @@ static void add_cip_service_to_info_column(packet_info *pinfo, guint8 service, c { cip_req_info_t *preq_info; - preq_info = (cip_req_info_t*)p_get_proto_data( pinfo->fd, proto_cip ); + preq_info = (cip_req_info_t*)p_get_proto_data( pinfo->fd, proto_cip, 0 ); if ((preq_info == NULL) || (preq_info->isUnconnectedSend == FALSE)) { @@ -4238,7 +4238,7 @@ dissect_cip_multiple_service_packet_req(tvbuff_t *tvb, packet_info *pinfo, proto else { /* Add services */ - cip_req_info = (cip_req_info_t*)p_get_proto_data( pinfo->fd, proto_cip ); + cip_req_info = (cip_req_info_t*)p_get_proto_data( pinfo->fd, proto_cip, 0 ); if ( cip_req_info ) { if ( cip_req_info->pData == NULL ) @@ -4575,7 +4575,7 @@ dissect_cip_multiple_service_packet_rsp(tvbuff_t *tvb, packet_info *pinfo, proto return; } - cip_req_info = (cip_req_info_t*)p_get_proto_data( pinfo->fd, proto_cip ); + cip_req_info = (cip_req_info_t*)p_get_proto_data( pinfo->fd, proto_cip, 0 ); if ( cip_req_info ) { mr_mult_req_info = (mr_mult_req_info_t*)cip_req_info->pData; @@ -4689,7 +4689,7 @@ dissect_cip_generic_service_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t return tvb_length(tvb); } - preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip); + preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip, 0); if ((preq_info != NULL) && (preq_info->ciaData != NULL)) { @@ -5032,7 +5032,7 @@ dissect_cip_cm_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_ /* Special handling for Unconnected send response. If successful, embedded service code is sent. * If failed, it can be either an Unconnected send response or the embedded service code response. */ - preq_info = (cip_req_info_t*)p_get_proto_data( pinfo->fd, proto_cip ); + preq_info = (cip_req_info_t*)p_get_proto_data( pinfo->fd, proto_cip, 0 ); if ( preq_info != NULL && ( service & 0x80 ) && preq_info->bService == SC_CM_UNCON_SEND ) @@ -5061,9 +5061,9 @@ dissect_cip_cm_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_ tvbuff_t *next_tvb; void *p_save_proto_data; - p_save_proto_data = p_get_proto_data( pinfo->fd, proto_cip ); - p_remove_proto_data(pinfo->fd, proto_cip); - p_add_proto_data(pinfo->fd, proto_cip, pembedded_req_info ); + p_save_proto_data = p_get_proto_data( pinfo->fd, proto_cip, 0 ); + p_remove_proto_data(pinfo->fd, proto_cip, 0); + p_add_proto_data(pinfo->fd, proto_cip, 0, pembedded_req_info ); proto_tree_add_text( item_tree, NULL, 0, 0, "(Service: Unconnected Send (Response))" ); next_tvb = tvb_new_subset(tvb, offset, item_length, item_length); @@ -5072,8 +5072,8 @@ dissect_cip_cm_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_ else call_dissector( cip_class_generic_handle, next_tvb, pinfo, item_tree ); - p_remove_proto_data(pinfo->fd, proto_cip); - p_add_proto_data(pinfo->fd, proto_cip, p_save_proto_data); + p_remove_proto_data(pinfo->fd, proto_cip, 0); + p_add_proto_data(pinfo->fd, proto_cip, 0, p_save_proto_data); return; } } @@ -5366,7 +5366,7 @@ dissect_cip_cm_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_ col_append_str( pinfo->cinfo, COL_INFO, ": "); next_tvb = tvb_new_subset(tvb, offset+2+req_path_size+4, msg_req_siz, msg_req_siz); - preq_info = (cip_req_info_t *)p_get_proto_data( pinfo->fd, proto_cip ); + preq_info = (cip_req_info_t *)p_get_proto_data( pinfo->fd, proto_cip, 0 ); pembedded_req_info = NULL; if ( preq_info ) { @@ -5532,10 +5532,10 @@ dissect_cip_mb_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_ request_info->packet_type = RESPONSE_PACKET; request_info->register_addr_type = MBTCP_PREF_REGISTER_ADDR_RAW; request_info->register_format = MBTCP_PREF_REGISTER_FORMAT_UINT16; - p_add_proto_data(pinfo->fd, proto_modbus, request_info); + p_add_proto_data(pinfo->fd, proto_modbus, 0, request_info); call_dissector(modbus_handle, next_tvb, pinfo, cmd_data_tree); - p_remove_proto_data(pinfo->fd, proto_modbus); + p_remove_proto_data(pinfo->fd, proto_modbus, 0); } break; @@ -5622,10 +5622,10 @@ dissect_cip_mb_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_ request_info->packet_type = QUERY_PACKET; request_info->register_addr_type = MBTCP_PREF_REGISTER_ADDR_RAW; request_info->register_format = MBTCP_PREF_REGISTER_FORMAT_UINT16; - p_add_proto_data(pinfo->fd, proto_modbus, request_info); + p_add_proto_data(pinfo->fd, proto_modbus, 0, request_info); call_dissector(modbus_handle, next_tvb, pinfo, cmd_data_tree); - p_remove_proto_data(pinfo->fd, proto_modbus); + p_remove_proto_data(pinfo->fd, proto_modbus, 0); } break; @@ -5862,7 +5862,7 @@ dissect_cip_cco_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item /* Add Service code */ proto_tree_add_item(rrsc_tree, hf_cip_cco_sc, tvb, offset, 1, ENC_LITTLE_ENDIAN ); - preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip); + preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip, 0); if ((preq_info != NULL) && (preq_info->ciaData != NULL)) { @@ -6023,7 +6023,7 @@ dissect_class_cco_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void if (service & 0x80) { /* Service response */ - preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip); + preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip, 0); if ((preq_info != NULL) && (preq_info->dissector == dissector_get_uint_handle( subdissector_class_table, CI_CLS_CCO))) { @@ -6094,9 +6094,9 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, packet_info dissector_handle_t dissector; gint service_index; - p_save_proto_data = p_get_proto_data(pinfo->fd, proto_cip); - p_remove_proto_data(pinfo->fd, proto_cip); - p_add_proto_data(pinfo->fd, proto_cip, preq_info); + p_save_proto_data = p_get_proto_data(pinfo->fd, proto_cip, 0); + p_remove_proto_data(pinfo->fd, proto_cip, 0); + p_add_proto_data(pinfo->fd, proto_cip, 0, preq_info); /* Create display subtree for the protocol */ ti = proto_tree_add_item(item_tree, proto_cip, tvb, 0, -1, ENC_NA); @@ -6276,8 +6276,8 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, packet_info } } /* End of if-else( request ) */ - p_remove_proto_data(pinfo->fd, proto_cip); - p_add_proto_data(pinfo->fd, proto_cip, p_save_proto_data); + p_remove_proto_data(pinfo->fd, proto_cip, 0); + p_add_proto_data(pinfo->fd, proto_cip, 0, p_save_proto_data); } /* End of dissect_cip_data() */ @@ -6294,7 +6294,7 @@ dissect_cip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) col_clear(pinfo->cinfo, COL_INFO); /* Each CIP request received by ENIP gets a unique ID */ - enip_info = (enip_request_info_t*)p_get_proto_data(pinfo->fd, proto_enip); + enip_info = (enip_request_info_t*)p_get_proto_data(pinfo->fd, proto_enip, 0); if ( enip_info ) { diff --git a/epan/dissectors/packet-cipsafety.c b/epan/dissectors/packet-cipsafety.c index c25138cae1..09f2eaa71a 100644 --- a/epan/dissectors/packet-cipsafety.c +++ b/epan/dissectors/packet-cipsafety.c @@ -476,7 +476,7 @@ dissect_cip_s_supervisor_data( proto_tree *item_tree, /* Add Service code */ proto_tree_add_item(rrsc_tree, hf_cip_ssupervisor_sc, tvb, offset, 1, ENC_LITTLE_ENDIAN ); - preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip); + preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip, 0); if ((preq_info != NULL) && (preq_info->ciaData != NULL)) { @@ -1158,7 +1158,7 @@ dissect_cip_s_validator_data( proto_tree *item_tree, /* Add Service code */ proto_tree_add_item(rrsc_tree, hf_cip_svalidator_sc, tvb, offset, 1, ENC_LITTLE_ENDIAN ); - preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip); + preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip, 0); if ((preq_info != NULL) && (preq_info->ciaData != NULL)) { @@ -1312,7 +1312,7 @@ dissect_class_svalidator_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre if (service & 0x80) { /* Service response */ - preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip); + preq_info = (cip_req_info_t*)p_get_proto_data(pinfo->fd, proto_cip, 0); if ((preq_info != NULL) && (preq_info->dissector == dissector_get_uint_handle( subdissector_class_table, CI_CLS_SAFETY_VALIDATOR))) { @@ -1453,7 +1453,7 @@ dissect_cip_safety_data( proto_tree *tree, proto_item *item, tvbuff_t *tvb, int gboolean server_dir = FALSE; enum enip_connid_type conn_type = ECIDT_UNKNOWN; enum cip_safety_format_type format = CIP_SAFETY_BASE_FORMAT; - cip_safety_info_t* safety_info = (cip_safety_info_t*)p_get_proto_data( pinfo->fd, proto_cipsafety ); + cip_safety_info_t* safety_info = (cip_safety_info_t*)p_get_proto_data( pinfo->fd, proto_cipsafety, 0 ); /* Make entries in Protocol column and Info column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "CIP Safety"); diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index a47f186259..ba137d87ef 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -1469,10 +1469,10 @@ static void register_dmp_id (packet_info *pinfo, guint8 reason) pkg_data = se_new (dmp_id_val); *pkg_data = *dmp_data; - p_add_proto_data (pinfo->fd, proto_dmp, pkg_data); + p_add_proto_data (pinfo->fd, proto_dmp, 0, pkg_data); } else { /* Fetch last values from data saved in packet */ - pkg_data = (dmp_id_val *)p_get_proto_data (pinfo->fd, proto_dmp); + pkg_data = (dmp_id_val *)p_get_proto_data (pinfo->fd, proto_dmp, 0); if (dmp_data && pkg_data && dmp.msg_type != ACK && pkg_data->ack_id == 0) { pkg_data->ack_id = dmp_data->ack_id; diff --git a/epan/dissectors/packet-eap.c b/epan/dissectors/packet-eap.c index b8a1c47a58..6e67ac85d9 100644 --- a/epan/dissectors/packet-eap.c +++ b/epan/dissectors/packet-eap.c @@ -895,7 +895,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) first pass through the capture. */ /* See if we have a remembered defragmentation EAP ID. */ - packet_state = (frame_state_t *)p_get_proto_data(pinfo->fd, proto_eap); + packet_state = (frame_state_t *)p_get_proto_data(pinfo->fd, proto_eap, 0); if (packet_state == NULL) { /* * We haven't - does this message require reassembly? @@ -958,7 +958,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) */ packet_state = se_new(frame_state_t); packet_state->info = eap_reass_cookie; - p_add_proto_data(pinfo->fd, proto_eap, packet_state); + p_add_proto_data(pinfo->fd, proto_eap, 0, packet_state); } } } else { @@ -1078,7 +1078,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) /* This part is state-dependent. */ /* See if we've already remembered the state. */ - packet_state = (frame_state_t *)p_get_proto_data(pinfo->fd, proto_eap); + packet_state = (frame_state_t *)p_get_proto_data(pinfo->fd, proto_eap, 0); if (packet_state == NULL) { /* * We haven't - compute the state based on the current @@ -1099,7 +1099,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) */ packet_state = se_new(frame_state_t); packet_state->info = leap_state; - p_add_proto_data(pinfo->fd, proto_eap, packet_state); + p_add_proto_data(pinfo->fd, proto_eap, 0, packet_state); /* * Update the conversation's state. diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c index b7cf5adda8..ca6feb6ed2 100644 --- a/epan/dissectors/packet-enip.c +++ b/epan/dissectors/packet-enip.c @@ -1657,7 +1657,7 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb, /* Call dissector for interface */ next_tvb = tvb_new_subset( tvb, offset+6, item_length, item_length ); - p_add_proto_data(pinfo->fd, proto_enip, request_info); + p_add_proto_data(pinfo->fd, proto_enip, 0, request_info); if( tvb_length_remaining(next_tvb, 0) <= 0 || !dissector_try_uint(subdissector_srrd_table, ifacehndl, next_tvb, pinfo, dissector_tree) ) { /* Show the undissected payload */ @@ -1685,7 +1685,7 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb, } else { - p_remove_proto_data(pinfo->fd, proto_enip); + p_remove_proto_data(pinfo->fd, proto_enip, 0); } break; @@ -1712,14 +1712,14 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb, /* Call dissector for interface */ next_tvb = tvb_new_subset (tvb, offset+8, item_length-2, item_length-2); - p_add_proto_data(pinfo->fd, proto_enip, request_info); + p_add_proto_data(pinfo->fd, proto_enip, 0, request_info); if( tvb_length_remaining(next_tvb, 0) <= 0 || !dissector_try_uint(subdissector_sud_table, ifacehndl, next_tvb, pinfo, dissector_tree) ) { /* Show the undissected payload */ if( tvb_length_remaining(tvb, offset) > 0 ) call_dissector( data_handle, next_tvb, pinfo, dissector_tree ); } - p_remove_proto_data(pinfo->fd, proto_enip); + p_remove_proto_data(pinfo->fd, proto_enip, 0); } else { @@ -1736,7 +1736,7 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb, cip_safety->conn_type = connid_type; cip_safety->server_dir = (conn_info->TransportClass_trigger & CI_PRODUCTION_DIR_MASK) ? TRUE : FALSE; cip_safety->format = conn_info->safety.format; - p_add_proto_data(pinfo->fd, proto_cipsafety, cip_safety); + p_add_proto_data(pinfo->fd, proto_cipsafety, 0, cip_safety); call_dissector(cipsafety_handle, next_tvb, pinfo, dissector_tree); } else if (conn_info->motion == TRUE) @@ -1881,7 +1881,7 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb, if ((FwdOpen == TRUE) || (FwdOpenReply == TRUE)) { - request_info = (enip_request_info_t *)p_get_proto_data(pinfo->fd, proto_enip); + request_info = (enip_request_info_t *)p_get_proto_data(pinfo->fd, proto_enip, 0); if (request_info != NULL) { if (item == SOCK_ADR_INFO_OT) @@ -1953,16 +1953,16 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb, /* See if there is a CIP connection to establish */ if (FwdOpenReply == TRUE) { - request_info = (enip_request_info_t *)p_get_proto_data(pinfo->fd, proto_enip); + request_info = (enip_request_info_t *)p_get_proto_data(pinfo->fd, proto_enip, 0); if (request_info != NULL) { enip_open_cip_connection(pinfo, request_info->cip_info->connInfo); } - p_remove_proto_data(pinfo->fd, proto_enip); + p_remove_proto_data(pinfo->fd, proto_enip, 0); } else if (FwdOpen == TRUE) { - p_remove_proto_data(pinfo->fd, proto_enip); + p_remove_proto_data(pinfo->fd, proto_enip, 0); } } /* end of dissect_cpf() */ diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c index e1b7c30089..d8b25c2c7a 100644 --- a/epan/dissectors/packet-fcp.c +++ b/epan/dissectors/packet-fcp.c @@ -431,7 +431,7 @@ dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro if (!pinfo->fd->flags.visited) { proto_data = se_new(fcp_proto_data_t); proto_data->lun = lun; - p_add_proto_data(pinfo->fd, proto_fcp, proto_data); + p_add_proto_data(pinfo->fd, proto_fcp, 0, proto_data); } request_data = (fcp_request_data_t*)se_tree_lookup32(fcp_conv_data->luns, lun); @@ -718,9 +718,9 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (!pinfo->fd->flags.visited) { proto_data = se_new(fcp_proto_data_t); proto_data->lun = fchdr->itlq->lun; - p_add_proto_data(pinfo->fd, proto_fcp, proto_data); + p_add_proto_data(pinfo->fd, proto_fcp, 0, proto_data); } else { - proto_data = (fcp_proto_data_t *)p_get_proto_data(pinfo->fd, proto_fcp); + proto_data = (fcp_proto_data_t *)p_get_proto_data(pinfo->fd, proto_fcp, 0); fchdr->itlq->lun = proto_data->lun; } diff --git a/epan/dissectors/packet-fp_hint.c b/epan/dissectors/packet-fp_hint.c index df9c238eaf..b098410c4e 100644 --- a/epan/dissectors/packet-fp_hint.c +++ b/epan/dissectors/packet-fp_hint.c @@ -147,15 +147,15 @@ static guint16 assign_rb_info(tvbuff_t *tvb, packet_info *pinfo, guint16 offset, struct umts_mac_info *macinf; struct rlc_info *rlcinf; - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (!macinf) { macinf = se_new0(struct umts_mac_info); - p_add_proto_data(pinfo->fd, proto_umts_mac, macinf); + p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf); } if (!rlcinf) { rlcinf = se_new0(struct rlc_info); - p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); + p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf); } while (i < rbcnt) { @@ -428,10 +428,10 @@ static void attach_info(tvbuff_t *tvb, packet_info *pinfo, guint16 offset, guint { fp_info *fpi; - fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); if (!fpi) { fpi = se_new0(fp_info); - p_add_proto_data(pinfo->fd, proto_fp, fpi); + p_add_proto_data(pinfo->fd, proto_fp, 0, fpi); } fpi->is_uplink = pinfo->p2p_dir == P2P_DIR_RECV; diff --git a/epan/dissectors/packet-gssapi.c b/epan/dissectors/packet-gssapi.c index 248908762d..d42fd3ab62 100644 --- a/epan/dissectors/packet-gssapi.c +++ b/epan/dissectors/packet-gssapi.c @@ -367,14 +367,14 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * pointer; it just treats it as an opaque pointer, it * doesn't dereference it or free what it points to.) */ - oidvalue = (gssapi_oid_value *)p_get_proto_data(pinfo->fd, proto_gssapi); + oidvalue = (gssapi_oid_value *)p_get_proto_data(pinfo->fd, proto_gssapi, 0); if (!oidvalue && !pinfo->fd->flags.visited) { /* No handle attached to this frame, but it's the first */ /* pass, so it'd be attached to the conversation. */ oidvalue = gss_info->oid; if (gss_info->oid) - p_add_proto_data(pinfo->fd, proto_gssapi, gss_info->oid); + p_add_proto_data(pinfo->fd, proto_gssapi, 0, gss_info->oid); } if (!oidvalue) { diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c index 721b085fb0..430ab5e3b5 100644 --- a/epan/dissectors/packet-http.c +++ b/epan/dissectors/packet-http.c @@ -640,7 +640,7 @@ static void push_req(http_conv_t *conv_data, packet_info *pinfo) req_res->req_framenum = pinfo->fd->num; req_res->req_ts = pinfo->fd->abs_ts; - p_add_proto_data(pinfo->fd, proto_http, req_res); + p_add_proto_data(pinfo->fd, proto_http, 0, req_res); } /** @@ -659,7 +659,7 @@ static void push_res(http_conv_t *conv_data, packet_info *pinfo) req_res = push_req_res(conv_data); } req_res->res_framenum = pinfo->fd->num; - p_add_proto_data(pinfo->fd, proto_http, req_res); + p_add_proto_data(pinfo->fd, proto_http, 0, req_res); } /* @@ -1018,7 +1018,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo, if (tree) { proto_item *pi; - http_req_res_t *curr = (http_req_res_t *)p_get_proto_data(pinfo->fd, proto_http); + http_req_res_t *curr = (http_req_res_t *)p_get_proto_data(pinfo->fd, proto_http, 0); http_req_res_t *prev = curr ? curr->prev : NULL; http_req_res_t *next = curr ? curr->next : NULL; diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c index 070da5a47c..c995a3b67b 100644 --- a/epan/dissectors/packet-iax2.c +++ b/epan/dissectors/packet-iax2.c @@ -1587,7 +1587,7 @@ dissect_fullpacket(tvbuff_t *tvb, guint32 offset, iax2_info->dcallno = dcallno; /* see if we've seen this packet before */ - iax_packet = (iax_packet_data *)p_get_proto_data(pinfo->fd, proto_iax2); + iax_packet = (iax_packet_data *)p_get_proto_data(pinfo->fd, proto_iax2, 0); if (!iax_packet) { /* if not, find or create an iax_call info structure for this IAX session. */ @@ -1601,7 +1601,7 @@ dissect_fullpacket(tvbuff_t *tvb, guint32 offset, } iax_packet = iax_new_packet_data(iax_call, reversed); - p_add_proto_data(pinfo->fd, proto_iax2, iax_packet); + p_add_proto_data(pinfo->fd, proto_iax2, 0, iax_packet); } else { iax_call = iax_packet->call_data; reversed = iax_packet->reversed; @@ -1765,7 +1765,7 @@ static iax_packet_data *iax2_get_packet_data_for_minipacket(packet_info *pinfo, gboolean video) { /* see if we've seen this packet before */ - iax_packet_data *p = (iax_packet_data *)p_get_proto_data(pinfo->fd, proto_iax2); + iax_packet_data *p = (iax_packet_data *)p_get_proto_data(pinfo->fd, proto_iax2, 0); if (!p) { /* if not, find or create an iax_call info structure for this IAX session. */ @@ -1775,7 +1775,7 @@ static iax_packet_data *iax2_get_packet_data_for_minipacket(packet_info *pinfo, iax_call = iax_lookup_call(pinfo, scallno, 0, &reversed); p = iax_new_packet_data(iax_call, reversed); - p_add_proto_data(pinfo->fd, proto_iax2, p); + p_add_proto_data(pinfo->fd, proto_iax2, 0, p); /* set the codec for this frame to be whatever the last full frame used */ if (iax_call) { diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index da71cbc06c..080753a9c3 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -2158,7 +2158,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree break; } /* Update the 6LoWPAN dissectors with new context information. */ - hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, + hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, 0, proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN)); if ((opt_len <= 24) && hints) { lowpan_context_insert(context_id, hints->src_pan, context_len, &context_prefix, pinfo->fd->num); diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index b3e7c831b3..130189005a 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -632,9 +632,9 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g /* Allocate frame data with hints for upper layers */ if(!pinfo->fd->flags.visited){ ieee_hints = se_new0(ieee802154_hints_t); - p_add_proto_data(pinfo->fd, proto_ieee802154, ieee_hints); + p_add_proto_data(pinfo->fd, proto_ieee802154, 0, ieee_hints); } else { - ieee_hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, proto_ieee802154); + ieee_hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, proto_ieee802154, 0); } /* Create the protocol tree. */ @@ -1812,7 +1812,7 @@ dissect_ieee802154_decrypt(tvbuff_t * tvb, guint offset, packet_info * pinfo, ie return NULL; } - ieee_hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, proto_ieee802154); + ieee_hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, proto_ieee802154, 0); /* Get the captured and on-the-wire length of the payload. */ M = IEEE802154_MIC_LENGTH(packet->security_level); diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index 3a8936d38a..0c3bb90624 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -730,7 +730,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ spx_rexmit_info_p = se_new(spx_rexmit_info); spx_rexmit_info_p->num = pkt_value->num; - p_add_proto_data(pinfo->fd, proto_spx, + p_add_proto_data(pinfo->fd, proto_spx, 0, spx_rexmit_info_p); } } else { @@ -741,7 +741,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * transmission. */ spx_rexmit_info_p = (spx_rexmit_info *)p_get_proto_data(pinfo->fd, - proto_spx); + proto_spx, 0); } } diff --git a/epan/dissectors/packet-ixveriwave.c b/epan/dissectors/packet-ixveriwave.c index 87d10ad303..49092b14c7 100644 --- a/epan/dissectors/packet-ixveriwave.c +++ b/epan/dissectors/packet-ixveriwave.c @@ -507,7 +507,7 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Calculate the IFG */ /* Check for an existing ifg value associated with the frame */ - p_ifg_info = (ifg_info *)p_get_proto_data(pinfo->fd, proto_ixveriwave); + p_ifg_info = (ifg_info *)p_get_proto_data(pinfo->fd, proto_ixveriwave, 0); if (!p_ifg_info) { /* allocate the space */ @@ -533,7 +533,7 @@ dissect_ixveriwave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) p_ifg_info->current_start_time = vw_startt; /* Add the ifg onto the frame */ - p_add_proto_data(pinfo->fd, proto_ixveriwave, p_ifg_info); + p_add_proto_data(pinfo->fd, proto_ixveriwave, 0, p_ifg_info); } if (tree) { diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c index 15e77e9fc7..752135399a 100644 --- a/epan/dissectors/packet-k12.c +++ b/epan/dissectors/packet-k12.c @@ -276,10 +276,10 @@ dissect_k12(tvbuff_t* tvb,packet_info* pinfo,proto_tree* tree) for (i = 0; handles[i] && handles[i+1]; ++i) { if (handles[i] == sscop_handle) { - sscop_payload_info *p_sscop_info = (sscop_payload_info *)p_get_proto_data(pinfo->fd, proto_sscop); + sscop_payload_info *p_sscop_info = (sscop_payload_info *)p_get_proto_data(pinfo->fd, proto_sscop, 0); if (!p_sscop_info) { p_sscop_info = se_new0(sscop_payload_info); - p_add_proto_data(pinfo->fd, proto_sscop, p_sscop_info); + p_add_proto_data(pinfo->fd, proto_sscop, 0, p_sscop_info); p_sscop_info->subdissector = handles[i+1]; } } @@ -290,10 +290,10 @@ dissect_k12(tvbuff_t* tvb,packet_info* pinfo,proto_tree* tree) /* Setup information required by certain protocols */ if (sub_handle == fp_handle) { - fp_info *p_fp_info = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + fp_info *p_fp_info = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); if (!p_fp_info) { p_fp_info = se_new0(fp_info); - p_add_proto_data(pinfo->fd, proto_fp, p_fp_info); + p_add_proto_data(pinfo->fd, proto_fp, 0, p_fp_info); fill_fp_info(p_fp_info, pinfo->pseudo_header->k12.extra_info, diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c index 23ce852aa5..471c93c69c 100644 --- a/epan/dissectors/packet-lapd.c +++ b/epan/dissectors/packet-lapd.c @@ -239,7 +239,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* get remaining data from previous packets */ conversation = find_or_create_conversation(pinfo); - lapd_ppi = (lapd_ppi_t*)p_get_proto_data(pinfo->fd, proto_lapd); + lapd_ppi = (lapd_ppi_t*)p_get_proto_data(pinfo->fd, proto_lapd, 0); if (lapd_ppi) { prev_byte_state = &lapd_ppi->start_byte_state; if (prev_byte_state) { @@ -362,7 +362,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } { - if (NULL == p_get_proto_data(pinfo->fd, proto_lapd)) { + if (NULL == p_get_proto_data(pinfo->fd, proto_lapd, 0)) { /* Per packet information */ lapd_ppi = se_new(lapd_ppi_t); lapd_ppi->has_crc = TRUE; @@ -373,7 +373,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) else fill_lapd_byte_state(&lapd_ppi->start_byte_state, OUT_OF_SYNC, 0x00, 0, 0, data, 0); - p_add_proto_data(pinfo->fd, proto_lapd, lapd_ppi); + p_add_proto_data(pinfo->fd, proto_lapd, 0, lapd_ppi); /* Conversation info*/ diff --git a/epan/dissectors/packet-mac-lte-framed.c b/epan/dissectors/packet-mac-lte-framed.c index 02f61fe41b..2a42e41dbd 100644 --- a/epan/dissectors/packet-mac-lte-framed.c +++ b/epan/dissectors/packet-mac-lte-framed.c @@ -61,7 +61,7 @@ static void dissect_mac_lte_framed(tvbuff_t *tvb, packet_info *pinfo, } /* If redissecting, use previous info struct (if available) */ - p_mac_lte_info = (struct mac_lte_info*)p_get_proto_data(pinfo->fd, proto_mac_lte); + p_mac_lte_info = (struct mac_lte_info*)p_get_proto_data(pinfo->fd, proto_mac_lte, 0); if (p_mac_lte_info == NULL) { /* Allocate new info struct for this frame */ p_mac_lte_info = (struct mac_lte_info*)se_alloc0(sizeof(struct mac_lte_info)); @@ -78,7 +78,7 @@ static void dissect_mac_lte_framed(tvbuff_t *tvb, packet_info *pinfo, /* Store info in packet (first time) */ if (!infoAlreadySet) { - p_add_proto_data(pinfo->fd, proto_mac_lte, p_mac_lte_info); + p_add_proto_data(pinfo->fd, proto_mac_lte, 0, p_mac_lte_info); } /**************************************/ diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index e77733c454..616db0d77c 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -1277,7 +1277,7 @@ static gboolean dissect_mac_lte_heur(tvbuff_t *tvb, packet_info *pinfo, offset += (gint)strlen(MAC_LTE_START_STRING); /* If redissecting, use previous info struct (if available) */ - p_mac_lte_info = (mac_lte_info *)p_get_proto_data(pinfo->fd, proto_mac_lte); + p_mac_lte_info = (mac_lte_info *)p_get_proto_data(pinfo->fd, proto_mac_lte, 0); if (p_mac_lte_info == NULL) { /* Allocate new info struct for this frame */ p_mac_lte_info = se_new0(struct mac_lte_info); @@ -1295,7 +1295,7 @@ static gboolean dissect_mac_lte_heur(tvbuff_t *tvb, packet_info *pinfo, if (!infoAlreadySet) { /* Store info in packet */ - p_add_proto_data(pinfo->fd, proto_mac_lte, p_mac_lte_info); + p_add_proto_data(pinfo->fd, proto_mac_lte, 0, p_mac_lte_info); } /**************************************/ @@ -1922,7 +1922,7 @@ static void call_rlc_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr struct rlc_lte_info *p_rlc_lte_info; /* Resuse or create RLC info */ - p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte); + p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte, 0); if (p_rlc_lte_info == NULL) { p_rlc_lte_info = se_new0(struct rlc_lte_info); } @@ -1938,7 +1938,7 @@ static void call_rlc_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr p_rlc_lte_info->UMSequenceNumberLength = UMSequenceNumberLength; /* Store info in packet */ - p_add_proto_data(pinfo->fd, proto_rlc_lte, p_rlc_lte_info); + p_add_proto_data(pinfo->fd, proto_rlc_lte, 0, p_rlc_lte_info); if (global_mac_lte_layer_to_show != ShowRLCLayer) { /* Don't want these columns replaced */ @@ -2093,7 +2093,7 @@ static void TrackReportedDLHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil /* Return TRUE if the given packet is thought to be a retx */ int is_mac_lte_frame_retx(packet_info *pinfo, guint8 direction) { - struct mac_lte_info *p_mac_lte_info = (struct mac_lte_info *)p_get_proto_data(pinfo->fd, proto_mac_lte); + struct mac_lte_info *p_mac_lte_info = (struct mac_lte_info *)p_get_proto_data(pinfo->fd, proto_mac_lte, 0); if (direction == DIRECTION_UPLINK) { /* For UL, retx count is stored in per-packet struct */ @@ -4214,7 +4214,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) mac_lte_tree = proto_item_add_subtree(pdu_ti, ett_mac_lte); /* Look for packet info! */ - p_mac_lte_info = (mac_lte_info *)p_get_proto_data(pinfo->fd, proto_mac_lte); + p_mac_lte_info = (mac_lte_info *)p_get_proto_data(pinfo->fd, proto_mac_lte, 0); /* Can't dissect anything without it... */ if (p_mac_lte_info == NULL) { @@ -4792,13 +4792,13 @@ static guint8 get_mac_lte_channel_priority(guint16 ueid, guint8 lcid, /* Function to be called from outside this module (e.g. in a plugin) to get per-packet data */ mac_lte_info *get_mac_lte_proto_data(packet_info *pinfo) { - return (mac_lte_info *)p_get_proto_data(pinfo->fd, proto_mac_lte); + return (mac_lte_info *)p_get_proto_data(pinfo->fd, proto_mac_lte, 0); } /* Function to be called from outside this module (e.g. in a plugin) to set per-packet data */ void set_mac_lte_proto_data(packet_info *pinfo, mac_lte_info *p_mac_lte_info) { - p_add_proto_data(pinfo->fd, proto_mac_lte, p_mac_lte_info); + p_add_proto_data(pinfo->fd, proto_mac_lte, 0, p_mac_lte_info); } void proto_register_mac_lte(void) diff --git a/epan/dissectors/packet-mbtcp.c b/epan/dissectors/packet-mbtcp.c index a3f0dbf49b..aa58638484 100644 --- a/epan/dissectors/packet-mbtcp.c +++ b/epan/dissectors/packet-mbtcp.c @@ -453,22 +453,22 @@ dissect_mbtcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_subset( tvb, offset+7, len-1, len-1); /* keep existing context */ - p_save_proto_data = p_get_proto_data( pinfo->fd, proto_modbus ); - p_remove_proto_data(pinfo->fd, proto_modbus); + p_save_proto_data = p_get_proto_data( pinfo->fd, proto_modbus, 0 ); + p_remove_proto_data(pinfo->fd, proto_modbus, 0); /* Create enough context for Modbus dissector */ request_info = ep_new(modbus_request_info_t); request_info->packet_type = (guint8)packet_type; request_info->register_addr_type = (guint8)global_mbus_tcp_register_addr_type; request_info->register_format = (guint8)global_mbus_tcp_register_format; - p_add_proto_data(pinfo->fd, proto_modbus, request_info); + p_add_proto_data(pinfo->fd, proto_modbus, 0, request_info); /* Continue with dissection of Modbus data payload following Modbus/TCP frame */ if( tvb_length_remaining(tvb, offset) > 0 ) call_dissector(modbus_handle, next_tvb, pinfo, tree); - p_remove_proto_data(pinfo->fd, proto_modbus); - p_add_proto_data(pinfo->fd, proto_modbus, p_save_proto_data); + p_remove_proto_data(pinfo->fd, proto_modbus, 0); + p_add_proto_data(pinfo->fd, proto_modbus, 0, p_save_proto_data); } /* Code to dissect Modbus RTU over TCP packets */ @@ -597,22 +597,22 @@ dissect_mbrtu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_subset( tvb, offset+1, len-1, len-1); /* keep existing context */ - p_save_proto_data = p_get_proto_data( pinfo->fd, proto_modbus ); - p_remove_proto_data(pinfo->fd, proto_modbus); + p_save_proto_data = p_get_proto_data( pinfo->fd, proto_modbus, 0 ); + p_remove_proto_data(pinfo->fd, proto_modbus, 0); /* Create enough context for Modbus dissector */ request_info = ep_new(modbus_request_info_t); request_info->packet_type = (guint8)packet_type; request_info->register_addr_type = (guint8)global_mbus_rtu_register_addr_type; request_info->register_format = (guint8)global_mbus_rtu_register_format; - p_add_proto_data(pinfo->fd, proto_modbus, request_info); + p_add_proto_data(pinfo->fd, proto_modbus, 0, request_info); /* Continue with dissection of Modbus data payload following Modbus/TCP frame */ if( tvb_length_remaining(tvb, offset) > 0 ) call_dissector(modbus_handle, next_tvb, pinfo, tree); - p_remove_proto_data(pinfo->fd, proto_modbus); - p_add_proto_data(pinfo->fd, proto_modbus, p_save_proto_data); + p_remove_proto_data(pinfo->fd, proto_modbus, 0); + p_add_proto_data(pinfo->fd, proto_modbus, 0, p_save_proto_data); } @@ -840,7 +840,7 @@ dissect_modbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ } /* See if we have any context */ - request_info = (modbus_request_info_t *)p_get_proto_data( pinfo->fd, proto_modbus ); + request_info = (modbus_request_info_t *)p_get_proto_data( pinfo->fd, proto_modbus, 0 ); if (request_info != NULL) { packet_type = request_info->packet_type; diff --git a/epan/dissectors/packet-meta.c b/epan/dissectors/packet-meta.c index 4ca6b5521f..cd7b11d8e8 100644 --- a/epan/dissectors/packet-meta.c +++ b/epan/dissectors/packet-meta.c @@ -400,10 +400,10 @@ static guint16 evaluate_meta_item_dxt(proto_tree *meta_tree, tvbuff_t *tvb, pack break; case META_ID_AAL5PROTO: aal5proto = tvb_get_guint8(tvb, offs); - p_sscop_info = (sscop_payload_info *)p_get_proto_data(pinfo->fd, proto_sscop); + p_sscop_info = (sscop_payload_info *)p_get_proto_data(pinfo->fd, proto_sscop, 0); if (!p_sscop_info) { p_sscop_info = se_new0(sscop_payload_info); - p_add_proto_data(pinfo->fd, proto_sscop, p_sscop_info); + p_add_proto_data(pinfo->fd, proto_sscop, 0, p_sscop_info); } switch (aal5proto) { case META_AAL5PROTO_MTP3: @@ -426,7 +426,7 @@ static guint16 evaluate_meta_item_dxt(proto_tree *meta_tree, tvbuff_t *tvb, pack /* TODO: check for additional protos on Iu 802 LLC/SNAP ... */ default: /* TODO: add warning */ - p_remove_proto_data(pinfo->fd, proto_sscop); + p_remove_proto_data(pinfo->fd, proto_sscop, 0); } proto_tree_add_uint(meta_tree, hf_meta_item_aal5proto, tvb, offs, 1, aal5proto); diff --git a/epan/dissectors/packet-mikey.c b/epan/dissectors/packet-mikey.c index 54d0faa060..ed54705349 100644 --- a/epan/dissectors/packet-mikey.c +++ b/epan/dissectors/packet-mikey.c @@ -1352,12 +1352,12 @@ dissect_mikey(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U int payload; mikey_t *mikey; - mikey = (mikey_t *)p_get_proto_data(pinfo->fd, proto_mikey); + mikey = (mikey_t *)p_get_proto_data(pinfo->fd, proto_mikey, 0); if (!mikey) { mikey = se_new0(mikey_t); mikey->type = -1; - p_add_proto_data(pinfo->fd, proto_mikey, mikey); + p_add_proto_data(pinfo->fd, proto_mikey, 0, mikey); } diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c index eefed9cbc3..d7eac8424b 100644 --- a/epan/dissectors/packet-mp2t.c +++ b/epan/dissectors/packet-mp2t.c @@ -634,11 +634,11 @@ mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len, frag_tot_len = pid_analysis->frag_tot_len; fragmentation = pid_analysis->fragmentation; frag_id = pid_analysis->frag_id; - pdata = (packed_analysis_data_t *)p_get_proto_data(pinfo->fd, proto_mp2t); + pdata = (packed_analysis_data_t *)p_get_proto_data(pinfo->fd, proto_mp2t, 0); if (!pdata) { pdata = se_new0(packed_analysis_data_t); pdata->subpacket_table = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "mp2t_frame_table"); - p_add_proto_data(pinfo->fd, proto_mp2t, pdata); + p_add_proto_data(pinfo->fd, proto_mp2t, 0, pdata); } else { spdata = (subpacket_analysis_data_t *)se_tree_lookup32(pdata->subpacket_table, offset); @@ -657,7 +657,7 @@ mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len, } else { /* Get saved values */ - pdata = (packed_analysis_data_t *)p_get_proto_data(pinfo->fd, proto_mp2t); + pdata = (packed_analysis_data_t *)p_get_proto_data(pinfo->fd, proto_mp2t, 0); if (!pdata) { /* Occurs for the first packets in the capture which cannot be reassembled */ return; diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c index 7aaef8a539..3ee92feb48 100644 --- a/epan/dissectors/packet-msrp.c +++ b/epan/dissectors/packet-msrp.c @@ -222,7 +222,7 @@ show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) struct _msrp_conversation_info *p_conv_data = NULL; /* Use existing packet data if available */ - p_conv_data = (struct _msrp_conversation_info *)p_get_proto_data(pinfo->fd, proto_msrp); + p_conv_data = (struct _msrp_conversation_info *)p_get_proto_data(pinfo->fd, proto_msrp, 0); if (!p_conv_data) { @@ -243,7 +243,7 @@ show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) p_conv_packet_data = (struct _msrp_conversation_info *)se_memdup(p_conv_data, sizeof(struct _msrp_conversation_info)); - p_add_proto_data(pinfo->fd, proto_msrp, p_conv_packet_data); + p_add_proto_data(pinfo->fd, proto_msrp, 0, p_conv_packet_data); } } } diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c index 6fee79a4a2..d87efe9fba 100644 --- a/epan/dissectors/packet-mysql.c +++ b/epan/dissectors/packet-mysql.c @@ -718,7 +718,7 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) conversation_add_proto_data(conversation, proto_mysql, conn_data); } - mysql_frame_data_p = (struct mysql_frame_data *)p_get_proto_data(pinfo->fd, proto_mysql); + mysql_frame_data_p = (struct mysql_frame_data *)p_get_proto_data(pinfo->fd, proto_mysql, 0); if (!mysql_frame_data_p) { /* We haven't seen this frame before. Store the state of the * conversation now so if/when we dissect the frame again @@ -726,7 +726,7 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ mysql_frame_data_p = se_new(struct mysql_frame_data); mysql_frame_data_p->state = conn_data->state; - p_add_proto_data(pinfo->fd, proto_mysql, mysql_frame_data_p); + p_add_proto_data(pinfo->fd, proto_mysql, 0, mysql_frame_data_p); } else if (conn_data->state != FIELD_PACKET && conn_data->state != ROW_PACKET ) { /* We have seen this frame before. Set the connection state diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc index be08cc62d1..0cf794c2ba 100644 --- a/epan/dissectors/packet-ncp2222.inc +++ b/epan/dissectors/packet-ncp2222.inc @@ -7149,7 +7149,7 @@ nds_defrag(tvbuff_t *tvb, packet_info *pinfo, guint32 nw_connection, guint8 sequ dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap); return; } - p_add_proto_data(pinfo->fd, proto_ncp, (void*) request_value); + p_add_proto_data(pinfo->fd, proto_ncp, 0, (void*) request_value); } /* else... we haven't seen an NCP Request for that conversation and sequence. */ else @@ -7159,7 +7159,7 @@ nds_defrag(tvbuff_t *tvb, packet_info *pinfo, guint32 nw_connection, guint8 sequ } } else { - request_value = (ncp_req_hash_value *)p_get_proto_data(pinfo->fd, proto_ncp); + request_value = (ncp_req_hash_value *)p_get_proto_data(pinfo->fd, proto_ncp, 0); if (!request_value) { dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap); return; @@ -8886,7 +8886,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, if (request_value) { ncp_rec = request_value->ncp_rec; } - p_add_proto_data(pinfo->fd, proto_ncp, (void*) request_value); + p_add_proto_data(pinfo->fd, proto_ncp, 0, (void*) request_value); } /* else... we haven't seen an NCP Request for that conversation and sequence. @@ -8907,7 +8907,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, if (request_value) { ncp_rec = request_value->ncp_rec; } - p_add_proto_data(pinfo->fd, proto_ncp, + p_add_proto_data(pinfo->fd, proto_ncp, 0, (void*) request_value); } else { @@ -8921,7 +8921,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, if (request_value) { ncp_rec = request_value->ncp_rec; } - p_add_proto_data(pinfo->fd, proto_ncp, + p_add_proto_data(pinfo->fd, proto_ncp, 0, (void*) request_value); } /* else... we haven't seen an NCP Request for that diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index 070c38ee2b..73c6658a7f 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -4365,12 +4365,12 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport); } /* Add it to pinfo so we can get it on further dissection requests */ - p_add_proto_data(pinfo->fd, proto_ndps, (void*) request_value); + p_add_proto_data(pinfo->fd, proto_ndps, 0, (void*) request_value); } else { /* Get request value data */ - request_value = (ndps_req_hash_value *)p_get_proto_data(pinfo->fd, proto_ndps); + request_value = (ndps_req_hash_value *)p_get_proto_data(pinfo->fd, proto_ndps, 0); } if (!request_value) { @@ -6983,12 +6983,12 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int /* find the record telling us the request made that caused this reply */ request_value = ndps_hash_lookup(conversation, (guint32) pinfo->destport); - p_add_proto_data(pinfo->fd, proto_ndps, (void*) request_value); + p_add_proto_data(pinfo->fd, proto_ndps, 0, (void*) request_value); } /* else... we haven't seen an NDPS Request for that conversation. */ } else { - request_value = (ndps_req_hash_value *)p_get_proto_data(pinfo->fd, proto_ndps); + request_value = (ndps_req_hash_value *)p_get_proto_data(pinfo->fd, proto_ndps, 0); } if (request_value) { ndps_prog = request_value->ndps_prog; diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c index 9fc15a6a90..baa54f7ea3 100644 --- a/epan/dissectors/packet-ntlmssp.c +++ b/epan/dissectors/packet-ntlmssp.c @@ -1631,7 +1631,7 @@ dissect_ntlmssp_auth (tvbuff_t *tvb, packet_info *pinfo, int offset, * - has the AUTHENTICATE message in a second TCP connection; * (The authentication aparently succeeded). */ - conv_ntlmssp_info = (ntlmssp_info *)p_get_proto_data(pinfo->fd, proto_ntlmssp); + conv_ntlmssp_info = (ntlmssp_info *)p_get_proto_data(pinfo->fd, proto_ntlmssp, 0); if (conv_ntlmssp_info == NULL) { /* * There isn't any. Is there any from this conversation? If so, @@ -1650,7 +1650,7 @@ dissect_ntlmssp_auth (tvbuff_t *tvb, packet_info *pinfo, int offset, /* XXX: The *conv_ntlmssp_info struct attached to the frame is the same as the one attached to the conversation. That is: *both* point to the exact same struct in memory. Is this what is indended ? */ - p_add_proto_data(pinfo->fd, proto_ntlmssp, conv_ntlmssp_info); + p_add_proto_data(pinfo->fd, proto_ntlmssp, 0, conv_ntlmssp_info); } if (conv_ntlmssp_info != NULL) { @@ -1999,11 +1999,11 @@ decrypt_data_payload(tvbuff_t *tvb, int offset, guint32 encrypted_block_length, ntlmssp_packet_info *stored_packet_ntlmssp_info = NULL; /* Check to see if we already have state for this packet */ - packet_ntlmssp_info = (ntlmssp_packet_info *)p_get_proto_data(pinfo->fd, proto_ntlmssp); + packet_ntlmssp_info = (ntlmssp_packet_info *)p_get_proto_data(pinfo->fd, proto_ntlmssp, 0); if (packet_ntlmssp_info == NULL) { /* We don't have any packet state, so create one */ packet_ntlmssp_info = se_new0(ntlmssp_packet_info); - p_add_proto_data(pinfo->fd, proto_ntlmssp, packet_ntlmssp_info); + p_add_proto_data(pinfo->fd, proto_ntlmssp, 0, packet_ntlmssp_info); } if (!packet_ntlmssp_info->payload_decrypted) { conversation_t *conversation; @@ -2223,7 +2223,7 @@ decrypt_verifier(tvbuff_t *tvb, int offset, guint32 encrypted_block_length, int sequence = 0; ntlmssp_packet_info *stored_packet_ntlmssp_info = NULL; - packet_ntlmssp_info = (ntlmssp_packet_info *)p_get_proto_data(pinfo->fd, proto_ntlmssp); + packet_ntlmssp_info = (ntlmssp_packet_info *)p_get_proto_data(pinfo->fd, proto_ntlmssp, 0); if (packet_ntlmssp_info == NULL) { /* We don't have data for this packet */ return; diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c index 342f89d418..867b716325 100644 --- a/epan/dissectors/packet-ositp.c +++ b/epan/dissectors/packet-ositp.c @@ -991,12 +991,12 @@ static int ositp_decode_DT(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, else fragment = TRUE; is_extended = FALSE; - prev_dst_ref = (guint32 *)p_get_proto_data (pinfo->fd, proto_clnp); + prev_dst_ref = (guint32 *)p_get_proto_data (pinfo->fd, proto_clnp, 0); if (!prev_dst_ref) { /* First COTP in frame - save previous dst_ref as offset */ prev_dst_ref = se_new(guint32); *prev_dst_ref = cotp_dst_ref; - p_add_proto_data (pinfo->fd, proto_clnp, prev_dst_ref); + p_add_proto_data (pinfo->fd, proto_clnp, 0, prev_dst_ref); } else if (cotp_frame_reset) { cotp_dst_ref = *prev_dst_ref; } diff --git a/epan/dissectors/packet-p_mul.c b/epan/dissectors/packet-p_mul.c index 671fab3627..6059973084 100644 --- a/epan/dissectors/packet-p_mul.c +++ b/epan/dissectors/packet-p_mul.c @@ -423,12 +423,12 @@ static p_mul_seq_val *register_p_mul_id (packet_info *pinfo, address *addr, guin } } - pkg_list = (GHashTable *)p_get_proto_data(pinfo->fd, proto_p_mul); + pkg_list = (GHashTable *)p_get_proto_data(pinfo->fd, proto_p_mul, 0); if (!pkg_list) { /* Never saved list for this packet, create a new */ pkg_list = g_hash_table_new (NULL, NULL); p_mul_package_data_list = g_list_append (p_mul_package_data_list, pkg_list); - p_add_proto_data (pinfo->fd, proto_p_mul, pkg_list); + p_add_proto_data (pinfo->fd, proto_p_mul, 0, pkg_list); } if (!pinfo->fd->flags.visited) { diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index 26fbeffd03..770b51fcd0 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -877,7 +877,7 @@ static gboolean dissect_pdcp_lte_heur(tvbuff_t *tvb, packet_info *pinfo, /* If redissecting, use previous info struct (if available) */ - p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte); + p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte, 0); if (p_pdcp_lte_info == NULL) { /* Allocate new info struct for this frame */ p_pdcp_lte_info = se_new0(pdcp_lte_info); @@ -961,7 +961,7 @@ static gboolean dissect_pdcp_lte_heur(tvbuff_t *tvb, packet_info *pinfo, if (!infoAlreadySet) { /* Store info in packet */ - p_add_proto_data(pinfo->fd, proto_pdcp_lte, p_pdcp_lte_info); + p_add_proto_data(pinfo->fd, proto_pdcp_lte, 0, p_pdcp_lte_info); } /**************************************/ @@ -991,7 +991,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree col_set_str(pinfo->cinfo, COL_PROTOCOL, "PDCP-LTE"); /* Look for attached packet info! */ - p_pdcp_info = (struct pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte); + p_pdcp_info = (struct pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte, 0); /* Can't dissect anything without it... */ if (p_pdcp_info == NULL) { return; @@ -999,7 +999,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* Don't want to overwrite the RLC Info column if configured not to */ if ((global_pdcp_lte_layer_to_show == ShowRLCLayer) && - (p_get_proto_data(pinfo->fd, proto_rlc_lte) != NULL)) { + (p_get_proto_data(pinfo->fd, proto_rlc_lte, 0) != NULL)) { col_set_writable(pinfo->cinfo, FALSE); } @@ -1265,13 +1265,13 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree case FALSE: break; case SEQUENCE_ANALYSIS_RLC_ONLY: - if ((p_get_proto_data(pinfo->fd, proto_rlc_lte) != NULL) && + if ((p_get_proto_data(pinfo->fd, proto_rlc_lte, 0) != NULL) && !p_pdcp_info->is_retx) { do_analysis = TRUE; } break; case SEQUENCE_ANALYSIS_PDCP_ONLY: - if (p_get_proto_data(pinfo->fd, proto_rlc_lte) == NULL) { + if (p_get_proto_data(pinfo->fd, proto_rlc_lte, 0) == NULL) { do_analysis = TRUE; } break; diff --git a/epan/dissectors/packet-pop.c b/epan/dissectors/packet-pop.c index fea778027d..6dc722e5ea 100644 --- a/epan/dissectors/packet-pop.c +++ b/epan/dissectors/packet-pop.c @@ -142,7 +142,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "POP"); - frame_data_p = (struct pop_proto_data *)p_get_proto_data(pinfo->fd, proto_pop); + frame_data_p = (struct pop_proto_data *)p_get_proto_data(pinfo->fd, proto_pop, 0); conversation = find_or_create_conversation(pinfo); data_val = (struct pop_data_val *)conversation_get_proto_data(conversation, proto_pop); @@ -227,7 +227,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) frame_data_p->conversation_id = conversation->index; frame_data_p->more_frags = data_val->msg_read_len < data_val->msg_tot_len; - p_add_proto_data(pinfo->fd, proto_pop, frame_data_p); + p_add_proto_data(pinfo->fd, proto_pop, 0, frame_data_p); } frag_msg = fragment_add_seq_next(&pop_data_reassembly_table, tvb, 0, diff --git a/epan/dissectors/packet-rdt.c b/epan/dissectors/packet-rdt.c index 6d6a20cbdb..50e3f88e5f 100644 --- a/epan/dissectors/packet-rdt.c +++ b/epan/dissectors/packet-rdt.c @@ -1233,7 +1233,7 @@ static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) struct _rdt_conversation_info *p_conv_data; /* Use existing packet info if available */ - p_conv_data = (struct _rdt_conversation_info *)p_get_proto_data(pinfo->fd, proto_rdt); + p_conv_data = (struct _rdt_conversation_info *)p_get_proto_data(pinfo->fd, proto_rdt, 0); if (!p_conv_data) { @@ -1254,7 +1254,7 @@ static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) g_strlcpy(p_conv_packet_data->method, p_conv_data->method, MAX_RDT_SETUP_METHOD_SIZE); p_conv_packet_data->frame_number = p_conv_data->frame_number; p_conv_packet_data->feature_level = p_conv_data->feature_level; - p_add_proto_data(pinfo->fd, proto_rdt, p_conv_packet_data); + p_add_proto_data(pinfo->fd, proto_rdt, 0, p_conv_packet_data); } } } diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c index 0700699bfe..8998bf3ce8 100644 --- a/epan/dissectors/packet-rlc-lte.c +++ b/epan/dissectors/packet-rlc-lte.c @@ -763,11 +763,11 @@ static void show_PDU_in_tree(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb } /* Reuse or allocate struct */ - p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte); + p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte, 0); if (p_pdcp_lte_info == NULL) { p_pdcp_lte_info = se_new0(pdcp_lte_info); /* Store info in packet */ - p_add_proto_data(pinfo->fd, proto_pdcp_lte, p_pdcp_lte_info); + p_add_proto_data(pinfo->fd, proto_pdcp_lte, 0, p_pdcp_lte_info); } p_pdcp_lte_info->ueid = rlc_info->ueid; @@ -2117,9 +2117,9 @@ static void dissect_rlc_lte_um(tvbuff_t *tvb, packet_info *pinfo, /* Call sequence analysis function now */ if (((global_rlc_lte_um_sequence_analysis == SEQUENCE_ANALYSIS_MAC_ONLY) && - (p_get_proto_data(pinfo->fd, proto_mac_lte) != NULL)) || + (p_get_proto_data(pinfo->fd, proto_mac_lte, 0) != NULL)) || ((global_rlc_lte_um_sequence_analysis == SEQUENCE_ANALYSIS_RLC_ONLY) && - (p_get_proto_data(pinfo->fd, proto_mac_lte) == NULL))) { + (p_get_proto_data(pinfo->fd, proto_mac_lte, 0) == NULL))) { guint16 lastSegmentOffset = offset; if (s_number_of_extensions >= 1) { @@ -2338,9 +2338,9 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb, /* Repeated NACK analysis & check ACK-SN is in range */ if (((global_rlc_lte_am_sequence_analysis == SEQUENCE_ANALYSIS_MAC_ONLY) && - (p_get_proto_data(pinfo->fd, proto_mac_lte) != NULL)) || + (p_get_proto_data(pinfo->fd, proto_mac_lte, 0) != NULL)) || ((global_rlc_lte_am_sequence_analysis == SEQUENCE_ANALYSIS_RLC_ONLY) && - (p_get_proto_data(pinfo->fd, proto_mac_lte) == NULL))) { + (p_get_proto_data(pinfo->fd, proto_mac_lte, 0) == NULL))) { if (!is_mac_lte_frame_retx(pinfo, p_rlc_lte_info->direction)) { checkChannelRepeatedNACKInfo(pinfo, p_rlc_lte_info, tap_info, tree, tvb); @@ -2506,9 +2506,9 @@ static void dissect_rlc_lte_am(tvbuff_t *tvb, packet_info *pinfo, /* Call sequence analysis function now */ if (((global_rlc_lte_am_sequence_analysis == SEQUENCE_ANALYSIS_MAC_ONLY) && - (p_get_proto_data(pinfo->fd, proto_mac_lte) != NULL)) || + (p_get_proto_data(pinfo->fd, proto_mac_lte, 0) != NULL)) || ((global_rlc_lte_am_sequence_analysis == SEQUENCE_ANALYSIS_RLC_ONLY) && - (p_get_proto_data(pinfo->fd, proto_mac_lte) == NULL))) { + (p_get_proto_data(pinfo->fd, proto_mac_lte, 0) == NULL))) { guint16 firstSegmentLength; guint16 lastSegmentOffset = offset; @@ -2622,7 +2622,7 @@ static gboolean dissect_rlc_lte_heur(tvbuff_t *tvb, packet_info *pinfo, /* If redissecting, use previous info struct (if available) */ - p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte); + p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte, 0); if (p_rlc_lte_info == NULL) { /* Allocate new info struct for this frame */ p_rlc_lte_info = se_new0(struct rlc_lte_info); @@ -2685,7 +2685,7 @@ static gboolean dissect_rlc_lte_heur(tvbuff_t *tvb, packet_info *pinfo, if (!infoAlreadySet) { /* Store info in packet */ - p_add_proto_data(pinfo->fd, proto_rlc_lte, p_rlc_lte_info); + p_add_proto_data(pinfo->fd, proto_rlc_lte, 0, p_rlc_lte_info); } /**************************************/ @@ -2726,7 +2726,7 @@ static void dissect_rlc_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Look for packet info! */ - p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte); + p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte, 0); /* Can't dissect anything without it... */ if (p_rlc_lte_info == NULL) { @@ -2828,7 +2828,7 @@ static void dissect_rlc_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tap_info->channelId = p_rlc_lte_info->channelId; tap_info->pduLength = p_rlc_lte_info->pduLength; tap_info->UMSequenceNumberLength = p_rlc_lte_info->UMSequenceNumberLength; - tap_info->loggedInMACFrame = (p_get_proto_data(pinfo->fd, proto_mac_lte) != NULL); + tap_info->loggedInMACFrame = (p_get_proto_data(pinfo->fd, proto_mac_lte, 0) != NULL); tap_info->time = pinfo->fd->abs_ts; diff --git a/epan/dissectors/packet-rlc.c b/epan/dissectors/packet-rlc.c index 3b4359c552..369cf9e18a 100644 --- a/epan/dissectors/packet-rlc.c +++ b/epan/dissectors/packet-rlc.c @@ -339,8 +339,8 @@ rlc_channel_assign(struct rlc_channel *ch, enum rlc_mode mode, packet_info *pinf fp_info *fpinf; atm = &pinfo->pseudo_header->atm; - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (!fpinf || !rlcinf) return -1; if (rlcinf->urnti[fpinf->cur_tb]) { @@ -1308,11 +1308,11 @@ rlc_call_subdissector(enum rlc_channel_type channel, tvbuff_t *tvb, if (msgtype != RRC_MESSAGE_TYPE_INVALID) { struct rrc_info *rrcinf; fp_info *fpinf; - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rrcinf = (rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rrcinf = (rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc, 0); if (!rrcinf) { rrcinf = (rrc_info *)se_alloc0(sizeof(struct rrc_info)); - p_add_proto_data(pinfo->fd, proto_rrc, rrcinf); + p_add_proto_data(pinfo->fd, proto_rrc, 0, rrcinf); } rrcinf->msgtype[fpinf->cur_tb] = msgtype; call_dissector(rrc_handle, tvb, pinfo, tree); @@ -1574,8 +1574,8 @@ dissect_rlc_tm(enum rlc_channel_type channel, tvbuff_t *tvb, packet_info *pinfo, fp_info *fpinf; rlc_info *rlcinf; - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (tree) { if (fpinf && rlcinf) { @@ -1830,8 +1830,8 @@ dissect_rlc_um(enum rlc_channel_type channel, tvbuff_t *tvb, packet_info *pinfo, next_byte = tvb_get_guint8(tvb, offs++); seq = next_byte >> 1; - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (tree) { if (fpinf && rlcinf) { @@ -2245,8 +2245,8 @@ dissect_rlc_am(enum rlc_channel_type channel, tvbuff_t *tvb, packet_info *pinfo, proto_item *truncated_ti; guint64 polling; - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); next_byte = tvb_get_guint8(tvb, offs++); dc = next_byte >> 7; @@ -2383,7 +2383,7 @@ dissect_rlc_bcch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "RLC"); col_clear(pinfo->cinfo, COL_INFO); - fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); if (!fpi) return; /* dissection failure */ if (tree) { @@ -2404,7 +2404,7 @@ dissect_rlc_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "RLC"); col_clear(pinfo->cinfo, COL_INFO); - fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); if (!fpi) return; /* dissection failure */ if (tree) { @@ -2434,7 +2434,7 @@ dissect_rlc_ctch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "RLC"); col_clear(pinfo->cinfo, COL_INFO); - fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); if (!fpi) return; /* dissection failure */ if (tree) { @@ -2459,8 +2459,8 @@ dissect_rlc_dcch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "RLC"); col_clear(pinfo->cinfo, COL_INFO); - fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (!fpi || !rlci){ ti = proto_tree_add_text(tree, tvb, 0, -1, @@ -2499,8 +2499,8 @@ dissect_rlc_ps_dtch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "RLC"); col_clear(pinfo->cinfo, COL_INFO); - fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (!fpi || !rlci) { ti = proto_tree_add_text(tree, tvb, 0, -1, @@ -2541,8 +2541,8 @@ dissect_rlc_dch_unknown(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "RLC"); col_clear(pinfo->cinfo, COL_INFO); - fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (!fpi || !rlci) return; @@ -2611,14 +2611,14 @@ dissect_rlc_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data offset += (gint)strlen(RLC_START_STRING); /* If redissecting, use previous info struct (if available) */ - fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + fpi = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); if (fpi == NULL) { /* Allocate new info struct for this frame */ fpi = (fp_info *)se_alloc0(sizeof(fp_info)); } else { fpInfoAlreadySet = TRUE; } - rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (rlci == NULL) { /* Allocate new info struct for this frame */ rlci = (rlc_info *)se_alloc0(sizeof(rlc_info)); @@ -2679,10 +2679,10 @@ dissect_rlc_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data /* Store info in packet if needed */ if (!fpInfoAlreadySet) { - p_add_proto_data(pinfo->fd, proto_fp, fpi); + p_add_proto_data(pinfo->fd, proto_fp, 0, fpi); } if (!rlcInfoAlreadySet) { - p_add_proto_data(pinfo->fd, proto_rlc, rlci); + p_add_proto_data(pinfo->fd, proto_rlc, 0, rlci); } /**************************************/ @@ -2747,8 +2747,8 @@ rlc_is_ciphered(packet_info * pinfo){ return global_rlc_ciphered; } - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); return ((rlcinf && fpinf && (rlcinf->ciphered[fpinf->cur_tb] == TRUE) && (rlcinf->deciphered[fpinf->cur_tb] == FALSE)) || global_rlc_ciphered); diff --git a/epan/dissectors/packet-rohc.c b/epan/dissectors/packet-rohc.c index 4b66701e9d..625d6c05a8 100644 --- a/epan/dissectors/packet-rohc.c +++ b/epan/dissectors/packet-rohc.c @@ -843,10 +843,10 @@ dissect_rohc_feedback_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, if (!pinfo->fd->flags.visited){ rohc_cid_context = (rohc_cid_context_t*)g_hash_table_lookup(rohc_cid_hash, GUINT_TO_POINTER(key)); if(rohc_cid_context){ - p_add_proto_data(pinfo->fd, proto_rohc, rohc_cid_context); + p_add_proto_data(pinfo->fd, proto_rohc, 0, rohc_cid_context); } }else{ - rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc); + rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc, 0); } if(!rohc_cid_context){ @@ -1858,7 +1858,7 @@ dissect_rohc_ir_packet(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, rohc_cid_context->large_cid_present = p_rohc_info->large_cid_present; g_hash_table_replace(rohc_cid_hash, GUINT_TO_POINTER(key), rohc_cid_context); - p_add_proto_data(pinfo->fd, proto_rohc, rohc_cid_context); + p_add_proto_data(pinfo->fd, proto_rohc, 0, rohc_cid_context); }else{ rohc_cid_context = se_new(rohc_cid_context_t); rohc_cid_context->large_cid_present = p_rohc_info->large_cid_present; @@ -1875,11 +1875,11 @@ dissect_rohc_ir_packet(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, /*g_warning("IR pkt New CID %u",cid);*/ g_hash_table_insert(rohc_cid_hash, GUINT_TO_POINTER(key), rohc_cid_context); - p_add_proto_data(pinfo->fd, proto_rohc, rohc_cid_context); + p_add_proto_data(pinfo->fd, proto_rohc, 0, rohc_cid_context); } }else{ /* get the stored data */ - rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc); + rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc, 0); } switch(profile){ @@ -1980,7 +1980,7 @@ dissect_rohc_ir_dyn_packet(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, rohc_cid_context->large_cid_present = p_rohc_info->large_cid_present; g_hash_table_replace(rohc_cid_hash, GUINT_TO_POINTER(key), rohc_cid_context); - p_add_proto_data(pinfo->fd, proto_rohc, rohc_cid_context); + p_add_proto_data(pinfo->fd, proto_rohc, 0, rohc_cid_context); }else{ rohc_cid_context = se_new(rohc_cid_context_t); /*rohc_cid_context->rohc_ip_version;*/ @@ -1997,11 +1997,11 @@ dissect_rohc_ir_dyn_packet(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, /*g_warning("IR pkt New CID %u",cid);*/ g_hash_table_insert(rohc_cid_hash, GUINT_TO_POINTER(key), rohc_cid_context); - p_add_proto_data(pinfo->fd, proto_rohc, rohc_cid_context); + p_add_proto_data(pinfo->fd, proto_rohc, 0, rohc_cid_context); } }else{ /* get the stored data */ - rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc); + rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc, 0); } proto_tree_add_item(ir_tree, hf_rohc_crc, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -2074,7 +2074,7 @@ dissect_rohc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) item = proto_tree_add_text(rohc_tree, tvb, offset, 0, "Global Configuration: (%s)", p_rohc_info->large_cid_present ? "Large CID" : "Small CID"); conf_tree = proto_item_add_subtree(item, ett_rohc_conf); PROTO_ITEM_SET_GENERATED(item); - rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc); + rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc, 0); if(rohc_cid_context){ /* Do we have info from an IR frame? */ if(rohc_cid_context->ir_frame_number>0){ @@ -2266,9 +2266,9 @@ start_over: rohc_cid_context->ir_frame_number = -1; /*g_warning("Store dummy data %u",cid);*/ } - p_add_proto_data(pinfo->fd, proto_rohc, rohc_cid_context); + p_add_proto_data(pinfo->fd, proto_rohc, 0, rohc_cid_context); } else { - rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc); + rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc, 0); } /* Call IP for uncompressed*/ diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c index 16590dff06..e21677f0c0 100644 --- a/epan/dissectors/packet-rrc.c +++ b/epan/dissectors/packet-rrc.c @@ -16409,7 +16409,7 @@ dissect_rrc_RB_ActivationTimeInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t - fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp); + fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp, 0); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_RB_ActivationTimeInfo, RB_ActivationTimeInfo_sequence); @@ -20492,10 +20492,10 @@ dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot #line 788 "../../asn1/rrc/rrc.cnf" - rrcinf = (struct rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc); + rrcinf = (struct rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0); if (!rrcinf) { rrcinf = se_new0(struct rrc_info); - p_add_proto_data(actx->pinfo->fd, proto_rrc, rrcinf); + p_add_proto_data(actx->pinfo->fd, proto_rrc, 0, rrcinf); } rrcinf->hrnti[actx->pinfo->fd->subnum] = tvb_get_ntohs(hrnti_tvb, 0); @@ -41379,7 +41379,7 @@ dissect_rrc_DL_TransportChannelType_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_c num_chans_per_flow[flowd]++; if(num_chans_per_flow[flowd] > 1 ){ - rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc); + rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0); if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){ expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI"); } @@ -44854,7 +44854,7 @@ dissect_rrc_DL_TransportChannelType_r7(tvbuff_t *tvb _U_, int offset _U_, asn1_c if(num_chans_per_flow[flowd] > 1 ){ - rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc); + rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0); if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){ expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI"); } @@ -87497,7 +87497,7 @@ dissect_rrc_START_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, /*We base this map on communication context from fp*/ - fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp); + fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp, 0); /*If no info found, skip all this*/ if(fpinf == NULL){ @@ -97667,7 +97667,7 @@ fp_info *fpinf ; ett_rrc_SecurityModeComplete, SecurityModeComplete_sequence); - fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp); + fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp, 0); if(fpinf && ((c_inf = (rrc_ciphering_info *)g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) != NULL) ){ c_inf->setup_frame = actx->pinfo->fd->num; } @@ -143325,7 +143325,7 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) struct rrc_info *rrcinf; top_tree = tree; - rrcinf = (struct rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc); + rrcinf = (struct rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc, 0); /* make entry in the Protocol column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC"); diff --git a/epan/dissectors/packet-rsync.c b/epan/dissectors/packet-rsync.c index fe29c28475..c4a4d76c1c 100644 --- a/epan/dissectors/packet-rsync.c +++ b/epan/dissectors/packet-rsync.c @@ -116,12 +116,12 @@ dissect_rsync_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rsync_tree = proto_item_add_subtree(ti, ett_rsync); - rsync_frame_data_p = (struct rsync_frame_data *)p_get_proto_data(pinfo->fd, proto_rsync); + rsync_frame_data_p = (struct rsync_frame_data *)p_get_proto_data(pinfo->fd, proto_rsync, 0); if (!rsync_frame_data_p) { /* then we haven't seen this frame before */ rsync_frame_data_p = se_new(struct rsync_frame_data); rsync_frame_data_p->state = conversation_data->state; - p_add_proto_data(pinfo->fd, proto_rsync, rsync_frame_data_p); + p_add_proto_data(pinfo->fd, proto_rsync, 0, rsync_frame_data_p); } switch (rsync_frame_data_p->state) { diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 71e2c6a189..e3054cc5ef 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -2509,7 +2509,7 @@ void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) struct _rtcp_conversation_info *p_conv_data; /* Use existing packet data if available */ - p_conv_data = (struct _rtcp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtcp); + p_conv_data = (struct _rtcp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtcp, 0); if (!p_conv_data) { @@ -2531,7 +2531,7 @@ void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) p_conv_packet_data = (struct _rtcp_conversation_info *)se_memdup(p_conv_data, sizeof(struct _rtcp_conversation_info)); - p_add_proto_data(pinfo->fd, proto_rtcp, p_conv_packet_data); + p_add_proto_data(pinfo->fd, proto_rtcp, 0, p_conv_packet_data); } } } @@ -2578,7 +2578,7 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr) /* First of all, see if we've already stored this information for this sr */ /* Look first in packet info */ - p_packet_data = (struct _rtcp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtcp); + p_packet_data = (struct _rtcp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtcp, 0); if (p_packet_data && p_packet_data->last_received_set && (p_packet_data->last_received_frame_number >= pinfo->fd->num)) { @@ -2639,7 +2639,7 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr) { p_packet_data = se_new0(struct _rtcp_conversation_info); - p_add_proto_data(pinfo->fd, proto_rtcp, p_packet_data); + p_add_proto_data(pinfo->fd, proto_rtcp, 0, p_packet_data); } /* Copy current conversation data into packet info */ @@ -2670,7 +2670,7 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo, /*************************************************/ /* Look for previous result */ - p_packet_data = (struct _rtcp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtcp); + p_packet_data = (struct _rtcp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtcp, 0); if (p_packet_data && p_packet_data->lsr_matched) { /* Show info. */ @@ -2709,7 +2709,7 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo, p_packet_data = se_new0(struct _rtcp_conversation_info); /* Set as packet info */ - p_add_proto_data(pinfo->fd, proto_rtcp, p_packet_data); + p_add_proto_data(pinfo->fd, proto_rtcp, 0, p_packet_data); } /* Don't allow match seemingly calculated from same (or later!) frame */ diff --git a/epan/dissectors/packet-rtp-events.c b/epan/dissectors/packet-rtp-events.c index 4823bfc08c..70b8d7b583 100644 --- a/epan/dissectors/packet-rtp-events.c +++ b/epan/dissectors/packet-rtp-events.c @@ -99,7 +99,7 @@ dissect_rtp_events( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) /* get tap info */ rtp_event_info.info_rtp_evt = rtp_evt; - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_get_id_by_filter_name("rtp")); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_get_id_by_filter_name("rtp"), 0); if (p_conv_data) rtp_event_info.info_setup_frame_num = p_conv_data->frame_number; else diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index 0d888968a3..fac8fea3c2 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -987,7 +987,7 @@ process_rtp_payload(tvbuff_t *newtvb, packet_info *pinfo, proto_tree *tree, payload_len = tvb_length_remaining(newtvb, offset); /* first check if this is added as an SRTP stream - if so, don't try to dissector the payload data for now */ - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0); if (p_conv_data && p_conv_data->srtp_info) { srtp_info = p_conv_data->srtp_info; payload_len -= srtp_info->mki_len + srtp_info->auth_tag_len; @@ -1076,7 +1076,7 @@ dissect_rtp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 seqno; /* Retrieve RTPs idea of a converation */ - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0); if(p_conv_data != NULL) finfo = p_conv_data->rtp_conv_info; @@ -1278,7 +1278,7 @@ dissect_rtp_rfc2198(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gchar *payload_type_str; /* Retrieve RTPs idea of a converation */ - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0); /* Add try to RFC 2198 data */ ti = proto_tree_add_text(tree, tvb, offset, -1, "RFC 2198: Redundant Audio Data"); @@ -1614,7 +1614,7 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) /* Look for conv and add to the frame if found */ get_conv_info(pinfo, rtp_info); - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0); if (p_conv_data) rtp_info->info_is_video = p_conv_data->is_video; @@ -1625,7 +1625,7 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) col_set_str( pinfo->cinfo, COL_PROTOCOL, (is_srtp) ? "SRTP" : "RTP" ); /* check if this is added as an SRTP stream - if so, don't try to dissect the payload data for now */ - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0); #if 0 /* XXX: srtp_offset never actually used ?? */ if (p_conv_data && p_conv_data->srtp_info) { @@ -2055,7 +2055,7 @@ get_conv_info(packet_info *pinfo, struct _rtp_info *rtp_info) struct _rtp_conversation_info *p_conv_data = NULL; /* Use existing packet info if available */ - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0); if (!p_conv_data) { @@ -2080,7 +2080,7 @@ get_conv_info(packet_info *pinfo, struct _rtp_info *rtp_info) p_conv_packet_data->rtp_dyn_payload = p_conv_data->rtp_dyn_payload; p_conv_packet_data->rtp_conv_info = p_conv_data->rtp_conv_info; p_conv_packet_data->srtp_info = p_conv_data->srtp_info; - p_add_proto_data(pinfo->fd, proto_rtp, p_conv_packet_data); + p_add_proto_data(pinfo->fd, proto_rtp, 0, p_conv_packet_data); /* calculate extended sequence number */ seqno = calculate_extended_seqno(p_conv_data->extended_seqno, @@ -2105,7 +2105,7 @@ show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item *ti; /* Use existing packet info if available */ - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_rtp, 0); if (!p_conv_data) return; diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c index d65c994bc3..f4d0b7a386 100644 --- a/epan/dissectors/packet-sdp.c +++ b/epan/dissectors/packet-sdp.c @@ -1855,7 +1855,7 @@ setup_sdp_transport(tvbuff_t *tvb, packet_info *pinfo, enum sdp_exchange_type ex } transport_info->media[n].set_rtp = TRUE; /* SPRT might use the same port... */ - p_add_proto_data(pinfo->fd, proto_sprt, &transport_info->media_port[n]); + p_add_proto_data(pinfo->fd, proto_sprt, 0, &transport_info->media_port[n]); } if (rtcp_handle) { if (transport_info->proto_bitmask[n] & SDP_SRTP_PROTO) { @@ -1872,7 +1872,7 @@ setup_sdp_transport(tvbuff_t *tvb, packet_info *pinfo, enum sdp_exchange_type ex (sprt_handle)) { guint32 *port2; - port2 = (guint32 *)p_get_proto_data(pinfo->fd, proto_sprt); + port2 = (guint32 *)p_get_proto_data(pinfo->fd, proto_sprt, 0); if (transport_info->media_port[n] == 0 && port2) { sprt_add_address(pinfo, &transport_info->src_addr[n], *port2, 0, "SDP", pinfo->fd->num); /* will use same port as RTP */ @@ -2197,7 +2197,7 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } transport_info->media[n].set_rtp = TRUE; /* SPRT might use the same port... */ - p_add_proto_data(pinfo->fd, proto_sprt, &transport_info->media_port[n]); + p_add_proto_data(pinfo->fd, proto_sprt, 0, &transport_info->media_port[n]); } if (rtcp_handle) { if (transport_info->proto_bitmask[n] & SDP_SRTP_PROTO) { @@ -2216,7 +2216,7 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) (sprt_handle)) { guint32 *port2; - port2 = (guint32 *)p_get_proto_data(pinfo->fd, proto_sprt); + port2 = (guint32 *)p_get_proto_data(pinfo->fd, proto_sprt, 0); if (transport_info->media_port[n] == 0 && port2) { sprt_add_address(pinfo, &transport_info->src_addr[n], *port2, 0, "SDP", pinfo->fd->num); /* will use same port as RTP */ diff --git a/epan/dissectors/packet-selfm.c b/epan/dissectors/packet-selfm.c index 5ecea603f6..14199ee3de 100644 --- a/epan/dissectors/packet-selfm.c +++ b/epan/dissectors/packet-selfm.c @@ -1005,7 +1005,7 @@ dissect_fmdata_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int of /* Search for previously-encountered Configuration information to dissect the frame */ { - conv = (fm_conversation *)p_get_proto_data(pinfo->fd, proto_selfm); + conv = (fm_conversation *)p_get_proto_data(pinfo->fd, proto_selfm, 0); if (conv) { wmem_slist_frame_t *frame = wmem_slist_front(conv->fm_config_frames); @@ -1816,7 +1816,7 @@ dissect_selfm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) conversation_add_proto_data(conversation, proto_selfm, (void *)conv_data); } - p_add_proto_data(pinfo->fd, proto_selfm, conv_data); + p_add_proto_data(pinfo->fd, proto_selfm, 0, conv_data); if ((CMD_FM_CONFIG == msg_type) || (CMD_DFM_CONFIG == msg_type) || (CMD_PDFM_CONFIG == msg_type)) { /* Fill the fm_config_frame */ diff --git a/epan/dissectors/packet-ses.c b/epan/dissectors/packet-ses.c index c0f85d6330..d52506e8bd 100644 --- a/epan/dissectors/packet-ses.c +++ b/epan/dissectors/packet-ses.c @@ -1089,12 +1089,12 @@ dissect_spdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, has_user_information = TRUE; break; case SES_MAJOR_SYNC_POINT: - pres_ctx_id = (guint32 *)p_get_proto_data (pinfo->fd, proto_ses); + pres_ctx_id = (guint32 *)p_get_proto_data (pinfo->fd, proto_ses, 0); if (ses_rtse_reassemble != 0 && !pres_ctx_id) { /* First time visited - save pres_ctx_id */ pres_ctx_id = se_new(guint32); *pres_ctx_id = ses_pres_ctx_id; - p_add_proto_data (pinfo->fd, proto_ses, pres_ctx_id); + p_add_proto_data (pinfo->fd, proto_ses, 0, pres_ctx_id); } if (pres_ctx_id) { session.pres_ctx_id = *pres_ctx_id; diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index 7c54762a21..75e0bb3c20 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -3652,7 +3652,7 @@ guint sip_is_packet_resend(packet_info *pinfo, /* Return any answer stored from previous dissection */ if (pinfo->fd->flags.visited) { - sip_frame_result = (sip_frame_result_value*)p_get_proto_data(pinfo->fd, proto_sip); + sip_frame_result = (sip_frame_result_value*)p_get_proto_data(pinfo->fd, proto_sip, 0); if (sip_frame_result != NULL) { return sip_frame_result->original_frame_num; @@ -3798,7 +3798,7 @@ guint sip_is_packet_resend(packet_info *pinfo, break; } - sip_frame_result = (sip_frame_result_value *)p_get_proto_data(pinfo->fd, proto_sip); + sip_frame_result = (sip_frame_result_value *)p_get_proto_data(pinfo->fd, proto_sip, 0); if (sip_frame_result == NULL) { sip_frame_result = se_new0(sip_frame_result_value); @@ -3806,7 +3806,7 @@ guint sip_is_packet_resend(packet_info *pinfo, /* Store return value with this packet */ sip_frame_result->original_frame_num = result; - p_add_proto_data(pinfo->fd, proto_sip, sip_frame_result); + p_add_proto_data(pinfo->fd, proto_sip, 0, sip_frame_result); return result; } @@ -3850,7 +3850,7 @@ guint sip_find_request(packet_info *pinfo, /* Return any answer stored from previous dissection */ if (pinfo->fd->flags.visited) { - sip_frame_result = (sip_frame_result_value*)p_get_proto_data(pinfo->fd, proto_sip); + sip_frame_result = (sip_frame_result_value*)p_get_proto_data(pinfo->fd, proto_sip, 0); if (sip_frame_result != NULL) { *response_time = sip_frame_result->response_time; @@ -3901,7 +3901,7 @@ guint sip_find_request(packet_info *pinfo, /* Store return value with this packet */ - sip_frame_result = (sip_frame_result_value *)p_get_proto_data(pinfo->fd, proto_sip); + sip_frame_result = (sip_frame_result_value *)p_get_proto_data(pinfo->fd, proto_sip, 0); if (sip_frame_result == NULL) { /* Allocate and set all values to zero */ @@ -3919,7 +3919,7 @@ guint sip_find_request(packet_info *pinfo, (nseconds_between_packets / 1000000); *response_time = sip_frame_result->response_time; - p_add_proto_data(pinfo->fd, proto_sip, sip_frame_result); + p_add_proto_data(pinfo->fd, proto_sip, 0, sip_frame_result); return result; } @@ -3965,7 +3965,7 @@ guint sip_find_invite(packet_info *pinfo, /* Return any answer stored from previous dissection */ if (pinfo->fd->flags.visited) { - sip_frame_result = (sip_frame_result_value*)p_get_proto_data(pinfo->fd, proto_sip); + sip_frame_result = (sip_frame_result_value*)p_get_proto_data(pinfo->fd, proto_sip, 0); if (sip_frame_result != NULL) { *response_time = sip_frame_result->response_time; @@ -4021,7 +4021,7 @@ guint sip_find_invite(packet_info *pinfo, result = p_val->frame_number; /* Store return value with this packet */ - sip_frame_result = (sip_frame_result_value *)p_get_proto_data(pinfo->fd, proto_sip); + sip_frame_result = (sip_frame_result_value *)p_get_proto_data(pinfo->fd, proto_sip, 0); if (sip_frame_result == NULL) { /* Allocate and set all values to zero */ @@ -4039,7 +4039,7 @@ guint sip_find_invite(packet_info *pinfo, (nseconds_between_packets / 1000000); *response_time = sip_frame_result->response_time; - p_add_proto_data(pinfo->fd, proto_sip, sip_frame_result); + p_add_proto_data(pinfo->fd, proto_sip, 0, sip_frame_result); return result; } diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c index 278b07552b..62ff532636 100644 --- a/epan/dissectors/packet-smtp.c +++ b/epan/dissectors/packet-smtp.c @@ -450,7 +450,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* * Is there any data attached to this frame? */ - spd_frame_data = (struct smtp_proto_data *)p_get_proto_data(pinfo->fd, proto_smtp); + spd_frame_data = (struct smtp_proto_data *)p_get_proto_data(pinfo->fd, proto_smtp, 0); if (!spd_frame_data) { @@ -467,7 +467,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) spd_frame_data->conversation_id = conversation->index; spd_frame_data->more_frags = TRUE; - p_add_proto_data(pinfo->fd, proto_smtp, spd_frame_data); + p_add_proto_data(pinfo->fd, proto_smtp, 0, spd_frame_data); } diff --git a/epan/dissectors/packet-socks.c b/epan/dissectors/packet-socks.c index 56347fa92b..2849ce66ac 100644 --- a/epan/dissectors/packet-socks.c +++ b/epan/dissectors/packet-socks.c @@ -395,7 +395,7 @@ new_udp_conversation( socks_hash_entry_t *hash_info, packet_info *pinfo){ static void save_client_state(packet_info *pinfo, enum ClientState state) { - sock_state_t* state_info = (sock_state_t *)p_get_proto_data(pinfo->fd, proto_socks); + sock_state_t* state_info = (sock_state_t *)p_get_proto_data(pinfo->fd, proto_socks, 0); if ((state_info != NULL) && (state_info->client == clientNoInit)) { state_info->client = state; } @@ -405,7 +405,7 @@ save_client_state(packet_info *pinfo, enum ClientState state) static void save_server_state(packet_info *pinfo, enum ServerState state) { - sock_state_t* state_info = (sock_state_t *)p_get_proto_data(pinfo->fd, proto_socks); + sock_state_t* state_info = (sock_state_t *)p_get_proto_data(pinfo->fd, proto_socks, 0); if ((state_info != NULL) && (state_info->server == serverNoInit)) { state_info->server = state; } @@ -992,14 +992,14 @@ dissect_socks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U sock_state_t* state_info; guint8 version; - state_info = (sock_state_t *)p_get_proto_data(pinfo->fd, proto_socks); + state_info = (sock_state_t *)p_get_proto_data(pinfo->fd, proto_socks, 0); if (state_info == NULL) { state_info = se_new(sock_state_t); state_info->in_socks_dissector_flag = 0; state_info->client = clientNoInit; state_info->server = serverNoInit; - p_add_proto_data(pinfo->fd, proto_socks, state_info); + p_add_proto_data(pinfo->fd, proto_socks, 0, state_info); } /* avoid recursive overflow */ diff --git a/epan/dissectors/packet-soupbintcp.c b/epan/dissectors/packet-soupbintcp.c index 5c1222a69b..ea90b976d5 100644 --- a/epan/dissectors/packet-soupbintcp.c +++ b/epan/dissectors/packet-soupbintcp.c @@ -279,12 +279,12 @@ dissect_soupbintcp_common( wmem_file_scope(), sizeof(struct pdu_data)); pdu_data->seq_num = this_seq; - p_add_proto_data(pinfo->fd, proto_soupbintcp, pdu_data); + p_add_proto_data(pinfo->fd, proto_soupbintcp, 0, pdu_data); } } else { pdu_data = (struct pdu_data *)p_get_proto_data( pinfo->fd, - proto_soupbintcp); + proto_soupbintcp, 0); if (pdu_data) { this_seq = pdu_data->seq_num; } else { diff --git a/epan/dissectors/packet-spice.c b/epan/dissectors/packet-spice.c index 3aa2c1a39a..defc8b4621 100644 --- a/epan/dissectors/packet-spice.c +++ b/epan/dissectors/packet-spice.c @@ -3126,11 +3126,11 @@ dissect_spice(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U conversation_set_dissector(conversation, spice_handle); } - per_packet_info = (spice_packet_t *)p_get_proto_data(pinfo->fd, proto_spice); + per_packet_info = (spice_packet_t *)p_get_proto_data(pinfo->fd, proto_spice, 0); if (!per_packet_info) { per_packet_info = se_new(spice_packet_t); per_packet_info->state = spice_info->next_state; - p_add_proto_data(pinfo->fd, proto_spice, per_packet_info); + p_add_proto_data(pinfo->fd, proto_spice, 0, per_packet_info); } col_set_str(pinfo->cinfo, COL_PROTOCOL, "Spice"); diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c index 249e55593a..ca53d97d03 100644 --- a/epan/dissectors/packet-spnego.c +++ b/epan/dissectors/packet-spnego.c @@ -1754,7 +1754,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) * It has to be per-frame as there can be more than one GSS-API * negotiation in a conversation. */ - next_level_value = (gssapi_oid_value *)p_get_proto_data(pinfo->fd, proto_spnego); + next_level_value = (gssapi_oid_value *)p_get_proto_data(pinfo->fd, proto_spnego, 0); if (!next_level_value && !pinfo->fd->flags.visited) { /* * No handle attached to this frame, but it's the first @@ -1770,7 +1770,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) next_level_value = (gssapi_oid_value *)conversation_get_proto_data(conversation, proto_spnego); if (next_level_value) - p_add_proto_data(pinfo->fd, proto_spnego, next_level_value); + p_add_proto_data(pinfo->fd, proto_spnego, 0, next_level_value); } } diff --git a/epan/dissectors/packet-sscop.c b/epan/dissectors/packet-sscop.c index 91830db549..faf982b90b 100644 --- a/epan/dissectors/packet-sscop.c +++ b/epan/dissectors/packet-sscop.c @@ -339,7 +339,7 @@ static void dissect_sscop(tvbuff_t* tvb, packet_info* pinfo,proto_tree* tree) dissector_handle_t subdissector; /* Look for packet info for subdissector information */ - p_sscop_info = (struct _sscop_payload_info *)p_get_proto_data(pinfo->fd, proto_sscop); + p_sscop_info = (struct _sscop_payload_info *)p_get_proto_data(pinfo->fd, proto_sscop, 0); if ( p_sscop_info && ( subdissector = p_sscop_info->subdissector ) diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index 1c20bbf51c..9bb63f7a9e 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -3511,11 +3511,11 @@ ssl_add_record_info(gint proto, packet_info *pinfo, guchar* data, gint data_len, SslRecordInfo* rec; SslPacketInfo* pi; - pi = (SslPacketInfo *)p_get_proto_data(pinfo->fd, proto); + pi = (SslPacketInfo *)p_get_proto_data(pinfo->fd, proto, 0); if (!pi) { pi = (SslPacketInfo *)se_alloc0(sizeof(SslPacketInfo)); - p_add_proto_data(pinfo->fd, proto, pi); + p_add_proto_data(pinfo->fd, proto, 0, pi); } real_data = (guchar *)se_alloc(data_len); @@ -3537,7 +3537,7 @@ ssl_get_record_info(tvbuff_t *parent_tvb, int proto, packet_info *pinfo, gint re { SslRecordInfo* rec; SslPacketInfo* pi; - pi = (SslPacketInfo *)p_get_proto_data(pinfo->fd, proto); + pi = (SslPacketInfo *)p_get_proto_data(pinfo->fd, proto, 0); if (!pi) return NULL; @@ -3556,11 +3556,11 @@ ssl_add_data_info(gint proto, packet_info *pinfo, guchar* data, gint data_len, g SslDataInfo *rec, **prec; SslPacketInfo *pi; - pi = (SslPacketInfo *)p_get_proto_data(pinfo->fd, proto); + pi = (SslPacketInfo *)p_get_proto_data(pinfo->fd, proto, 0); if (!pi) { pi = (SslPacketInfo *)se_alloc0(sizeof(SslPacketInfo)); - p_add_proto_data(pinfo->fd, proto,pi); + p_add_proto_data(pinfo->fd, proto, 0, pi); } rec = (SslDataInfo *)se_alloc(sizeof(SslDataInfo)+data_len); @@ -3591,7 +3591,7 @@ ssl_get_data_info(int proto, packet_info *pinfo, gint key) { SslDataInfo* rec; SslPacketInfo* pi; - pi = (SslPacketInfo *)p_get_proto_data(pinfo->fd, proto); + pi = (SslPacketInfo *)p_get_proto_data(pinfo->fd, proto, 0); if (!pi) return NULL; diff --git a/epan/dissectors/packet-synphasor.c b/epan/dissectors/packet-synphasor.c index f243799317..66bd34b540 100644 --- a/epan/dissectors/packet-synphasor.c +++ b/epan/dissectors/packet-synphasor.c @@ -555,7 +555,7 @@ static void dissect_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (conversation) { config_frame *conf = (config_frame *)conversation_get_proto_data(conversation, proto_synphasor); /* no problem if 'conf' is NULL, the DATA frame dissector checks this again */ - p_add_proto_data(pinfo->fd, proto_synphasor, conf); + p_add_proto_data(pinfo->fd, proto_synphasor, 0, conf); } } } /* if (!visited) */ @@ -794,7 +794,7 @@ static int dissect_data_frame(tvbuff_t *tvb, /* search for configuration information to dissect the frame */ { gboolean config_found = FALSE; - conf = (config_frame *)p_get_proto_data(pinfo->fd, proto_synphasor); + conf = (config_frame *)p_get_proto_data(pinfo->fd, proto_synphasor, 0); if (conf) { /* check if the size of the current frame is the diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c index dce18c4d55..3dc5358462 100644 --- a/epan/dissectors/packet-t38.c +++ b/epan/dissectors/packet-t38.c @@ -1012,7 +1012,7 @@ init_t38_info_conv(packet_info *pinfo) p_t38_conv = NULL; /* Use existing packet info if available */ - p_t38_packet_conv = (t38_conv *)p_get_proto_data(pinfo->fd, proto_t38); + p_t38_packet_conv = (t38_conv *)p_get_proto_data(pinfo->fd, proto_t38, 0); /* find the conversation used for Reassemble and Setup Info */ @@ -1069,7 +1069,7 @@ init_t38_info_conv(packet_info *pinfo) memcpy(&(p_t38_packet_conv->src_t38_info), &(p_t38_conv->src_t38_info), sizeof(t38_conv_info)); memcpy(&(p_t38_packet_conv->dst_t38_info), &(p_t38_conv->dst_t38_info), sizeof(t38_conv_info)); - p_add_proto_data(pinfo->fd, proto_t38, p_t38_packet_conv); + p_add_proto_data(pinfo->fd, proto_t38, 0, p_t38_packet_conv); } if (ADDRESSES_EQUAL(&p_conv->key_ptr->addr1, &pinfo->net_src)) { diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 02c3e85428..672bc252c5 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -584,7 +584,7 @@ tcp_calculate_timestamps(packet_info *pinfo, struct tcp_analysis *tcpd, { if( !tcppd ) { tcppd = se_new(struct tcp_per_packet_data_t); - p_add_proto_data(pinfo->fd, proto_tcp, tcppd); + p_add_proto_data(pinfo->fd, proto_tcp, 0, tcppd); } if (!tcpd) @@ -616,7 +616,7 @@ tcp_print_timestamps(packet_info *pinfo, tvbuff_t *tvb, proto_tree *parent_tree, PROTO_ITEM_SET_GENERATED(item); if( !tcppd ) - tcppd = (struct tcp_per_packet_data_t *)p_get_proto_data(pinfo->fd, proto_tcp); + tcppd = (struct tcp_per_packet_data_t *)p_get_proto_data(pinfo->fd, proto_tcp, 0); if( tcppd ) { item = proto_tree_add_time(tree, hf_tcp_ts_delta, tvb, 0, 0, @@ -4259,7 +4259,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Do we need to calculate timestamps relative to the tcp-stream? */ if (tcp_calculate_ts) { - tcppd = (struct tcp_per_packet_data_t *)p_get_proto_data(pinfo->fd, proto_tcp); + tcppd = (struct tcp_per_packet_data_t *)p_get_proto_data(pinfo->fd, proto_tcp, 0); /* * Calculate the timestamps relative to this conversation (but only on the diff --git a/epan/dissectors/packet-teamspeak2.c b/epan/dissectors/packet-teamspeak2.c index 38018d7947..ec3df64898 100644 --- a/epan/dissectors/packet-teamspeak2.c +++ b/epan/dissectors/packet-teamspeak2.c @@ -390,7 +390,7 @@ static void ts2_standard_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree * /* XXX: Following fragmentation stuff should be separate from the GUI stuff ?? */ /* Get our stored fragmentation data or create one! */ - if ( ! ( frag = (ts2_frag *)p_get_proto_data(pinfo->fd, proto_ts2) ) ) { + if ( ! ( frag = (ts2_frag *)p_get_proto_data(pinfo->fd, proto_ts2, 0) ) ) { frag = se_new(ts2_frag); frag->frag_num=0; } @@ -414,11 +414,11 @@ static void ts2_standard_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree * frag->frag_size=conversation_data->client_frag_size; } frag->outoforder=outoforder; - p_add_proto_data(pinfo->fd, proto_ts2, frag); + p_add_proto_data(pinfo->fd, proto_ts2, 0, frag); } /* Get our stored fragmentation data */ - frag = (ts2_frag *)p_get_proto_data(pinfo->fd, proto_ts2); + frag = (ts2_frag *)p_get_proto_data(pinfo->fd, proto_ts2, 0); proto_tree_add_item(ts2_tree, hf_ts2_resend_count, tvb, 16, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(ts2_tree, hf_ts2_fragmentnumber, tvb, 18, 2, ENC_LITTLE_ENDIAN); diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index 96abc9537b..619da2a323 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -2696,7 +2696,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, umts_mac_info *macinf; bit_offset = 0; - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); /* Add subframe subtree */ subframe_ti = proto_tree_add_string_format(tree, hf_fp_edch_subframe, tvb, offset, 0, "", "Subframe %u data", subframes[n].subframe_number); @@ -3027,7 +3027,7 @@ dissect_e_dch_t2_or_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto /* Call MAC for this PDU if configured to */ if (preferences_call_mac_dissectors) { - p_add_proto_data(pinfo->fd, proto_umts_mac, mac_is_info); + p_add_proto_data(pinfo->fd, proto_umts_mac, 0, mac_is_info); call_dissector(mac_fdd_edch_type2_handle, tvb_new_subset_remaining(tvb, offset), pinfo, top_level_tree); } else { @@ -3093,8 +3093,8 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, umts_mac_info *macinf; rlc_info *rlcinf; - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); /**************************************/ /* HS-DCH data here (type 1 in R7) */ @@ -3295,8 +3295,8 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree umts_mac_info *macinf; rlc_info *rlcinf; - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); /********************************/ /* HS-DCH type 2 data here */ @@ -3534,8 +3534,8 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto umts_mac_info *macinf; rlc_info *rlcinf; - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); /********************************/ /* HS-DCH type 2 data here */ @@ -3743,7 +3743,7 @@ heur_dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data return FALSE; } - p_fp_info = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + p_fp_info = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); /* if no FP info is present, this might be FP in a pcap(ng) file */ if (!p_fp_info) { @@ -3832,7 +3832,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, gint *cur_val=NULL; fpi = se_new0(fp_info); - p_add_proto_data(pinfo->fd, proto_fp, fpi); + p_add_proto_data(pinfo->fd, proto_fp, 0, fpi); fpi->iface_type = p_conv_data->iface_type; fpi->division = p_conv_data->division; @@ -3874,7 +3874,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, macinf->content[0] = hsdsch_macdflow_id_mac_content_map[p_conv_data->hsdsch_macdflow_id]; /*MAC_CONTENT_PS_DTCH;*/ macinf->lchid[0] = p_conv_data->hsdsch_macdflow_id; /*macinf->content[0] = lchId_type_table[p_conv_data->edch_lchId[0]];*/ - p_add_proto_data(pinfo->fd, proto_umts_mac, macinf); + p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf); rlcinf = se_new0(rlc_info); @@ -3917,7 +3917,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, rlcinf->li_size[0] = RLC_LI_7BITS; rlcinf->ciphered[0] = FALSE; rlcinf->deciphered[0] = FALSE; - p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); + p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf); return fpi; @@ -3939,7 +3939,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, /* macinf = se_new0(umts_mac_info); macinf->content[0] = MAC_CONTENT_PS_DTCH;*/ - p_add_proto_data(pinfo->fd, proto_umts_mac, macinf); + p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf); /* For RLC re-assembly to work we need a urnti signaled from NBAP */ @@ -3949,7 +3949,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, rlcinf->ciphered[0] = FALSE; rlcinf->deciphered[0] = FALSE; - p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); + p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf); return fpi; @@ -4072,8 +4072,8 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, offset++; } - p_add_proto_data(pinfo->fd, proto_umts_mac, macinf); - p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); + p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf); + p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf); /* Set offset to point to first TFI * the Number of TFI's = number of DCH's in the flow */ @@ -4093,7 +4093,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, macinf = se_new0(umts_mac_info); macinf->ctmux[0] = 1; macinf->content[0] = MAC_CONTENT_DCCH; - p_add_proto_data(pinfo->fd, proto_umts_mac, macinf); + p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf); /* Set RLC data */ rlcinf = se_new0(rlc_info); /* Make configurable ?(avaliable in NBAP?) */ @@ -4104,7 +4104,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, rlcinf->li_size[0] = RLC_LI_7BITS; rlcinf->ciphered[0] = FALSE; rlcinf->deciphered[0] = FALSE; - p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); + p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf); break; case CHANNEL_RACH_FDD: @@ -4128,14 +4128,14 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, - p_add_proto_data(pinfo->fd, proto_umts_mac, macinf); - p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); + p_add_proto_data(pinfo->fd, proto_umts_mac,0, macinf); + p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf); break; case CHANNEL_HSDSCH_COMMON: rlcinf = se_new0(rlc_info); macinf = se_new0(umts_mac_info); - p_add_proto_data(pinfo->fd, proto_umts_mac, macinf); - p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); + p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf); + p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf); break; default: expert_add_info_format(pinfo,NULL,PI_UNDECODED,PI_WARN,"Unknown transport channel type"); @@ -4185,7 +4185,7 @@ dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) top_level_tree = tree; /* Look for packet info! */ - p_fp_info = (struct fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + p_fp_info = (struct fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); /* Check if we have conversation info */ p_conv = (conversation_t *)find_conversation(pinfo->fd->num, &pinfo->net_dst, &pinfo->net_src, @@ -4246,7 +4246,7 @@ dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) return; } - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); /* Show release information */ if (preferences_show_release_info) { diff --git a/epan/dissectors/packet-umts_mac.c b/epan/dissectors/packet-umts_mac.c index 33bbf1d121..a636c98d92 100644 --- a/epan/dissectors/packet-umts_mac.c +++ b/epan/dissectors/packet-umts_mac.c @@ -289,9 +289,9 @@ static void dissect_mac_fdd_rach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * ti = proto_tree_add_item(tree, proto_umts_mac, tvb, 0, -1, ENC_NA); rach_tree = proto_item_add_subtree(ti, ett_mac_rach); - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (!macinf || !fpinf) { proto_tree_add_text(rach_tree, tvb, 0, -1, "Cannot dissect MAC frame because per-frame info is missing"); @@ -381,9 +381,9 @@ static void dissect_mac_fdd_fach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * ti = proto_tree_add_item(tree, proto_umts_mac, tvb, 0, -1, ENC_NA); fach_tree = proto_item_add_subtree(ti, ett_mac_fach); - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (!macinf || !fpinf) { proto_tree_add_text(fach_tree, tvb, 0, -1, @@ -462,10 +462,10 @@ static void dissect_mac_fdd_fach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * add_new_data_source(pinfo, next_tvb, "Octet-Aligned BCCH Data"); /* In this case skip RLC and call RRC immediately subdissector */ - rrcinf = (rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc); + rrcinf = (rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc, 0); if (!rrcinf) { rrcinf = se_new0(struct rrc_info); - p_add_proto_data(pinfo->fd, proto_rrc, rrcinf); + p_add_proto_data(pinfo->fd, proto_rrc, 0, rrcinf); } rrcinf->msgtype[fpinf->cur_tb] = RRC_MESSAGE_TYPE_BCCH_FACH; @@ -501,9 +501,9 @@ static void dissect_mac_fdd_dch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t ti = proto_tree_add_item(tree, proto_umts_mac, tvb, 0, -1, ENC_NA); dch_tree = proto_item_add_subtree(ti, ett_mac_dch); - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); if (!macinf || !fpinf) { if(!macinf){ g_warning("MACinf == NULL"); @@ -943,9 +943,9 @@ static void dissect_mac_fdd_edch_type2(tvbuff_t *tvb, packet_info *pinfo, proto_ guint16 tsn; proto_item *pi, *temp; proto_tree *macis_pdu_tree, *macis_sdu_tree; - umts_mac_is_info * mac_is_info = (umts_mac_is_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); - rlc_info * rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); - struct fp_info *p_fp_info = (struct fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + umts_mac_is_info * mac_is_info = (umts_mac_is_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); + rlc_info * rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); + struct fp_info *p_fp_info = (struct fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); DISSECTOR_ASSERT(mac_is_info != NULL && rlcinf != NULL && p_fp_info != NULL); @@ -1014,9 +1014,9 @@ static void dissect_mac_fdd_edch(tvbuff_t *tvb, packet_info *pinfo, proto_tree * ti = proto_tree_add_item(tree, proto_umts_mac, tvb, 0, -1, ENC_NA); edch_tree = proto_item_add_subtree(ti, ett_mac_edch); - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); if (!macinf|| !fpinf) { ti = proto_tree_add_text(edch_tree, tvb, 0, -1, "Cannot dissect MAC frame because per-frame info is missing"); @@ -1152,8 +1152,8 @@ static void dissect_mac_fdd_hsdsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree ti = proto_tree_add_item(tree, proto_umts_mac, tvb, 0, -1, ENC_NA); hsdsch_tree = proto_item_add_subtree(ti, ett_mac_hsdsch); - fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp); - macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac); + fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0); + macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0); pos = fpinf->cur_tb; bitoffs = fpinf->hsdsch_entity == ehs ? 0 : 4; /*No MAC-d header for type 2*/ @@ -1172,7 +1172,7 @@ static void dissect_mac_fdd_hsdsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree macinf->fake_chid[pos] = FALSE; macinf->content[pos] = lchId_type_table[macinf->lchid[pos]]; /*Lookup MAC content*/ - rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc); + rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0); rlcinf->rbid[pos] = macinf->lchid[pos]; rlcinf->mode[pos] = lchId_rlc_map[macinf->lchid[pos]]; /*Look up RLC mode*/ bitoffs += 4; diff --git a/epan/dissectors/packet-vj.c b/epan/dissectors/packet-vj.c index 2a65b9ad48..7b283b86d3 100644 --- a/epan/dissectors/packet-vj.c +++ b/epan/dissectors/packet-vj.c @@ -476,7 +476,7 @@ vjc_tvb_setup(tvbuff_t *src_tvb, DISSECTOR_ASSERT(src_tvb); /* Get decompressed header stored in fd protocol area */ - hdr_buf = (vj_header_t *)p_get_proto_data(pinfo->fd, proto_vj); + hdr_buf = (vj_header_t *)p_get_proto_data(pinfo->fd, proto_vj, 0); if(hdr_buf == NULL) { col_set_str(pinfo->cinfo, COL_INFO, "VJ compressed TCP (previous data bad or missing)"); return VJ_ERROR; @@ -739,7 +739,7 @@ vjc_process(tvbuff_t *src_tvb, packet_info *pinfo, proto_tree *tree, data_ptr += TCP_HDR_LEN; if(TCP_OFFSET(thp) > 5) memcpy(data_ptr, cs->cs_tcpopt, (TCP_OFFSET(thp) - 5) * 4); - p_add_proto_data(pinfo->fd, proto_vj, buf_hdr); + p_add_proto_data(pinfo->fd, proto_vj, 0, buf_hdr); } return VJ_OK; diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c index 2da117a05c..0c7edf2b4f 100644 --- a/epan/dissectors/packet-vnc.c +++ b/epan/dissectors/packet-vnc.c @@ -799,7 +799,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset, gint num_auth_types; proto_item* auth_item; - per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc); + per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc, 0); if(!per_packet_info) { per_packet_info = se_new(vnc_packet_t); @@ -807,7 +807,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset, per_packet_info->state = per_conversation_info->vnc_next_state; per_packet_info->preferred_encoding = -1; - p_add_proto_data(pinfo->fd, proto_vnc, per_packet_info); + p_add_proto_data(pinfo->fd, proto_vnc, 0, per_packet_info); } /* Packet dissection follows */ @@ -1456,7 +1456,7 @@ vnc_client_set_encodings(tvbuff_t *tvb, packet_info *pinfo, gint *offset, guint counter; vnc_packet_t *per_packet_info; - per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc); + per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc, 0); /* Our calling function should have set the packet's proto data already */ DISSECTOR_ASSERT(per_packet_info != NULL); @@ -2181,7 +2181,7 @@ process_tight_rect_filter_palette(tvbuff_t *tvb, packet_info *pinfo, gint *offse /* See TightVNC's vnc_unixsrc/vncviewer/tight.c:InitFilterPaletteBPP() */ - per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc); + per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc, 0); /* Our calling function should have set the packet's proto data already */ DISSECTOR_ASSERT(per_packet_info != NULL); @@ -2222,7 +2222,7 @@ vnc_tight_encoding(tvbuff_t *tvb, packet_info *pinfo, gint *offset, gint bit_offset; gint bytes_needed = -1; - per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc); + per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc, 0); /* Our calling function should have set the packet's proto data already */ DISSECTOR_ASSERT(per_packet_info != NULL); @@ -2512,7 +2512,7 @@ vnc_set_bytes_per_pixel(const packet_info *pinfo, const guint8 bytes_per_pixel) { vnc_packet_t *per_packet_info; - per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc); + per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc, 0); /* Our calling function should have set the packet's proto data already */ DISSECTOR_ASSERT(per_packet_info != NULL); @@ -2525,7 +2525,7 @@ vnc_set_depth(const packet_info *pinfo, const guint8 depth) { vnc_packet_t *per_packet_info; - per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc); + per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc, 0); /* Our calling function should have set the packet's proto data already */ DISSECTOR_ASSERT(per_packet_info != NULL); @@ -2538,7 +2538,7 @@ vnc_get_bytes_per_pixel(const packet_info *pinfo) { vnc_packet_t *per_packet_info; - per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc); + per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc, 0); /* Our calling function should have set the packet's proto data already */ DISSECTOR_ASSERT(per_packet_info != NULL); diff --git a/epan/dissectors/packet-wcp.c b/epan/dissectors/packet-wcp.c index 07e9b7d8e6..f3e6a06ac2 100644 --- a/epan/dissectors/packet-wcp.c +++ b/epan/dissectors/packet-wcp.c @@ -573,7 +573,7 @@ static tvbuff_t *wcp_uncompress( tvbuff_t *src_tvb, int offset, packet_info *pin if ( pinfo->fd->flags.visited){ /* if not first pass */ /* get uncompressed data */ - pdata_ptr = (wcp_pdata_t *)p_get_proto_data( pinfo->fd, proto_wcp); + pdata_ptr = (wcp_pdata_t *)p_get_proto_data( pinfo->fd, proto_wcp, 0); if ( !pdata_ptr) { /* exit if no data */ REPORT_DISSECTOR_BUG("Can't find uncompressed data"); @@ -587,7 +587,7 @@ static tvbuff_t *wcp_uncompress( tvbuff_t *src_tvb, int offset, packet_info *pin memcpy( &pdata_ptr->buffer, buf_ptr->buf_cur, len); pdata_ptr->len = len; - p_add_proto_data( pinfo->fd, proto_wcp, (void*)pdata_ptr); + p_add_proto_data( pinfo->fd, proto_wcp, 0, (void*)pdata_ptr); buf_ptr->buf_cur = dst; } diff --git a/epan/dissectors/packet-zbee-aps.c b/epan/dissectors/packet-zbee-aps.c index 3d3b44caac..79a1512251 100644 --- a/epan/dissectors/packet-zbee-aps.c +++ b/epan/dissectors/packet-zbee-aps.c @@ -1196,7 +1196,7 @@ dissect_zbee_aps_transport_key(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree /* Update the key ring for this pan */ if ( !pinfo->fd->flags.visited && (nwk_hints = (zbee_nwk_hints_t *)p_get_proto_data(pinfo->fd, - proto_get_id_by_filter_name(ZBEE_PROTOABBREV_NWK)))) { + proto_get_id_by_filter_name(ZBEE_PROTOABBREV_NWK), 0))) { nwk_keyring = (GSList **)g_hash_table_lookup(zbee_table_nwk_keyring, &nwk_hints->src_pan); if ( !nwk_keyring ) { diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index 9fed72a411..44ac257bf6 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -368,14 +368,14 @@ dissect_zbee_nwk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (!pinfo->fd->flags.visited) { /* Allocate frame data with hints for upper layers */ nwk_hints = se_new0(zbee_nwk_hints_t); - p_add_proto_data(pinfo->fd, proto_zbee_nwk, nwk_hints); + p_add_proto_data(pinfo->fd, proto_zbee_nwk, 0, nwk_hints); } else { /* Retrieve existing structure */ - nwk_hints = (zbee_nwk_hints_t *)p_get_proto_data(pinfo->fd, proto_zbee_nwk); + nwk_hints = (zbee_nwk_hints_t *)p_get_proto_data(pinfo->fd, proto_zbee_nwk, 0); } ieee_hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, - proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN)); + proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN), 0); /* Add ourself to the protocol column, clear the info column, and create the protocol tree. */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ZigBee"); diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c index a68018a2e8..14fdb0aebc 100644 --- a/epan/dissectors/packet-zbee-security.c +++ b/epan/dissectors/packet-zbee-security.c @@ -440,9 +440,9 @@ dissect_zbee_secure(tvbuff_t *tvb, packet_info *pinfo, proto_tree* tree, guint o memset(&packet, 0, sizeof(zbee_security_packet)); /* Get pointers to any useful frame data from lower layers */ - nwk_hints = (zbee_nwk_hints_t *)p_get_proto_data(pinfo->fd, proto_get_id_by_filter_name(ZBEE_PROTOABBREV_NWK)); + nwk_hints = (zbee_nwk_hints_t *)p_get_proto_data(pinfo->fd, proto_get_id_by_filter_name(ZBEE_PROTOABBREV_NWK), 0); ieee_hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, - proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN)); + proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN), 0); /* Create a subtree for the security information. */ if (tree) { diff --git a/epan/frame_data.c b/epan/frame_data.c index 46a6698f9d..4d150f1a27 100644 --- a/epan/frame_data.c +++ b/epan/frame_data.c @@ -38,6 +38,7 @@ index and opaque pointer. */ typedef struct _frame_proto_data { int proto; + guint8 key; void *proto_data; } frame_proto_data; @@ -60,11 +61,12 @@ p_compare(gconstpointer a, gconstpointer b) } void -p_add_proto_data(frame_data *fd, int proto, void *proto_data) +p_add_proto_data(frame_data *fd, int proto, guint8 key, void *proto_data) { frame_proto_data *p1 = (frame_proto_data *)wmem_alloc(wmem_file_scope(), sizeof(frame_proto_data)); p1->proto = proto; + p1->proto = key; p1->proto_data = proto_data; /* Add it to the GSLIST */ @@ -75,12 +77,13 @@ p_add_proto_data(frame_data *fd, int proto, void *proto_data) } void * -p_get_proto_data(frame_data *fd, int proto) +p_get_proto_data(frame_data *fd, int proto, guint8 key) { frame_proto_data temp, *p1; GSList *item; temp.proto = proto; + temp.proto = key; temp.proto_data = NULL; item = g_slist_find_custom(fd->pfd, (gpointer *)&temp, p_compare); @@ -95,12 +98,13 @@ p_get_proto_data(frame_data *fd, int proto) } void -p_remove_proto_data(frame_data *fd, int proto) +p_remove_proto_data(frame_data *fd, int proto, guint8 key) { frame_proto_data temp; GSList *item; temp.proto = proto; + temp.proto = key; temp.proto_data = NULL; item = g_slist_find_custom(fd->pfd, (gpointer *)&temp, p_compare); diff --git a/epan/frame_data.h b/epan/frame_data.h index 94bc7404dd..6710e341f0 100644 --- a/epan/frame_data.h +++ b/epan/frame_data.h @@ -90,9 +90,9 @@ typedef struct { /* Utility routines used by packet*.c */ -WS_DLL_PUBLIC void p_add_proto_data(frame_data *fd, int proto, void *proto_data); -WS_DLL_PUBLIC void *p_get_proto_data(frame_data *fd, int proto); -void p_remove_proto_data(frame_data *fd, int proto); +WS_DLL_PUBLIC void p_add_proto_data(frame_data *fd, int proto, guint8 key, void *proto_data); +WS_DLL_PUBLIC void *p_get_proto_data(frame_data *fd, int proto, guint8 key); +void p_remove_proto_data(frame_data *fd, int proto, guint8 key); /** compare two frame_datas */ WS_DLL_PUBLIC gint frame_data_compare(const frame_data *fdata1, const frame_data *fdata2, int field); diff --git a/tap-rtp-common.c b/tap-rtp-common.c index 8bce533309..0a93675bd0 100644 --- a/tap-rtp-common.c +++ b/tap-rtp-common.c @@ -255,7 +255,7 @@ int rtpstream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con tmp_strinfo.rtp_stats.reg_pt = PT_UNDEFINED; /* Get the Setup frame number who set this RTP stream */ - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_get_id_by_filter_name("rtp")); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_get_id_by_filter_name("rtp"), 0); if (p_conv_data) tmp_strinfo.setup_frame_number = p_conv_data->frame_number; else diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c index 5f91e85e2d..0e6262c788 100644 --- a/ui/cli/tap-follow.c +++ b/ui/cli/tap-follow.c @@ -353,7 +353,7 @@ followSslPacket( ) { follow_t * fp = (follow_t *)contextp; - SslPacketInfo * spip = (SslPacketInfo *)p_get_proto_data(pip->fd, GPOINTER_TO_INT(datap)); + SslPacketInfo * spip = (SslPacketInfo *)p_get_proto_data(pip->fd, GPOINTER_TO_INT(datap), 0); SslDataInfo * sdip; gint length; tcp_stream_chunk sc; diff --git a/ui/gtk/follow_ssl.c b/ui/gtk/follow_ssl.c index 14ffcf83ac..18378c847b 100644 --- a/ui/gtk/follow_ssl.c +++ b/ui/gtk/follow_ssl.c @@ -81,7 +81,7 @@ ssl_queue_packet_data(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_ gint total_len; guchar *p; int proto_ssl = GPOINTER_TO_INT(ssl); - SslPacketInfo* pi = (SslPacketInfo*)p_get_proto_data(pinfo->fd, proto_ssl); + SslPacketInfo* pi = (SslPacketInfo*)p_get_proto_data(pinfo->fd, proto_ssl, 0); /* skip packet without decrypted data payload*/ if (!pi || !pi->appl_data) diff --git a/ui/gtk/voip_calls.c b/ui/gtk/voip_calls.c index 849179ef35..688014b6a9 100644 --- a/ui/gtk/voip_calls.c +++ b/ui/gtk/voip_calls.c @@ -549,7 +549,7 @@ RTP_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, void cons /* if it is dynamic payload, let use the conv data to see if it is defined */ if ( (strinfo->pt >= PT_UNDF_96) && (strinfo->pt <= PT_UNDF_127) ) { /* Use existing packet info if available */ - p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_get_id_by_filter_name("rtp")); + p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(pinfo->fd, proto_get_id_by_filter_name("rtp"), 0); if (p_conv_data && p_conv_data->rtp_dyn_payload) { encoding_name_and_rate_t *encoding_name_and_rate_pt = NULL; encoding_name_and_rate_pt = (encoding_name_and_rate_t *)g_hash_table_lookup(p_conv_data->rtp_dyn_payload, &strinfo->pt);