Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)

I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future.  And search/replace of a function name is easy enough to do.

The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As.

All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope().  All other dissectors were converted to using file_scope() which was the original scope for "proto" data.

svn path=/trunk/; revision=53520
This commit is contained in:
Michael Mann 2013-11-23 02:20:13 +00:00
parent b3a24c5cc4
commit 9b7fb8a811
95 changed files with 497 additions and 465 deletions

View File

@ -754,7 +754,7 @@ CQI-ReportConfigSCell-r10/nomPDSCH-RS-EPRE-Offset-r10 STRINGS=VALS(lte_rrc_nomPD
drx_check_config_sane(drx_config, actx);
/* Look for UE identifier */
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_mac_lte, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_mac_lte, 0);
if (p_mac_lte_info != NULL) {
/* If found, configure MAC with DRX config */
set_mac_lte_drx_config(p_mac_lte_info->ueid, drx_config, actx->pinfo);
@ -1204,7 +1204,7 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(&lte_rrc_duration_val)
memset(drb_mapping, 0, sizeof(*drb_mapping));
%(DEFAULT_BODY)s
/* Need UE identifier */
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_mac_lte, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_mac_lte, 0);
if (p_mac_lte_info == NULL) {
return offset;
}
@ -1494,7 +1494,7 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(&lte_rrc_duration_val)
mac_lte_info* p_mac_lte_info;
%(DEFAULT_BODY)s
/* Look for UE identifier */
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_mac_lte, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_mac_lte, 0);
if (p_mac_lte_info != NULL) {
/* If found, tell MAC to release DRX config */
set_mac_lte_drx_config_release(p_mac_lte_info->ueid, actx->pinfo);
@ -1502,7 +1502,7 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(&lte_rrc_duration_val)
#.FN_BODY RRCConnectionSetup
/* Look for UE identifier */
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_mac_lte, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_mac_lte, 0);
if (p_mac_lte_info != NULL) {
/* If found, tell MAC to release DRX config coming from a previous RRC connection */
/* We do release the configuration here instead of RRC Connection Release message */
@ -1519,7 +1519,7 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(&lte_rrc_duration_val)
p_security_algorithms = private_data_pdcp_security_algorithms(actx);
p_security_algorithms->configuration_frame = actx->pinfo->fd->num;
/* Look for UE identifier */
p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_pdcp_lte, 0);
p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_pdcp_lte, 0);
if (p_pdcp_lte_info != NULL) {
/* Configure algorithms */
set_pdcp_lte_security_algorithms(p_pdcp_lte_info->ueid, p_security_algorithms);

View File

@ -198,7 +198,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, 0);
rrcinf = (struct rrc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rrc, 0);
/* make entry in the Protocol column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");

View File

@ -404,7 +404,7 @@ fp_info *fpinf ;
%(DEFAULT_BODY)s
fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, 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;
}
@ -722,7 +722,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, 0);
rrcinf = (rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
}
@ -758,7 +758,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, 0);
rrcinf = (rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
}
@ -789,10 +789,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, 0);
rrcinf = (struct rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
if (!rrcinf) {
rrcinf = wmem_new0(wmem_file_scope(), struct rrc_info);
p_add_proto_data(actx->pinfo->fd, proto_rrc, 0, rrcinf);
p_add_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0, rrcinf);
}
rrcinf->hrnti[actx->pinfo->fd->subnum] = tvb_get_ntohs(hrnti_tvb, 0);
@ -806,7 +806,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, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
/*If no info found, skip all this*/
if(fpinf == NULL){
@ -859,7 +859,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
%(DEFAULT_BODY)s

View File

@ -1260,7 +1260,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, 0);
next_level_value = (gssapi_oid_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_spnego, 0);
if (!next_level_value && !pinfo->fd->flags.visited) {
/*
* No handle attached to this frame, but it's the first
@ -1276,7 +1276,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, 0, next_level_value);
p_add_proto_data(wmem_file_scope(), pinfo, proto_spnego, 0, next_level_value);
}
}

View File

@ -425,7 +425,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, 0);
p_t38_packet_conv = (t38_conv *)p_get_proto_data(wmem_file_scope(), pinfo, proto_t38, 0);
/* find the conversation used for Reassemble and Setup Info */
@ -482,7 +482,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, 0, p_t38_packet_conv);
p_add_proto_data(wmem_file_scope(), pinfo, proto_t38, 0, p_t38_packet_conv);
}
if (ADDRESSES_EQUAL(&p_conv->key_ptr->addr1, &pinfo->net_src)) {

View File

@ -702,7 +702,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,
hints = (ieee802154_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo,
proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN), 0);
if (hints) {
lowpan_addr16_to_ifcid(hints->src16, ifcid);
@ -741,7 +741,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,
hints = (ieee802154_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo,
proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN), 0);
if (hints) {
lowpan_addr16_to_ifcid(hints->dst16, ifcid);
@ -1374,7 +1374,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
struct lowpan_nhdr *nhdr_list;
/* Lookup the IEEE 802.15.4 addressing hints. */
hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd,
hints = (ieee802154_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo,
proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN), 0);
hint_panid = (hints) ? (hints->src_pan) : (IEEE802154_BCAST_PAN);

View File

@ -775,7 +775,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
* 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, 0);
fd = (ajp13_frame_data*)p_get_proto_data(wmem_file_scope(), pinfo, 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
@ -783,7 +783,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
* pass through the data.
*/
fd = wmem_new(wmem_file_scope(), ajp13_frame_data);
p_add_proto_data(pinfo->fd, proto_ajp13, 0, fd);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ajp13, 0, fd);
fd->is_request_body = FALSE;
if (cd->content_length) {
/* this is screwy, see AJPv13.html. the idea is that if the

View File

@ -755,7 +755,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) == 0)
if (p_get_proto_data(wmem_file_scope(), pinfo, proto_arp, 0) == 0)
{
arp_request_count++;
}
@ -767,10 +767,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) != 0)
if (p_get_proto_data(wmem_file_scope(), pinfo, proto_arp, 0) != 0)
{
/* Read any previous stored packet setting */
report_storm = (p_get_proto_data(pinfo->fd, proto_arp, 0) == (void*)STORM);
report_storm = (p_get_proto_data(wmem_file_scope(), pinfo, proto_arp, 0) == (void*)STORM);
}
else
{
@ -786,7 +786,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, 0, (void*)NO_STORM);
p_add_proto_data(wmem_file_scope(), pinfo, proto_arp, 0, (void*)NO_STORM);
return;
}
else
@ -794,13 +794,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, 0, (void*)STORM);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0, (void*)NO_STORM);
p_add_proto_data(wmem_file_scope(), pinfo, proto_arp, 0, (void*)NO_STORM);
}
}

View File

@ -780,7 +780,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, 0);
beep_frame_data = (struct beep_proto_data *)p_get_proto_data(wmem_file_scope(), pinfo, proto_beep, 0);
if (!beep_frame_data) {
@ -874,7 +874,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, 0, beep_frame_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_beep, 0, beep_frame_data);
}
@ -890,7 +890,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, 0, beep_frame_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_beep, 0, beep_frame_data);
}

View File

@ -293,7 +293,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, 0) != NULL)
if (p_get_proto_data(wmem_file_scope(), pinfo, proto_brdwlk, 0) != NULL)
dropped_packets = TRUE;
} else {
/*
@ -314,7 +314,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, 0, &packet_count);
p_add_proto_data(wmem_file_scope(), pinfo, proto_brdwlk, 0, &packet_count);
}
}
}

View File

@ -106,12 +106,12 @@ void proto_reg_handoff_btavctp(void);
static void btavctp_pid_prompt(packet_info *pinfo, gchar* result)
{
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "AVCTP SERVICE 0x%04x as",
GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_btavctp, BTAVCTP_PID_CONV )));
GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_btavctp, BTAVCTP_PID_CONV )));
}
static gpointer btavctp_pid_value(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_btavctp, BTAVCTP_PID_CONV );
return p_get_proto_data(pinfo->pool, pinfo, proto_btavctp, BTAVCTP_PID_CONV );
}
static gint
@ -177,8 +177,8 @@ dissect_btavctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
proto_tree_add_item(btavctp_tree, hf_btavctp_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
pid = tvb_get_ntohs(tvb, offset);
if (p_get_proto_data(pinfo->fd, proto_btavctp, BTAVCTP_PID_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btavctp, BTAVCTP_PID_CONV, GUINT_TO_POINTER(pid));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btavctp, BTAVCTP_PID_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btavctp, BTAVCTP_PID_CONV, GUINT_TO_POINTER(pid));
}
offset +=2;
}

View File

@ -381,34 +381,34 @@ void proto_reg_handoff_btl2cap(void);
static void btl2cap_cid_prompt(packet_info *pinfo, gchar* result)
{
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "L2CAP CID 0x%04x as",
GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_CID_CONV )));
GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_CID_CONV )));
}
static gpointer btl2cap_cid_value(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_CID_CONV );
return p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_CID_CONV );
}
static void btl2cap_psm_prompt(packet_info *pinfo, gchar* result)
{
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "L2CAP PSM 0x%04x as",
GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV )));
GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV )));
}
static gpointer btl2cap_psm_value(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV );
return p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV );
}
static void btl2cap_serv_prompt(packet_info *pinfo, gchar* result)
{
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "L2CAP SERVICE 0x%04x as",
GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_SERV_CONV )));
GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV )));
}
static gpointer btl2cap_serv_value(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_SERV_CONV );
return p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV );
}
static guint16
@ -539,8 +539,8 @@ dissect_connrequest(tvbuff_t *tvb, int offset, packet_info *pinfo,
psm = tvb_get_letohs(tvb, offset);
if (p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV, GUINT_TO_POINTER((guint)psm));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV, GUINT_TO_POINTER((guint)psm));
}
if (psm < BTL2CAP_DYNAMIC_PSM_START) {
@ -1363,14 +1363,14 @@ dissect_b_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item *psm_item;
guint16 uuid;
if (p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV, GUINT_TO_POINTER((guint)psm));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV, GUINT_TO_POINTER((guint)psm));
}
uuid = get_service_uuid(pinfo, l2cap_data, psm, is_local_psm);
if (p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_SERV_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_SERV_CONV, GUINT_TO_POINTER((guint)uuid));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV, GUINT_TO_POINTER((guint)uuid));
}
if (psm < BTL2CAP_DYNAMIC_PSM_START) {
@ -1529,14 +1529,14 @@ dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item *psm_item;
guint16 uuid;
if (p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV, GUINT_TO_POINTER((guint)psm));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV, GUINT_TO_POINTER((guint)psm));
}
uuid = get_service_uuid(pinfo, l2cap_data, psm, psm_data->local_service);
if (p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_SERV_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_SERV_CONV, GUINT_TO_POINTER((guint)uuid));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV, GUINT_TO_POINTER((guint)uuid));
}
if (psm < BTL2CAP_DYNAMIC_PSM_START) {
@ -1651,8 +1651,8 @@ dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
cid = tvb_get_letohs(tvb, offset);
proto_tree_add_item(btl2cap_tree, hf_btl2cap_cid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
if (p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_CID_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_CID_CONV, GUINT_TO_POINTER((guint)cid));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_CID_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_CID_CONV, GUINT_TO_POINTER((guint)cid));
}
offset += 2;
@ -1788,8 +1788,8 @@ dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
psm = tvb_get_letohs(tvb, offset);
l2cap_data->psm = psm;
if (p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_PSM_CONV, GUINT_TO_POINTER((guint)psm));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV, GUINT_TO_POINTER((guint)psm));
}
proto_tree_add_item(btl2cap_tree, hf_btl2cap_psm, tvb, offset, 2, ENC_LITTLE_ENDIAN);
@ -1804,8 +1804,8 @@ dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
uuid = get_service_uuid(pinfo, l2cap_data, psm, (pinfo->p2p_dir == P2P_DIR_RECV) ? TRUE : FALSE );
if (p_get_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_SERV_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btl2cap, BTL2CAP_SERV_CONV, GUINT_TO_POINTER((guint)uuid));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV, GUINT_TO_POINTER((guint)uuid));
}
if (!dissector_try_uint_new(l2cap_service_dissector_table, uuid, next_tvb, pinfo, tree, TRUE, l2cap_data)) {

View File

@ -261,23 +261,23 @@ void proto_reg_handoff_btgnss(void);
static void btrfcomm_serv_prompt(packet_info *pinfo, gchar* result)
{
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "RFCOMM SERVICE %d as",
GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_btrfcomm, BTRFCOMM_SERVICE_CONV )));
GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_btrfcomm, BTRFCOMM_SERVICE_CONV )));
}
static gpointer btrfcomm_serv_value(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_btrfcomm, BTRFCOMM_SERVICE_CONV );
return p_get_proto_data(pinfo->pool, pinfo, proto_btrfcomm, BTRFCOMM_SERVICE_CONV );
}
static void btrfcomm_chan_prompt(packet_info *pinfo, gchar* result)
{
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "RFCOMM Channel %d as",
GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_btrfcomm, BTRFCOMM_CHANNEL_CONV )));
GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_btrfcomm, BTRFCOMM_CHANNEL_CONV )));
}
static gpointer btrfcomm_chan_value(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_btrfcomm, BTRFCOMM_CHANNEL_CONV );
return p_get_proto_data(pinfo->pool, pinfo, proto_btrfcomm, BTRFCOMM_CHANNEL_CONV );
}
static dissector_handle_t
@ -458,8 +458,8 @@ dissect_btrfcomm_address(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tr
channel = dlci >> 1;
proto_item_append_text(dlci_item, " (Direction: %d, Channel: %u)", dlci & 0x01, channel);
if (p_get_proto_data(pinfo->fd, proto_btrfcomm, BTRFCOMM_CHANNEL_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btrfcomm, BTRFCOMM_CHANNEL_CONV, GUINT_TO_POINTER((guint)channel));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btrfcomm, BTRFCOMM_CHANNEL_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btrfcomm, BTRFCOMM_CHANNEL_CONV, GUINT_TO_POINTER((guint)channel));
}
dlci_tree = proto_item_add_subtree(dlci_item, ett_dlci);
@ -784,8 +784,8 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
rfcomm_data->remote_bd_addr_oui = l2cap_data->remote_bd_addr_oui;
rfcomm_data->remote_bd_addr_id = l2cap_data->remote_bd_addr_id;
if (p_get_proto_data(pinfo->fd, proto_btrfcomm, BTRFCOMM_SERVICE_CONV ) == NULL) {
p_add_proto_data(pinfo->fd, proto_btrfcomm, BTRFCOMM_SERVICE_CONV, GUINT_TO_POINTER((guint)service_info->uuid.bt_uuid));
if (p_get_proto_data(pinfo->pool, pinfo, proto_btrfcomm, BTRFCOMM_SERVICE_CONV ) == NULL) {
p_add_proto_data(pinfo->pool, pinfo, proto_btrfcomm, BTRFCOMM_SERVICE_CONV, GUINT_TO_POINTER((guint)service_info->uuid.bt_uuid));
}
if (!dissector_try_uint_new(rfcomm_channel_dissector_table, (guint32) dlci >> 1,

View File

@ -1111,7 +1111,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, 0);
p_pdcp_lte_info = (struct pdcp_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pdcp_lte, 0);
if (p_pdcp_lte_info == NULL) {
/* This really should be set...can't dissect anything without it */
return;
@ -1445,7 +1445,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, 0);
struct fp_info *p_fp_info = (struct fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
if (p_fp_info != NULL) {
return;
}
@ -1570,7 +1570,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, 0, p_fp_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_fp, 0, p_fp_info);
return;
}
@ -1634,7 +1634,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, 0, p_fp_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_fp, 0, p_fp_info);
}
@ -1644,7 +1644,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, 0);
struct rlc_info *p_rlc_info = (struct rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (p_rlc_info != NULL) {
return;
@ -1700,7 +1700,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, 0, p_rlc_info);
p_add_proto_data(wmem_file_scope(), pinfo, 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
@ -1708,7 +1708,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, 0, p_fp_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_fp, 0, p_fp_info);
}
@ -1842,7 +1842,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, 0);
p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc_lte, 0);
if (p_rlc_lte_info != NULL) {
return;
}
@ -1860,7 +1860,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, 0, p_rlc_lte_info);
p_add_proto_data(wmem_file_scope(), pinfo, 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
@ -1871,7 +1871,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, 0);
p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pdcp_lte, 0);
if (p_pdcp_lte_info != NULL) {
return;
}
@ -1898,7 +1898,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, 0, p_pdcp_lte_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_pdcp_lte, 0, p_pdcp_lte_info);
}

View File

@ -2535,7 +2535,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, 0 );
preq_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0 );
if ((preq_info == NULL) || (preq_info->isUnconnectedSend == FALSE))
{
@ -4294,7 +4294,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, 0 );
cip_req_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0 );
if ( cip_req_info )
{
if ( cip_req_info->pData == NULL )
@ -4631,7 +4631,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, 0 );
cip_req_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0 );
if ( cip_req_info )
{
mr_mult_req_info = (mr_mult_req_info_t*)cip_req_info->pData;
@ -4745,7 +4745,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, 0);
preq_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
if ((preq_info != NULL) &&
(preq_info->ciaData != NULL))
{
@ -5088,7 +5088,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, 0 );
preq_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0 );
if ( preq_info != NULL && ( service & 0x80 )
&& preq_info->bService == SC_CM_UNCON_SEND
)
@ -5117,9 +5117,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, 0 );
p_remove_proto_data(pinfo->fd, proto_cip, 0);
p_add_proto_data(pinfo->fd, proto_cip, 0, pembedded_req_info );
p_save_proto_data = p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0 );
p_remove_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
p_add_proto_data(wmem_file_scope(), pinfo, 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);
@ -5128,8 +5128,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, 0);
p_add_proto_data(pinfo->fd, proto_cip, 0, p_save_proto_data);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
p_add_proto_data(wmem_file_scope(), pinfo, proto_cip, 0, p_save_proto_data);
return;
}
}
@ -5422,7 +5422,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, 0 );
preq_info = (cip_req_info_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0 );
pembedded_req_info = NULL;
if ( preq_info )
{
@ -5588,10 +5588,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, 0, request_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0, request_info);
call_dissector(modbus_handle, next_tvb, pinfo, cmd_data_tree);
p_remove_proto_data(pinfo->fd, proto_modbus, 0);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0);
}
break;
@ -5678,10 +5678,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, 0, request_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0, request_info);
call_dissector(modbus_handle, next_tvb, pinfo, cmd_data_tree);
p_remove_proto_data(pinfo->fd, proto_modbus, 0);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0);
}
break;
@ -5918,7 +5918,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, 0);
preq_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
if ((preq_info != NULL) &&
(preq_info->ciaData != NULL))
{
@ -6079,7 +6079,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, 0);
preq_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
if ((preq_info != NULL) &&
(preq_info->dissector == dissector_get_uint_handle( subdissector_class_table, CI_CLS_CCO)))
{
@ -6150,9 +6150,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, 0);
p_remove_proto_data(pinfo->fd, proto_cip, 0);
p_add_proto_data(pinfo->fd, proto_cip, 0, preq_info);
p_save_proto_data = p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
p_add_proto_data(wmem_file_scope(), pinfo, 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);
@ -6332,8 +6332,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, 0);
p_add_proto_data(pinfo->fd, proto_cip, 0, p_save_proto_data);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
p_add_proto_data(wmem_file_scope(), pinfo, proto_cip, 0, p_save_proto_data);
} /* End of dissect_cip_data() */
@ -6350,7 +6350,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, 0);
enip_info = (enip_request_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_enip, 0);
if ( enip_info )
{

View File

@ -505,7 +505,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, 0);
preq_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
if ((preq_info != NULL) &&
(preq_info->ciaData != NULL))
{
@ -1169,7 +1169,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, 0);
preq_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
if ((preq_info != NULL) &&
(preq_info->ciaData != NULL))
{
@ -1323,7 +1323,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, 0);
preq_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
if ((preq_info != NULL) &&
(preq_info->dissector == dissector_get_uint_handle( subdissector_class_table, CI_CLS_SAFETY_VALIDATOR)))
{
@ -1464,7 +1464,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, 0 );
cip_safety_info_t* safety_info = (cip_safety_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cipsafety, 0 );
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "CIP Safety");

View File

@ -1484,10 +1484,10 @@ static void register_dmp_id (packet_info *pinfo, guint8 reason)
pkg_data = wmem_new (wmem_file_scope(), dmp_id_val);
*pkg_data = *dmp_data;
p_add_proto_data (pinfo->fd, proto_dmp, 0, pkg_data);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
pkg_data = (dmp_id_val *)p_get_proto_data(wmem_file_scope(), pinfo, 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;

View File

@ -899,7 +899,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, 0);
packet_state = (frame_state_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_eap, 0);
if (packet_state == NULL) {
/*
* We haven't - does this message require reassembly?
@ -962,7 +962,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
*/
packet_state = wmem_new(wmem_file_scope(), frame_state_t);
packet_state->info = eap_reass_cookie;
p_add_proto_data(pinfo->fd, proto_eap, 0, packet_state);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
packet_state = (frame_state_t *)p_get_proto_data(wmem_file_scope(), pinfo, 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 = wmem_new(wmem_file_scope(), frame_state_t);
packet_state->info = leap_state;
p_add_proto_data(pinfo->fd, proto_eap, 0, packet_state);
p_add_proto_data(wmem_file_scope(), pinfo, proto_eap, 0, packet_state);
/*
* Update the conversation's state.

View File

@ -1697,7 +1697,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, 0, request_info);
p_add_proto_data(wmem_file_scope(), pinfo, 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 */
@ -1725,7 +1725,7 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb,
}
else
{
p_remove_proto_data(pinfo->fd, proto_enip, 0);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_enip, 0);
}
break;
@ -1752,14 +1752,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, 0, request_info);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_enip, 0);
}
else
{
@ -1776,7 +1776,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, 0, cip_safety);
p_add_proto_data(wmem_file_scope(), pinfo, proto_cipsafety, 0, cip_safety);
call_dissector(cipsafety_handle, next_tvb, pinfo, dissector_tree);
}
else if (conn_info->motion == TRUE)
@ -1921,7 +1921,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, 0);
request_info = (enip_request_info_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_enip, 0);
if (request_info != NULL)
{
if (item == SOCK_ADR_INFO_OT)
@ -1991,16 +1991,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, 0);
request_info = (enip_request_info_t *)p_get_proto_data(wmem_file_scope(), pinfo, 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, 0);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_enip, 0);
}
else if (FwdOpen == TRUE)
{
p_remove_proto_data(pinfo->fd, proto_enip, 0);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_enip, 0);
}
} /* end of dissect_cpf() */

View File

@ -191,12 +191,12 @@ const value_string etype_vals[] = {
static void eth_prompt(packet_info *pinfo, gchar* result)
{
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Ethertype 0x%04x as",
GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_ethertype, 0)));
GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_ethertype, 0)));
}
static gpointer eth_value(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_ethertype, 0);
return p_get_proto_data(pinfo->pool, pinfo, proto_ethertype, 0);
}
static void add_dix_trailer(packet_info *pinfo, proto_tree *tree, proto_tree *fh_tree,
@ -288,7 +288,7 @@ dissect_ethertype(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
next_tvb = tvb_new_subset(tvb, ethertype_data->offset_after_ethertype, captured_length,
reported_length);
p_add_proto_data(pinfo->fd, proto_ethertype, 0, GUINT_TO_POINTER((guint)ethertype_data->etype));
p_add_proto_data(pinfo->pool, pinfo, proto_ethertype, 0, GUINT_TO_POINTER((guint)ethertype_data->etype));
/* Look for sub-dissector, and call it if found.
Catch exceptions, so that if the reported length of "next_tvb"

View File

@ -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 = wmem_new(wmem_file_scope(), fcp_proto_data_t);
proto_data->lun = lun;
p_add_proto_data(pinfo->fd, proto_fcp, 0, proto_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_fcp, 0, proto_data);
}
request_data = (fcp_request_data_t*)wmem_tree_lookup32(fcp_conv_data->luns, lun);
@ -714,9 +714,9 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
if (!pinfo->fd->flags.visited) {
proto_data = wmem_new(wmem_file_scope(), fcp_proto_data_t);
proto_data->lun = fchdr->itlq->lun;
p_add_proto_data(pinfo->fd, proto_fcp, 0, proto_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_fcp, 0, proto_data);
} else {
proto_data = (fcp_proto_data_t *)p_get_proto_data(pinfo->fd, proto_fcp, 0);
proto_data = (fcp_proto_data_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fcp, 0);
fchdr->itlq->lun = proto_data->lun;
}

View File

@ -148,15 +148,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, 0);
rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (!macinf) {
macinf = wmem_new0(wmem_file_scope(), struct umts_mac_info);
p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0, macinf);
}
if (!rlcinf) {
rlcinf = wmem_new0(wmem_file_scope(), struct rlc_info);
p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0, rlcinf);
}
while (i < rbcnt) {
@ -429,10 +429,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, 0);
fpi = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
if (!fpi) {
fpi = wmem_new0(wmem_file_scope(), fp_info);
p_add_proto_data(pinfo->fd, proto_fp, 0, fpi);
p_add_proto_data(wmem_file_scope(), pinfo, proto_fp, 0, fpi);
}
fpi->is_uplink = pinfo->p2p_dir == P2P_DIR_RECV;

View File

@ -425,7 +425,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
ppd_item = proto_tree_add_uint(fh_tree, hf_frame_num_p_prot_data, tvb, 0, 0, num_entries);
PROTO_ITEM_SET_GENERATED(ppd_item);
for(i=0; i<num_entries; i++){
proto_tree_add_text (fh_tree, tvb, 0, 0, "%s",p_get_proto_name_and_key(pinfo->fd, i));
proto_tree_add_text (fh_tree, tvb, 0, 0, "%s",p_get_proto_name_and_key(wmem_file_scope(), pinfo, i));
}
}
/* Check for existences of P2P pseudo header */

View File

@ -369,14 +369,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, 0);
oidvalue = (gssapi_oid_value *)p_get_proto_data(wmem_file_scope(), pinfo, 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, 0, gss_info->oid);
p_add_proto_data(wmem_file_scope(), pinfo, proto_gssapi, 0, gss_info->oid);
}
if (!oidvalue)
{

View File

@ -649,7 +649,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, 0, req_res);
p_add_proto_data(wmem_file_scope(), pinfo, proto_http, 0, req_res);
}
/**
@ -668,7 +668,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, 0, req_res);
p_add_proto_data(wmem_file_scope(), pinfo, proto_http, 0, req_res);
}
/*
@ -1025,7 +1025,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, 0);
http_req_res_t *curr = (http_req_res_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_http, 0);
http_req_res_t *prev = curr ? curr->prev : NULL;
http_req_res_t *next = curr ? curr->next : NULL;

View File

@ -1634,7 +1634,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, 0);
iax_packet = (iax_packet_data *)p_get_proto_data(wmem_file_scope(), pinfo, proto_iax2, 0);
if (!iax_packet) {
/* if not, find or create an iax_call info structure for this IAX session. */
@ -1648,7 +1648,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, 0, iax_packet);
p_add_proto_data(wmem_file_scope(), pinfo, proto_iax2, 0, iax_packet);
} else {
iax_call = iax_packet->call_data;
reversed = iax_packet->reversed;
@ -1807,7 +1807,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, 0);
iax_packet_data *p = (iax_packet_data *)p_get_proto_data(wmem_file_scope(), pinfo, proto_iax2, 0);
if (!p) {
/* if not, find or create an iax_call info structure for this IAX session. */
@ -1817,7 +1817,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, 0, p);
p_add_proto_data(wmem_file_scope(), pinfo, proto_iax2, 0, p);
/* set the codec for this frame to be whatever the last full frame used */
if (iax_call) {

View File

@ -2165,7 +2165,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, 0,
hints = (ieee802154_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo, 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);

View File

@ -634,9 +634,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 = wmem_new0(wmem_file_scope(), ieee802154_hints_t);
p_add_proto_data(pinfo->fd, proto_ieee802154, 0, ieee_hints);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ieee802154, 0, ieee_hints);
} else {
ieee_hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd, proto_ieee802154, 0);
ieee_hints = (ieee802154_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ieee802154, 0);
}
/* Create the protocol tree. */
@ -1797,7 +1797,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, 0);
ieee_hints = (ieee802154_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ieee802154, 0);
/* Get the captured and on-the-wire length of the payload. */
M = IEEE802154_MIC_LENGTH(packet->security_level);

View File

@ -722,7 +722,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
spx_rexmit_info_p = wmem_new(wmem_file_scope(), spx_rexmit_info);
spx_rexmit_info_p->num = pkt_value->num;
p_add_proto_data(pinfo->fd, proto_spx, 0,
p_add_proto_data(wmem_file_scope(), pinfo, proto_spx, 0,
spx_rexmit_info_p);
}
} else {
@ -732,7 +732,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* data indicates which frame had the original
* transmission.
*/
spx_rexmit_info_p = (spx_rexmit_info *)p_get_proto_data(pinfo->fd,
spx_rexmit_info_p = (spx_rexmit_info *)p_get_proto_data(wmem_file_scope(), pinfo,
proto_spx, 0);
}
}

View File

@ -480,7 +480,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, 0);
p_ifg_info = (ifg_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ixveriwave, 0);
if (!p_ifg_info)
{
/* allocate the space */
@ -506,7 +506,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, 0, p_ifg_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ixveriwave, 0, p_ifg_info);
}
/* Grab the rest of the frame. */
@ -544,7 +544,7 @@ ethernettap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_t
offset = 0;
/* First add the IFG information */
p_ifg_info = (struct ifg_info *) p_get_proto_data(pinfo->fd, proto_ixveriwave, 0);
p_ifg_info = (struct ifg_info *) p_get_proto_data(wmem_file_scope(), pinfo, proto_ixveriwave, 0);
if (tree) {
ti = proto_tree_add_uint(tap_tree, hf_ixveriwave_vw_ifg,
tvb, offset, 0, p_ifg_info->ifg);
@ -698,7 +698,7 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
/* First add the IFG information, need to grab the info bit field here */
vw_info = tvb_get_letohs(tvb, 20);
p_ifg_info = (struct ifg_info *) p_get_proto_data(pinfo->fd, proto_ixveriwave, 0);
p_ifg_info = (struct ifg_info *) p_get_proto_data(wmem_file_scope(), pinfo, proto_ixveriwave, 0);
if (tree) {
if ((vw_info & 0x0400) && !(vw_info & 0x0800)) /* If the packet is part of an A-MPDU but not the first MPDU */
ti = proto_tree_add_uint(tap_tree, hf_ixveriwave_vw_ifg, tvb, 18, 0, 0);

View File

@ -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, 0);
sscop_payload_info *p_sscop_info = (sscop_payload_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_sscop, 0);
if (!p_sscop_info) {
p_sscop_info = wmem_new0(wmem_file_scope(), sscop_payload_info);
p_add_proto_data(pinfo->fd, proto_sscop, 0, p_sscop_info);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
fp_info *p_fp_info = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
if (!p_fp_info) {
p_fp_info = wmem_new0(wmem_file_scope(), fp_info);
p_add_proto_data(pinfo->fd, proto_fp, 0, p_fp_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_fp, 0, p_fp_info);
fill_fp_info(p_fp_info,
pinfo->pseudo_header->k12.extra_info,

View File

@ -805,7 +805,7 @@ dissect_kafka(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
}
if (PINFO_FD_VISITED(pinfo)) {
matcher = (kafka_query_response_t *) p_get_proto_data(pinfo->fd, proto_kafka, 0);
matcher = (kafka_query_response_t *) p_get_proto_data(wmem_file_scope(), pinfo, proto_kafka, 0);
}
if (pinfo->destport == kafka_port) {
@ -818,7 +818,7 @@ dissect_kafka(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
matcher->request_frame = PINFO_FD_NUM(pinfo);
matcher->response_found = FALSE;
p_add_proto_data(pinfo->fd, proto_kafka, 0, matcher);
p_add_proto_data(wmem_file_scope(), pinfo, proto_kafka, 0, matcher);
/* The kafka server always responds, except in the case of a produce
* request whose RequiredAcks field is 0. This field is at a dynamic
@ -890,7 +890,7 @@ dissect_kafka(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
matcher->response_frame = PINFO_FD_NUM(pinfo);
matcher->response_found = TRUE;
p_add_proto_data(pinfo->fd, proto_kafka, 0, matcher);
p_add_proto_data(wmem_file_scope(), pinfo, proto_kafka, 0, matcher);
}
col_add_fstr(pinfo->cinfo, COL_INFO, "Kafka %s Response",

View File

@ -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, 0);
lapd_ppi = (lapd_ppi_t*)p_get_proto_data(wmem_file_scope(), pinfo, 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, 0)) {
if (NULL == p_get_proto_data(wmem_file_scope(), pinfo, proto_lapd, 0)) {
/* Per packet information */
lapd_ppi = wmem_new(wmem_file_scope(), 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, 0, lapd_ppi);
p_add_proto_data(wmem_file_scope(), pinfo, proto_lapd, 0, lapd_ppi);
/* Conversation info*/

View File

@ -12846,7 +12846,7 @@ dissect_lte_rrc_DRB_ToAddMod(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
ett_lte_rrc_DRB_ToAddMod, DRB_ToAddMod_sequence);
/* Need UE identifier */
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_mac_lte, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_mac_lte, 0);
if (p_mac_lte_info == NULL) {
return offset;
}
@ -13007,7 +13007,7 @@ dissect_lte_rrc_T_release(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
offset = dissect_per_null(tvb, offset, actx, tree, hf_index);
/* Look for UE identifier */
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_mac_lte, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_mac_lte, 0);
if (p_mac_lte_info != NULL) {
/* If found, tell MAC to release DRX config */
set_mac_lte_drx_config_release(p_mac_lte_info->ueid, actx->pinfo);
@ -13956,7 +13956,7 @@ dissect_lte_rrc_MAC_MainConfig(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
drx_check_config_sane(drx_config, actx);
/* Look for UE identifier */
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_mac_lte, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_mac_lte, 0);
if (p_mac_lte_info != NULL) {
/* If found, configure MAC with DRX config */
set_mac_lte_drx_config(p_mac_lte_info->ueid, drx_config, actx->pinfo);
@ -18778,7 +18778,7 @@ dissect_lte_rrc_RRCConnectionSetup(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
col_append_str(actx->pinfo->cinfo, COL_INFO, "RRCConnectionSetup");
/* Look for UE identifier */
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_mac_lte, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_mac_lte, 0);
if (p_mac_lte_info != NULL) {
/* If found, tell MAC to release DRX config coming from a previous RRC connection */
/* We do release the configuration here instead of RRC Connection Release message */
@ -22272,7 +22272,7 @@ dissect_lte_rrc_SecurityAlgorithmConfig(tvbuff_t *tvb _U_, int offset _U_, asn1_
p_security_algorithms = private_data_pdcp_security_algorithms(actx);
p_security_algorithms->configuration_frame = actx->pinfo->fd->num;
/* Look for UE identifier */
p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(actx->pinfo->fd, proto_pdcp_lte, 0);
p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_pdcp_lte, 0);
if (p_pdcp_lte_info != NULL) {
/* Configure algorithms */
set_pdcp_lte_security_algorithms(p_pdcp_lte_info->ueid, p_security_algorithms);

View File

@ -62,7 +62,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, 0);
p_mac_lte_info = (struct mac_lte_info*)p_get_proto_data(wmem_file_scope(), pinfo, 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*)wmem_alloc0(wmem_file_scope(), sizeof(struct mac_lte_info));
@ -79,7 +79,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, 0, p_mac_lte_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0, p_mac_lte_info);
}
/**************************************/

View File

@ -1903,7 +1903,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, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0);
if (p_mac_lte_info == NULL) {
/* Allocate new info struct for this frame */
p_mac_lte_info = wmem_new0(wmem_file_scope(), struct mac_lte_info);
@ -1921,7 +1921,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, 0, p_mac_lte_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0, p_mac_lte_info);
}
/**************************************/
@ -2552,7 +2552,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, 0);
p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc_lte, 0);
if (p_rlc_lte_info == NULL) {
p_rlc_lte_info = wmem_new0(wmem_file_scope(), struct rlc_lte_info);
}
@ -2568,7 +2568,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, 0, p_rlc_lte_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc_lte, 0, p_rlc_lte_info);
if (global_mac_lte_layer_to_show != ShowRLCLayer) {
/* Don't want these columns replaced */
@ -2723,7 +2723,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, 0);
struct mac_lte_info *p_mac_lte_info = (struct mac_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0);
if (p_mac_lte_info == NULL) {
return FALSE;
@ -4880,7 +4880,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, 0);
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0);
/* Can't dissect anything without it... */
if (p_mac_lte_info == NULL) {
@ -5534,13 +5534,13 @@ void set_mac_lte_drx_config_release(guint16 ueid, packet_info *pinfo)
/* 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, 0);
return (mac_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, 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, 0, p_mac_lte_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0, p_mac_lte_info);
}
void proto_register_mac_lte(void)

View File

@ -481,22 +481,22 @@ dissect_mbtcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
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, 0 );
p_remove_proto_data(pinfo->fd, proto_modbus, 0);
p_save_proto_data = p_get_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0 );
p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0);
/* Create enough context for Modbus dissector */
request_info = wmem_new(wmem_packet_scope(), 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, 0, request_info);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
p_add_proto_data(pinfo->fd, proto_modbus, 0, p_save_proto_data);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0);
p_add_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0, p_save_proto_data);
return tvb_length(tvb);
}
@ -623,22 +623,22 @@ dissect_mbrtu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
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, 0 );
p_remove_proto_data(pinfo->fd, proto_modbus, 0);
p_save_proto_data = p_get_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0 );
p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0);
/* Create enough context for Modbus dissector */
request_info = wmem_new(wmem_packet_scope(), 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, 0, request_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0, request_info);
/* Continue with dissection of Modbus data payload following Modbus RTU frame */
if( tvb_length_remaining(tvb, offset) > 0 )
call_dissector(modbus_handle, next_tvb, pinfo, tree);
p_remove_proto_data(pinfo->fd, proto_modbus, 0);
p_add_proto_data(pinfo->fd, proto_modbus, 0, p_save_proto_data);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0);
p_add_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0, p_save_proto_data);
return tvb_length(tvb);
}
@ -871,7 +871,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, 0 );
request_info = (modbus_request_info_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0 );
if (request_info != NULL)
{
packet_type = request_info->packet_type;

View File

@ -403,10 +403,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, 0);
p_sscop_info = (sscop_payload_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_sscop, 0);
if (!p_sscop_info) {
p_sscop_info = wmem_new0(wmem_file_scope(), sscop_payload_info);
p_add_proto_data(pinfo->fd, proto_sscop, 0, p_sscop_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_sscop, 0, p_sscop_info);
}
switch (aal5proto) {
case META_AAL5PROTO_MTP3:
@ -429,7 +429,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, 0);
p_remove_proto_data(wmem_file_scope(), pinfo, proto_sscop, 0);
}
proto_tree_add_uint(meta_tree, hf_meta_item_aal5proto, tvb,
offs, 1, aal5proto);

View File

@ -1353,12 +1353,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, 0);
mikey = (mikey_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_mikey, 0);
if (!mikey) {
mikey = wmem_new0(wmem_file_scope(), mikey_t);
mikey->type = -1;
p_add_proto_data(pinfo->fd, proto_mikey, 0, mikey);
p_add_proto_data(wmem_file_scope(), pinfo, proto_mikey, 0, mikey);
}

View File

@ -621,11 +621,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 = (packet_analysis_data_t *)p_get_proto_data(pinfo->fd, proto_mp2t, 0);
pdata = (packet_analysis_data_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_mp2t, 0);
if (!pdata) {
pdata = wmem_new0(wmem_file_scope(), packet_analysis_data_t);
pdata->subpacket_table = wmem_tree_new(wmem_file_scope());
p_add_proto_data(pinfo->fd, proto_mp2t, 0, pdata);
p_add_proto_data(wmem_file_scope(), pinfo, proto_mp2t, 0, pdata);
} else {
spdata = (subpacket_analysis_data_t *)wmem_tree_lookup32(pdata->subpacket_table, offset);
@ -642,7 +642,7 @@ mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len,
}
} else {
/* Get saved values */
pdata = (packet_analysis_data_t *)p_get_proto_data(pinfo->fd, proto_mp2t, 0);
pdata = (packet_analysis_data_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_mp2t, 0);
if (!pdata) {
/* Occurs for the first packets in the capture which cannot be reassembled */
return;

View File

@ -320,12 +320,12 @@ static dissector_table_t mpls_subdissector_table;
static void mpls_prompt(packet_info *pinfo, gchar* result)
{
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Data after label %u as",
GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_mpls, 0)));
GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_mpls, 0)));
}
static gpointer mpls_value(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_mpls, 0);
return p_get_proto_data(pinfo->pool, pinfo, proto_mpls, 0);
}
/*
@ -550,7 +550,7 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* update pinfo
*/
mplsinfo.label = label;
p_add_proto_data(pinfo->fd, proto_mpls, 0, GUINT_TO_POINTER(label));
p_add_proto_data(pinfo->pool, pinfo, proto_mpls, 0, GUINT_TO_POINTER(label));
mplsinfo.exp = exp;
mplsinfo.bos = bos;
mplsinfo.ttl = ttl;

View File

@ -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, 0);
p_conv_data = (struct _msrp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, 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 *)wmem_memdup(wmem_file_scope(),
p_conv_data, sizeof(struct _msrp_conversation_info));
p_add_proto_data(pinfo->fd, proto_msrp, 0, p_conv_packet_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_msrp, 0, p_conv_packet_data);
}
}
}

View File

@ -1836,7 +1836,7 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
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, 0);
mysql_frame_data_p = (struct mysql_frame_data *)p_get_proto_data(wmem_file_scope(), pinfo, 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
@ -1844,7 +1844,7 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
*/
mysql_frame_data_p = wmem_new(wmem_file_scope(), struct mysql_frame_data);
mysql_frame_data_p->state = conn_data->state;
p_add_proto_data(pinfo->fd, proto_mysql, 0, mysql_frame_data_p);
p_add_proto_data(wmem_file_scope(), pinfo, 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

View File

@ -7152,7 +7152,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, 0, (void*) request_value);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ncp, 0, (void*) request_value);
}
/* else... we haven't seen an NCP Request for that conversation and sequence. */
else
@ -7162,7 +7162,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, 0);
request_value = (ncp_req_hash_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ncp, 0);
if (!request_value) {
dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree, ncp_tap);
return;
@ -8877,7 +8877,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, 0, (void*) request_value);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ncp, 0, (void*) request_value);
}
/* else... we haven't seen an NCP Request for that conversation
and sequence.
@ -8898,7 +8898,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, 0,
p_add_proto_data(wmem_file_scope(), pinfo, proto_ncp, 0,
(void*) request_value);
}
else {
@ -8912,7 +8912,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, 0,
p_add_proto_data(wmem_file_scope(), pinfo, proto_ncp, 0,
(void*) request_value);
}
/* else... we haven't seen an NCP Request for that
@ -8921,7 +8921,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
}
}
else {
/*request_value = p_get_proto_data(pinfo->fd, proto_ncp);*/
/*request_value = p_get_proto_data(wmem_file_scope(), pinfo, proto_ncp);*/
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
PT_NCP, nw_connection, nw_connection, 0);
if (conversation != NULL) {

View File

@ -4369,12 +4369,12 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, spx_info *spx_i
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, 0, (void*) request_value);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
request_value = (ndps_req_hash_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0);
}
if (!request_value)
{
@ -6982,12 +6982,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, 0, (void*) request_value);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
request_value = (ndps_req_hash_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0);
}
if (request_value) {
ndps_prog = request_value->ndps_prog;

View File

@ -1651,7 +1651,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, NTLMSSP_CONV_INFO_KEY);
conv_ntlmssp_info = (ntlmssp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ntlmssp, NTLMSSP_CONV_INFO_KEY);
if (conv_ntlmssp_info == NULL) {
/*
* There isn't any. Is there any from this conversation? If so,
@ -1670,7 +1670,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, NTLMSSP_CONV_INFO_KEY, conv_ntlmssp_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ntlmssp, NTLMSSP_CONV_INFO_KEY, conv_ntlmssp_info);
}
if (conv_ntlmssp_info != NULL) {
@ -2023,11 +2023,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, NTLMSSP_PACKET_INFO_KEY);
packet_ntlmssp_info = (ntlmssp_packet_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ntlmssp, NTLMSSP_PACKET_INFO_KEY);
if (packet_ntlmssp_info == NULL) {
/* We don't have any packet state, so create one */
packet_ntlmssp_info = wmem_new0(wmem_file_scope(), ntlmssp_packet_info);
p_add_proto_data(pinfo->fd, proto_ntlmssp, NTLMSSP_PACKET_INFO_KEY, packet_ntlmssp_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ntlmssp, NTLMSSP_PACKET_INFO_KEY, packet_ntlmssp_info);
}
if (!packet_ntlmssp_info->payload_decrypted) {
conversation_t *conversation;
@ -2247,7 +2247,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, NTLMSSP_PACKET_INFO_KEY);
packet_ntlmssp_info = (ntlmssp_packet_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ntlmssp, NTLMSSP_PACKET_INFO_KEY);
if (packet_ntlmssp_info == NULL) {
/* We don't have data for this packet */
return;
@ -2554,11 +2554,11 @@ dissect_ntlmssp_encrypted_payload(tvbuff_t *data_tvb,
fprintf(stderr, "Called dissect_ntlmssp_encrypted_payload\n");
/* Check to see if we already have state for this packet */
packet_ntlmssp_info = p_get_proto_data(pinfo->fd, proto_ntlmssp, NTLMSSP_PACKET_INFO_KEY);
packet_ntlmssp_info = p_get_proto_data(wmem_file_scope(), pinfo, proto_ntlmssp, NTLMSSP_PACKET_INFO_KEY);
if (packet_ntlmssp_info == NULL) {
/* We don't have any packet state, so create one */
packet_ntlmssp_info = wmem_new0(wmem_file_scope(), ntlmssp_packet_info);
p_add_proto_data(pinfo->fd, proto_ntlmssp, NTLMSSP_PACKET_INFO_KEY, packet_ntlmssp_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ntlmssp, NTLMSSP_PACKET_INFO_KEY, packet_ntlmssp_info);
}
if (!packet_ntlmssp_info->payload_decrypted) {

View File

@ -1011,12 +1011,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, 0);
prev_dst_ref = (guint32 *)p_get_proto_data(wmem_file_scope(), pinfo, proto_clnp, 0);
if (!prev_dst_ref) {
/* First COTP in frame - save previous dst_ref as offset */
prev_dst_ref = wmem_new(wmem_file_scope(), guint32);
*prev_dst_ref = cotp_dst_ref;
p_add_proto_data (pinfo->fd, proto_clnp, 0, prev_dst_ref);
p_add_proto_data(wmem_file_scope(), pinfo, proto_clnp, 0, prev_dst_ref);
} else if (cotp_frame_reset) {
cotp_dst_ref = *prev_dst_ref;
}

View File

@ -437,12 +437,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, 0);
pkg_list = (GHashTable *)p_get_proto_data(wmem_file_scope(), pinfo, 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, 0, pkg_list);
p_add_proto_data(wmem_file_scope(), pinfo, proto_p_mul, 0, pkg_list);
}
if (!pinfo->fd->flags.visited) {

View File

@ -928,7 +928,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, 0);
p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pdcp_lte, 0);
if (p_pdcp_lte_info == NULL) {
/* Allocate new info struct for this frame */
p_pdcp_lte_info = wmem_new0(wmem_file_scope(), pdcp_lte_info);
@ -1020,7 +1020,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, 0, p_pdcp_lte_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_pdcp_lte, 0, p_pdcp_lte_info);
}
/**************************************/
@ -1063,7 +1063,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, 0);
p_pdcp_info = (struct pdcp_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pdcp_lte, 0);
/* Can't dissect anything without it... */
if (p_pdcp_info == NULL) {
return;
@ -1071,7 +1071,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, 0) != NULL)) {
(p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc_lte, 0) != NULL)) {
col_set_writable(pinfo->cinfo, FALSE);
}
@ -1410,13 +1410,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, 0) != NULL) &&
if ((p_get_proto_data(wmem_file_scope(), pinfo, 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, 0) == NULL) {
if (p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc_lte, 0) == NULL) {
do_analysis = TRUE;
}
break;

View File

@ -143,7 +143,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, 0);
frame_data_p = (struct pop_proto_data *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pop, 0);
conversation = find_or_create_conversation(pinfo);
data_val = (struct pop_data_val *)conversation_get_proto_data(conversation, proto_pop);
@ -226,7 +226,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, 0, frame_data_p);
p_add_proto_data(wmem_file_scope(), pinfo, proto_pop, 0, frame_data_p);
}
frag_msg = fragment_add_seq_next(&pop_data_reassembly_table, tvb, 0,

View File

@ -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, 0);
p_conv_data = (struct _rdt_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, 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, 0, p_conv_packet_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rdt, 0, p_conv_packet_data);
}
}
}

View File

@ -790,11 +790,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, 0);
p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pdcp_lte, 0);
if (p_pdcp_lte_info == NULL) {
p_pdcp_lte_info = wmem_new0(wmem_file_scope(), pdcp_lte_info);
/* Store info in packet */
p_add_proto_data(pinfo->fd, proto_pdcp_lte, 0, p_pdcp_lte_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_pdcp_lte, 0, p_pdcp_lte_info);
}
p_pdcp_lte_info->ueid = rlc_info->ueid;
@ -2156,9 +2156,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, 0) != NULL)) ||
(p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0) != NULL)) ||
((global_rlc_lte_um_sequence_analysis == SEQUENCE_ANALYSIS_RLC_ONLY) &&
(p_get_proto_data(pinfo->fd, proto_mac_lte, 0) == NULL))) {
(p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0) == NULL))) {
guint16 lastSegmentOffset = offset;
if (s_number_of_extensions >= 1) {
@ -2379,9 +2379,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, 0) != NULL)) ||
(p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0) != NULL)) ||
((global_rlc_lte_am_sequence_analysis == SEQUENCE_ANALYSIS_RLC_ONLY) &&
(p_get_proto_data(pinfo->fd, proto_mac_lte, 0) == NULL))) {
(p_get_proto_data(wmem_file_scope(), pinfo, 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);
@ -2543,9 +2543,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, 0) != NULL)) ||
(p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0) != NULL)) ||
((global_rlc_lte_am_sequence_analysis == SEQUENCE_ANALYSIS_RLC_ONLY) &&
(p_get_proto_data(pinfo->fd, proto_mac_lte, 0) == NULL))) {
(p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0) == NULL))) {
guint16 firstSegmentLength;
guint16 lastSegmentOffset = offset;
@ -2660,7 +2660,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, 0);
p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc_lte, 0);
if (p_rlc_lte_info == NULL) {
/* Allocate new info struct for this frame */
p_rlc_lte_info = wmem_new0(wmem_file_scope(), struct rlc_lte_info);
@ -2723,7 +2723,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, 0, p_rlc_lte_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc_lte, 0, p_rlc_lte_info);
}
/**************************************/
@ -2769,7 +2769,7 @@ static void dissect_rlc_lte_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Look for packet info! */
p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte, 0);
p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc_lte, 0);
/* Can't dissect anything without it... */
if (p_rlc_lte_info == NULL) {
@ -2867,7 +2867,7 @@ static void dissect_rlc_lte_common(tvbuff_t *tvb, packet_info *pinfo, proto_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, 0) != NULL);
tap_info->loggedInMACFrame = (p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0) != NULL);
tap_info->time = pinfo->fd->abs_ts;

View File

@ -356,8 +356,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, 0);
rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (!fpinf || !rlcinf) return -1;
if (rlcinf->urnti[fpinf->cur_tb]) {
@ -1324,11 +1324,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, 0);
rrcinf = (rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rrcinf = (rrc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rrc, 0);
if (!rrcinf) {
rrcinf = (rrc_info *)wmem_alloc0(wmem_file_scope(), sizeof(struct rrc_info));
p_add_proto_data(pinfo->fd, proto_rrc, 0, rrcinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rrc, 0, rrcinf);
}
rrcinf->msgtype[fpinf->cur_tb] = msgtype;
call_dissector(rrc_handle, tvb, pinfo, tree);
@ -1590,8 +1590,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, 0);
rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (tree) {
if (fpinf && rlcinf) {
@ -1827,8 +1827,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, 0);
rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (tree) {
if (fpinf && rlcinf) {
@ -2221,8 +2221,8 @@ dissect_rlc_am(enum rlc_channel_type channel, tvbuff_t *tvb, packet_info *pinfo,
proto_item *truncated_ti, *ti;
guint64 polling;
fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
next_byte = tvb_get_guint8(tvb, offs++);
dc = next_byte >> 7;
@ -2353,7 +2353,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, 0);
fpi = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
if (!fpi) return; /* dissection failure */
if (tree) {
@ -2374,7 +2374,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, 0);
fpi = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
if (!fpi) return; /* dissection failure */
if (tree) {
@ -2404,7 +2404,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, 0);
fpi = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
if (!fpi) return; /* dissection failure */
if (tree) {
@ -2429,8 +2429,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, 0);
rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
fpi = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlci = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (!fpi || !rlci){
ti = proto_tree_add_text(tree, tvb, 0, -1,
@ -2469,8 +2469,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, 0);
rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
fpi = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlci = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (!fpi || !rlci) {
ti = proto_tree_add_text(tree, tvb, 0, -1,
@ -2511,8 +2511,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, 0);
rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
fpi = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlci = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (!fpi || !rlci) return;
@ -2581,14 +2581,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, 0);
fpi = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
if (fpi == NULL) {
/* Allocate new info struct for this frame */
fpi = (fp_info *)wmem_alloc0(wmem_file_scope(), sizeof(fp_info));
} else {
fpInfoAlreadySet = TRUE;
}
rlci = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
rlci = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (rlci == NULL) {
/* Allocate new info struct for this frame */
rlci = (rlc_info *)wmem_alloc0(wmem_file_scope(), sizeof(rlc_info));
@ -2649,10 +2649,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, 0, fpi);
p_add_proto_data(wmem_file_scope(), pinfo, proto_fp, 0, fpi);
}
if (!rlcInfoAlreadySet) {
p_add_proto_data(pinfo->fd, proto_rlc, 0, rlci);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0, rlci);
}
/**************************************/
@ -2717,8 +2717,8 @@ rlc_is_ciphered(packet_info * pinfo){
return global_rlc_ciphered;
}
fpinf = (fp_info *)p_get_proto_data(pinfo->fd, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
return ((rlcinf && fpinf && (rlcinf->ciphered[fpinf->cur_tb] == TRUE) && (rlcinf->deciphered[fpinf->cur_tb] == FALSE))
|| global_rlc_ciphered);

View File

@ -123,7 +123,7 @@ void fec_decode_ext_fti(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
fec_data = wmem_new0(wmem_file_scope(), fec_packet_data_t);
fec_data->instance_id = instance_id;
p_add_proto_data(pinfo->fd, proto_rmt_fec, 0, fec_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rmt_fec, 0, fec_data);
}
if (encoding_id == 6){
@ -194,7 +194,7 @@ dissect_fec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
guint offset = 0;
fec_data_exchange_t* fec = (fec_data_exchange_t*)data;
guint8 encoding_id = 0;
fec_packet_data_t* packet_data = (fec_packet_data_t*)p_get_proto_data(pinfo->fd, proto_rmt_fec, 0);
fec_packet_data_t* packet_data = (fec_packet_data_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_rmt_fec, 0);
if (fec != NULL)
{

View File

@ -255,7 +255,7 @@ static guint dissect_feccode(proto_tree *tree, tvbuff_t *tvb, guint offset,
norm_data = wmem_new0(wmem_file_scope(), norm_packet_data_t);
norm_data->encoding_id = encoding_id;
p_add_proto_data(pinfo->fd, proto_rmt_norm, 0, norm_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rmt_norm, 0, norm_data);
proto_tree_add_item(tree, hf_fec_encoding_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++;
if (reserved) {
@ -283,7 +283,7 @@ static guint dissect_norm_hdrext(proto_tree *tree, packet_info *pinfo,
tvbuff_t *tvb, guint offset, guint8 hlen)
{
lct_data_exchange_t data_exchange;
norm_packet_data_t* packet_data = (norm_packet_data_t*)p_get_proto_data(pinfo->fd, proto_rmt_norm, 0);
norm_packet_data_t* packet_data = (norm_packet_data_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_rmt_norm, 0);
memset(&data_exchange, 0, sizeof(data_exchange));
@ -386,7 +386,7 @@ static void dissect_norm_info(proto_tree *tree, packet_info *pinfo, tvbuff_t *tv
norm_data = wmem_new0(wmem_file_scope(), norm_packet_data_t);
norm_data->encoding_id = tvb_get_guint8(tvb, offset);
p_add_proto_data(pinfo->fd, proto_rmt_norm, 0, norm_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rmt_norm, 0, norm_data);
proto_tree_add_item(tree, hf_fec_encoding_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++;
proto_tree_add_item(tree, hf_object_transport_id, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;

View File

@ -853,10 +853,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, 0, rohc_cid_context);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rohc, 0, rohc_cid_context);
}
}else{
rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc, 0);
rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_rohc, 0);
}
if(!rohc_cid_context){
@ -1878,7 +1878,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, 0, rohc_cid_context);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rohc, 0, rohc_cid_context);
}else{
rohc_cid_context = wmem_new(wmem_file_scope(), rohc_cid_context_t);
rohc_cid_context->large_cid_present = p_rohc_info->large_cid_present;
@ -1895,11 +1895,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, 0, rohc_cid_context);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_rohc, 0);
}
switch(profile){
@ -1999,7 +1999,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, 0, rohc_cid_context);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rohc, 0, rohc_cid_context);
}else{
rohc_cid_context = wmem_new(wmem_file_scope(), rohc_cid_context_t);
/*rohc_cid_context->rohc_ip_version;*/
@ -2016,11 +2016,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, 0, rohc_cid_context);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_rohc, 0);
}
proto_tree_add_item(ir_tree, hf_rohc_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
@ -2092,7 +2092,7 @@ dissect_rohc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
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, 0);
rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_rohc, 0);
if(rohc_cid_context){
/* Do we have info from an IR frame? */
if(rohc_cid_context->ir_frame_number>0){
@ -2275,9 +2275,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, 0, rohc_cid_context);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rohc, 0, rohc_cid_context);
} else {
rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(pinfo->fd, proto_rohc, 0);
rohc_cid_context = (rohc_cid_context_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_rohc, 0);
}
/* Call IP for uncompressed*/

View File

@ -16436,7 +16436,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, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_rrc_RB_ActivationTimeInfo, RB_ActivationTimeInfo_sequence);
@ -20523,10 +20523,10 @@ dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
#line 792 "../../asn1/rrc/rrc.cnf"
rrcinf = (struct rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0);
rrcinf = (struct rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
if (!rrcinf) {
rrcinf = wmem_new0(wmem_file_scope(), struct rrc_info);
p_add_proto_data(actx->pinfo->fd, proto_rrc, 0, rrcinf);
p_add_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0, rrcinf);
}
rrcinf->hrnti[actx->pinfo->fd->subnum] = tvb_get_ntohs(hrnti_tvb, 0);
@ -41410,7 +41410,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, 0);
rrcinf = (rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
}
@ -44885,7 +44885,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, 0);
rrcinf = (rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
}
@ -87528,7 +87528,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, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
/*If no info found, skip all this*/
if(fpinf == NULL){
@ -97699,7 +97699,7 @@ fp_info *fpinf ;
ett_rrc_SecurityModeComplete, SecurityModeComplete_sequence);
fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, 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;
}
@ -143569,7 +143569,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, 0);
rrcinf = (struct rrc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rrc, 0);
/* make entry in the Protocol column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");

View File

@ -174,12 +174,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, hfi_rsync->id, 0);
rsync_frame_data_p = (struct rsync_frame_data *)p_get_proto_data(wmem_file_scope(), pinfo, hfi_rsync->id, 0);
if (!rsync_frame_data_p) {
/* then we haven't seen this frame before */
rsync_frame_data_p = wmem_new(wmem_file_scope(), struct rsync_frame_data);
rsync_frame_data_p->state = (me == SERVER) ? conversation_data->server_state : conversation_data->client_state;
p_add_proto_data(pinfo->fd, hfi_rsync->id, 0, rsync_frame_data_p);
p_add_proto_data(wmem_file_scope(), pinfo, hfi_rsync->id, 0, rsync_frame_data_p);
}
if (me == SERVER) {

View File

@ -2501,7 +2501,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, 0);
p_conv_data = (struct _rtcp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rtcp, 0);
if (!p_conv_data)
{
@ -2523,7 +2523,7 @@ void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
p_conv_packet_data = (struct _rtcp_conversation_info *)wmem_memdup(wmem_file_scope(),
p_conv_data, sizeof(struct _rtcp_conversation_info));
p_add_proto_data(pinfo->fd, proto_rtcp, 0, p_conv_packet_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rtcp, 0, p_conv_packet_data);
}
}
}
@ -2570,7 +2570,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, 0);
p_packet_data = (struct _rtcp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rtcp, 0);
if (p_packet_data && p_packet_data->last_received_set &&
(p_packet_data->last_received_frame_number >= pinfo->fd->num))
{
@ -2631,7 +2631,7 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr)
{
p_packet_data = wmem_new0(wmem_file_scope(), struct _rtcp_conversation_info);
p_add_proto_data(pinfo->fd, proto_rtcp, 0, p_packet_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rtcp, 0, p_packet_data);
}
/* Copy current conversation data into packet info */
@ -2662,7 +2662,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, 0);
p_packet_data = (struct _rtcp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rtcp, 0);
if (p_packet_data && p_packet_data->lsr_matched)
{
/* Show info. */
@ -2701,7 +2701,7 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo,
p_packet_data = wmem_new0(wmem_file_scope(), struct _rtcp_conversation_info);
/* Set as packet info */
p_add_proto_data(pinfo->fd, proto_rtcp, 0, p_packet_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rtcp, 0, p_packet_data);
}
/* Don't allow match seemingly calculated from same (or later!) frame */

View File

@ -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"), 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, 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

View File

@ -1079,7 +1079,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, 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, 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;
@ -1201,7 +1201,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, 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rtp, 0);
if(p_conv_data != NULL)
finfo = p_conv_data->rtp_conv_info;
@ -1403,7 +1403,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, 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rtp, 0);
/* Add try to RFC 2198 data */
ti = proto_tree_add_text(tree, tvb, offset, -1, "RFC 2198: Redundant Audio Data");
@ -1739,7 +1739,7 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
/* 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, 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rtp, 0);
if (p_conv_data)
rtp_info->info_is_video = p_conv_data->is_video;
@ -1750,7 +1750,7 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
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, 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rtp, 0);
#if 0 /* XXX: srtp_offset never actually used ?? */
if (p_conv_data && p_conv_data->srtp_info) {
@ -2229,7 +2229,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, 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rtp, 0);
if (!p_conv_data)
{
@ -2256,7 +2256,7 @@ get_conv_info(packet_info *pinfo, struct _rtp_info *rtp_info)
p_conv_packet_data->srtp_info = p_conv_data->srtp_info;
p_conv_packet_data->bta2dp_info = p_conv_data->bta2dp_info;
p_conv_packet_data->btvdp_info = p_conv_data->btvdp_info;
p_add_proto_data(pinfo->fd, proto_rtp, 0, p_conv_packet_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rtp, 0, p_conv_packet_data);
/* calculate extended sequence number */
seqno = calculate_extended_seqno(p_conv_data->extended_seqno,
@ -2281,7 +2281,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, 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rtp, 0);
if (!p_conv_data) return;

View File

@ -491,7 +491,7 @@ static void sctp_both_prompt(packet_info *pinfo _U_, gchar* result)
static void sctp_ppi_prompt1(packet_info *pinfo _U_, gchar* result)
{
guint32 ppid = GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_sctp, 0));
guint32 ppid = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_sctp, 0));
if (ppid == LAST_PPID) {
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "PPID (none)");
@ -502,7 +502,7 @@ static void sctp_ppi_prompt1(packet_info *pinfo _U_, gchar* result)
static void sctp_ppi_prompt2(packet_info *pinfo _U_, gchar* result)
{
guint32 ppid = GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_sctp, 1));
guint32 ppid = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_sctp, 1));
if (ppid == LAST_PPID) {
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "PPID (none)");
@ -513,12 +513,12 @@ static void sctp_ppi_prompt2(packet_info *pinfo _U_, gchar* result)
static gpointer sctp_ppi_value1(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_sctp, 0);
return p_get_proto_data(pinfo->pool, pinfo, proto_sctp, 0);
}
static gpointer sctp_ppi_value2(packet_info *pinfo)
{
return p_get_proto_data(pinfo->fd, proto_sctp, 1);
return p_get_proto_data(pinfo->pool, pinfo, proto_sctp, 1);
}
@ -2863,12 +2863,12 @@ dissect_data_chunk(tvbuff_t *chunk_tvb,
/* insert the PPID in the pinfo structure if it is not already there and there is still room */
for(number_of_ppid = 0; number_of_ppid < MAX_NUMBER_OF_PPIDS; number_of_ppid++) {
ppid = GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_sctp, number_of_ppid));
ppid = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_sctp, number_of_ppid));
if ((ppid == LAST_PPID) || (ppid == payload_proto_id))
break;
}
if ((number_of_ppid < MAX_NUMBER_OF_PPIDS) && (ppid == LAST_PPID))
p_add_proto_data(pinfo->fd, proto_sctp, number_of_ppid, GUINT_TO_POINTER(payload_proto_id));
p_add_proto_data(pinfo->pool, pinfo, proto_sctp, number_of_ppid, GUINT_TO_POINTER(payload_proto_id));
e_bit = tvb_get_guint8(chunk_tvb, CHUNK_FLAGS_OFFSET) & SCTP_DATA_CHUNK_E_BIT;
b_bit = tvb_get_guint8(chunk_tvb, CHUNK_FLAGS_OFFSET) & SCTP_DATA_CHUNK_B_BIT;
@ -4131,7 +4131,7 @@ dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
for(number_of_ppid = 0; number_of_ppid < MAX_NUMBER_OF_PPIDS; number_of_ppid++) {
p_add_proto_data(pinfo->fd, proto_sctp, number_of_ppid, GUINT_TO_POINTER(LAST_PPID));
p_add_proto_data(pinfo->pool, pinfo, proto_sctp, number_of_ppid, GUINT_TO_POINTER(LAST_PPID));
}
/* The tvb array in struct _sctp_info is huge: currently 2k pointers.

View File

@ -925,7 +925,7 @@ region_lookup(packet_info *pinfo, guint32 base_addr)
fm_conversation *conv;
fastser_dataregion *dataregion = NULL;
conv = (fm_conversation *)p_get_proto_data(pinfo->fd, proto_selfm, 0);
conv = (fm_conversation *)p_get_proto_data(wmem_file_scope(), pinfo, proto_selfm, 0);
if (conv) {
dataregion = (fastser_dataregion*)wmem_tree_lookup32(conv->fastser_dataregions, base_addr);
}
@ -1140,7 +1140,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, 0);
conv = (fm_conversation *)p_get_proto_data(wmem_file_scope(), pinfo, proto_selfm, 0);
if (conv) {
wmem_list_frame_t *frame = wmem_list_head(conv->fm_config_frames);
@ -1636,7 +1636,7 @@ dissect_fastser_readresp_frame(tvbuff_t *tvb, proto_tree *fastser_tree, packet_i
if (payload_tvb) {
/* Search for previously-encountered data format reference information to dissect the frame */
conv = (fm_conversation *)p_get_proto_data(pinfo->fd, proto_selfm, 0);
conv = (fm_conversation *)p_get_proto_data(wmem_file_scope(), pinfo, proto_selfm, 0);
if (conv) {
/* Start at front of list and cycle through possible instances of multiple fastser_dataitem frames, looking for match */
@ -2285,7 +2285,7 @@ dissect_selfm(tvbuff_t *selfm_tvb, packet_info *pinfo, proto_tree *tree, void* d
conversation_add_proto_data(conversation, proto_selfm, (void *)fm_conv_data);
}
p_add_proto_data(pinfo->fd, proto_selfm, 0, fm_conv_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_selfm, 0, fm_conv_data);
/* 1. Configuration frames (0xA5C1, 0xA5C2, 0xA5C3) need special treatment during the first run */
/* For each Fast Meter Configuration frame (0xA5Cx), a 'fm_config_frame' struct is created to hold the */

View File

@ -1072,12 +1072,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, 0);
pres_ctx_id = (guint32 *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ses, 0);
if (ses_rtse_reassemble != 0 && !pres_ctx_id) {
/* First time visited - save pres_ctx_id */
pres_ctx_id = wmem_new(wmem_file_scope(), guint32);
*pres_ctx_id = ses_pres_ctx_id;
p_add_proto_data (pinfo->fd, proto_ses, 0, pres_ctx_id);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ses, 0, pres_ctx_id);
}
if (pres_ctx_id) {
session.pres_ctx_id = *pres_ctx_id;

View File

@ -3641,7 +3641,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, pinfo->curr_layer_num);
sip_frame_result = (sip_frame_result_value*)p_get_proto_data(wmem_file_scope(), pinfo, proto_sip, pinfo->curr_layer_num);
if (sip_frame_result != NULL)
{
return sip_frame_result->original_frame_num;
@ -3787,11 +3787,11 @@ guint sip_is_packet_resend(packet_info *pinfo,
break;
}
sip_frame_result = (sip_frame_result_value *)p_get_proto_data(pinfo->fd, proto_sip, pinfo->curr_layer_num);
sip_frame_result = (sip_frame_result_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_sip, pinfo->curr_layer_num);
if (sip_frame_result == NULL)
{
sip_frame_result = wmem_new0(wmem_file_scope(), sip_frame_result_value);
p_add_proto_data(pinfo->fd, proto_sip, pinfo->curr_layer_num, sip_frame_result);
p_add_proto_data(wmem_file_scope(), pinfo, proto_sip, pinfo->curr_layer_num, sip_frame_result);
}
/* Store return value with this packet */
@ -3839,7 +3839,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, pinfo->curr_layer_num);
sip_frame_result = (sip_frame_result_value*)p_get_proto_data(wmem_file_scope(), pinfo, proto_sip, pinfo->curr_layer_num);
if (sip_frame_result != NULL)
{
*response_time = sip_frame_result->response_time;
@ -3890,12 +3890,12 @@ 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, pinfo->curr_layer_num);
sip_frame_result = (sip_frame_result_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_sip, pinfo->curr_layer_num);
if (sip_frame_result == NULL)
{
/* Allocate and set all values to zero */
sip_frame_result = wmem_new0(wmem_file_scope(), sip_frame_result_value);
p_add_proto_data(pinfo->fd, proto_sip, pinfo->curr_layer_num, sip_frame_result);
p_add_proto_data(wmem_file_scope(), pinfo, proto_sip, pinfo->curr_layer_num, sip_frame_result);
}
sip_frame_result->response_request_frame_num = result;
@ -3953,7 +3953,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, pinfo->curr_layer_num);
sip_frame_result = (sip_frame_result_value*)p_get_proto_data(wmem_file_scope(), pinfo, proto_sip, pinfo->curr_layer_num);
if (sip_frame_result != NULL)
{
*response_time = sip_frame_result->response_time;
@ -4009,12 +4009,12 @@ 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, pinfo->curr_layer_num);
sip_frame_result = (sip_frame_result_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_sip, pinfo->curr_layer_num);
if (sip_frame_result == NULL)
{
/* Allocate and set all values to zero */
sip_frame_result = wmem_new0(wmem_file_scope(), sip_frame_result_value);
p_add_proto_data(pinfo->fd, proto_sip, pinfo->curr_layer_num, sip_frame_result);
p_add_proto_data(wmem_file_scope(), pinfo, proto_sip, pinfo->curr_layer_num, sip_frame_result);
}
sip_frame_result->response_request_frame_num = result;

View File

@ -440,7 +440,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, 0);
spd_frame_data = (struct smtp_proto_data *)p_get_proto_data(wmem_file_scope(), pinfo, proto_smtp, 0);
if (!spd_frame_data) {
@ -457,7 +457,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, 0, spd_frame_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_smtp, 0, spd_frame_data);
}

View File

@ -398,7 +398,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, 0);
sock_state_t* state_info = (sock_state_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_socks, 0);
if ((state_info != NULL) && (state_info->client == clientNoInit)) {
state_info->client = state;
}
@ -407,7 +407,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, 0);
sock_state_t* state_info = (sock_state_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_socks, 0);
if ((state_info != NULL) && (state_info->server == serverNoInit)) {
state_info->server = state;
}
@ -994,14 +994,14 @@ dissect_socks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
guint8 version;
struct tcpinfo *tcpinfo = (struct tcpinfo*)data;
state_info = (sock_state_t *)p_get_proto_data(pinfo->fd, proto_socks, 0);
state_info = (sock_state_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_socks, 0);
if (state_info == NULL) {
state_info = wmem_new(wmem_file_scope(), 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, 0, state_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_socks, 0, state_info);
}
/* avoid recursive overflow */

View File

@ -278,12 +278,10 @@ dissect_soupbintcp_common(
wmem_file_scope(),
sizeof(struct pdu_data));
pdu_data->seq_num = this_seq;
p_add_proto_data(pinfo->fd, proto_soupbintcp, 0, pdu_data);
p_add_proto_data(wmem_file_scope(), pinfo, proto_soupbintcp, 0, pdu_data);
}
} else {
pdu_data = (struct pdu_data *)p_get_proto_data(
pinfo->fd,
proto_soupbintcp, 0);
pdu_data = (struct pdu_data *)p_get_proto_data(wmem_file_scope(), pinfo, proto_soupbintcp, 0);
if (pdu_data) {
this_seq = pdu_data->seq_num;
} else {

View File

@ -3072,11 +3072,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, 0);
per_packet_info = (spice_packet_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_spice, 0);
if (!per_packet_info) {
per_packet_info = wmem_new(wmem_file_scope(), spice_packet_t);
per_packet_info->state = spice_info->next_state;
p_add_proto_data(pinfo->fd, proto_spice, 0, per_packet_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_spice, 0, per_packet_info);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Spice");

View File

@ -1741,7 +1741,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, 0);
next_level_value = (gssapi_oid_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_spnego, 0);
if (!next_level_value && !pinfo->fd->flags.visited) {
/*
* No handle attached to this frame, but it's the first
@ -1757,7 +1757,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, 0, next_level_value);
p_add_proto_data(wmem_file_scope(), pinfo, proto_spnego, 0, next_level_value);
}
}

View File

@ -338,7 +338,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, 0);
p_sscop_info = (struct _sscop_payload_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_sscop, 0);
if ( p_sscop_info
&& ( subdissector = p_sscop_info->subdissector )

View File

@ -3723,11 +3723,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, 0);
pi = (SslPacketInfo *)p_get_proto_data(wmem_file_scope(), pinfo, proto, 0);
if (!pi)
{
pi = (SslPacketInfo *)wmem_alloc0(wmem_file_scope(), sizeof(SslPacketInfo));
p_add_proto_data(pinfo->fd, proto, 0, pi);
p_add_proto_data(wmem_file_scope(), pinfo, proto, 0, pi);
}
real_data = (guchar *)wmem_alloc(wmem_file_scope(), data_len);
@ -3749,7 +3749,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, 0);
pi = (SslPacketInfo *)p_get_proto_data(wmem_file_scope(), pinfo, proto, 0);
if (!pi)
return NULL;
@ -3768,11 +3768,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, 0);
pi = (SslPacketInfo *)p_get_proto_data(wmem_file_scope(), pinfo, proto, 0);
if (!pi)
{
pi = (SslPacketInfo *)wmem_alloc0(wmem_file_scope(), sizeof(SslPacketInfo));
p_add_proto_data(pinfo->fd, proto, 0, pi);
p_add_proto_data(wmem_file_scope(), pinfo, proto, 0, pi);
}
rec = (SslDataInfo *)wmem_alloc(wmem_file_scope(), sizeof(SslDataInfo)+data_len);
@ -3803,7 +3803,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, 0);
pi = (SslPacketInfo *)p_get_proto_data(wmem_file_scope(), pinfo, proto, 0);
if (!pi) return NULL;

View File

@ -533,7 +533,7 @@ static int dissect_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
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, 0, conf);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
conf = (config_frame *)p_get_proto_data(wmem_file_scope(), pinfo, proto_synphasor, 0);
if (conf) {
/* check if the size of the current frame is the

View File

@ -1014,7 +1014,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, 0);
p_t38_packet_conv = (t38_conv *)p_get_proto_data(wmem_file_scope(), pinfo, proto_t38, 0);
/* find the conversation used for Reassemble and Setup Info */
@ -1071,7 +1071,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, 0, p_t38_packet_conv);
p_add_proto_data(wmem_file_scope(), pinfo, proto_t38, 0, p_t38_packet_conv);
}
if (ADDRESSES_EQUAL(&p_conv->key_ptr->addr1, &pinfo->net_src)) {

View File

@ -642,7 +642,7 @@ tcp_calculate_timestamps(packet_info *pinfo, struct tcp_analysis *tcpd,
{
if( !tcppd ) {
tcppd = wmem_new(wmem_file_scope(), struct tcp_per_packet_data_t);
p_add_proto_data(pinfo->fd, proto_tcp, 0, tcppd);
p_add_proto_data(wmem_file_scope(), pinfo, proto_tcp, 0, tcppd);
}
if (!tcpd)
@ -674,7 +674,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, 0);
tcppd = (struct tcp_per_packet_data_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_tcp, 0);
if( tcppd ) {
item = proto_tree_add_time(tree, hf_tcp_ts_delta, tvb, 0, 0,
@ -4174,7 +4174,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, 0);
tcppd = (struct tcp_per_packet_data_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_tcp, 0);
/*
* Calculate the timestamps relative to this conversation (but only on the

View File

@ -391,7 +391,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, 0) ) ) {
if ( ! ( frag = (ts2_frag *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ts2, 0) ) ) {
frag = wmem_new(wmem_file_scope(), ts2_frag);
frag->frag_num=0;
}
@ -415,11 +415,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, 0, frag);
p_add_proto_data(wmem_file_scope(), pinfo, proto_ts2, 0, frag);
}
/* Get our stored fragmentation data */
frag = (ts2_frag *)p_get_proto_data(pinfo->fd, proto_ts2, 0);
frag = (ts2_frag *)p_get_proto_data(wmem_file_scope(), pinfo, 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);

View File

@ -317,7 +317,7 @@ decode_udp_ports(tvbuff_t *tvb, int offset, packet_info *pinfo,
gboolean prev_heur_found = FALSE;
if (pinfo->fd->flags.visited) {
udp_p_info = (udp_p_info_t*)p_get_proto_data(pinfo->fd, hfi_udp->id, pinfo->curr_layer_num);
udp_p_info = (udp_p_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, hfi_udp->id, pinfo->curr_layer_num);
if (udp_p_info) {
prev_heur_found = udp_p_info->found_heuristic;
}
@ -363,7 +363,7 @@ decode_udp_ports(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (!udp_p_info) {
udp_p_info = wmem_new0(wmem_file_scope(), udp_p_info_t);
udp_p_info->found_heuristic = TRUE;
p_add_proto_data(pinfo->fd, hfi_udp->id, curr_layer_num, udp_p_info);
p_add_proto_data(wmem_file_scope(), pinfo, hfi_udp->id, curr_layer_num, udp_p_info);
}
return;
}
@ -407,7 +407,7 @@ decode_udp_ports(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (!udp_p_info) {
udp_p_info = wmem_new0(wmem_file_scope(), udp_p_info_t);
udp_p_info->found_heuristic = TRUE;
p_add_proto_data(pinfo->fd, hfi_udp->id, curr_layer_num, udp_p_info);
p_add_proto_data(wmem_file_scope(), pinfo, hfi_udp->id, curr_layer_num, udp_p_info);
}
return;
}

View File

@ -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, 0);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, 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);
@ -3019,7 +3019,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, 0, mac_is_info);
p_add_proto_data(wmem_file_scope(), pinfo, 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 {
@ -3085,8 +3085,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, 0);
macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
/**************************************/
/* HS-DCH data here (type 1 in R7) */
@ -3287,8 +3287,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, 0);
macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
/********************************/
/* HS-DCH type 2 data here */
@ -3525,8 +3525,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, 0);
macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
/********************************/
/* HS-DCH type 2 data here */
@ -3734,7 +3734,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, 0);
p_fp_info = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
/* if no FP info is present, this might be FP in a pcap(ng) file */
if (!p_fp_info) {
@ -3823,7 +3823,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
gint *cur_val=NULL;
fpi = wmem_new0(wmem_file_scope(), fp_info);
p_add_proto_data(pinfo->fd, proto_fp, 0, fpi);
p_add_proto_data(wmem_file_scope(), pinfo, proto_fp, 0, fpi);
fpi->iface_type = p_conv_data->iface_type;
fpi->division = p_conv_data->division;
@ -3865,7 +3865,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, 0, macinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0, macinf);
rlcinf = wmem_new0(wmem_file_scope(), rlc_info);
@ -3908,7 +3908,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, 0, rlcinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0, rlcinf);
return fpi;
@ -3930,7 +3930,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
/* macinf = wmem_new0(wmem_file_scope(), umts_mac_info);
macinf->content[0] = MAC_CONTENT_PS_DTCH;*/
p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0, macinf);
/* For RLC re-assembly to work we need a urnti signaled from NBAP */
@ -3940,7 +3940,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, 0, rlcinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0, rlcinf);
return fpi;
@ -4063,8 +4063,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, 0, macinf);
p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0, macinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0, rlcinf);
/* Set offset to point to first TFI
* the Number of TFI's = number of DCH's in the flow
*/
@ -4084,7 +4084,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
macinf = wmem_new0(wmem_file_scope(), umts_mac_info);
macinf->ctmux[0] = 1;
macinf->content[0] = MAC_CONTENT_DCCH;
p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0, macinf);
/* Set RLC data */
rlcinf = wmem_new0(wmem_file_scope(), rlc_info);
/* Make configurable ?(avaliable in NBAP?) */
@ -4095,7 +4095,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, 0, rlcinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0, rlcinf);
break;
case CHANNEL_RACH_FDD:
@ -4119,14 +4119,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,0, macinf);
p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_mac,0, macinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0, rlcinf);
break;
case CHANNEL_HSDSCH_COMMON:
rlcinf = wmem_new0(wmem_file_scope(), rlc_info);
macinf = wmem_new0(wmem_file_scope(), umts_mac_info);
p_add_proto_data(pinfo->fd, proto_umts_mac, 0, macinf);
p_add_proto_data(pinfo->fd, proto_rlc, 0, rlcinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0, macinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0, rlcinf);
break;
default:
expert_add_info(pinfo, NULL, &ei_fp_transport_channel_type_unknown);
@ -4176,7 +4176,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, 0);
p_fp_info = (struct fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
/* Check if we have conversation info */
p_conv = (conversation_t *)find_conversation(pinfo->fd->num, &pinfo->net_dst, &pinfo->net_src,
@ -4237,7 +4237,7 @@ dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
rlcinf = (rlc_info *)p_get_proto_data(pinfo->fd, proto_rlc, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
/* Show release information */
if (preferences_show_release_info) {

View File

@ -296,9 +296,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, 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);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (!macinf || !fpinf) {
proto_tree_add_expert(rach_tree, pinfo, &ei_mac_per_frame_info_missing, tvb, 0, -1);
return;
@ -386,9 +386,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, 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);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (!macinf || !fpinf) {
proto_tree_add_expert(fach_tree, pinfo, &ei_mac_per_frame_info_missing, tvb, 0, -1);
@ -465,10 +465,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, 0);
rrcinf = (rrc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rrc, 0);
if (!rrcinf) {
rrcinf = wmem_new0(wmem_file_scope(), struct rrc_info);
p_add_proto_data(pinfo->fd, proto_rrc, 0, rrcinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_rrc, 0, rrcinf);
}
rrcinf->msgtype[fpinf->cur_tb] = RRC_MESSAGE_TYPE_BCCH_FACH;
@ -504,9 +504,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, 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);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
if (!macinf || !fpinf) {
if(!macinf){
g_warning("MACinf == NULL");
@ -944,9 +944,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, 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);
umts_mac_is_info * mac_is_info = (umts_mac_is_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
rlc_info * rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
struct fp_info *p_fp_info = (struct fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
DISSECTOR_ASSERT(mac_is_info != NULL && rlcinf != NULL && p_fp_info != NULL);
@ -1015,9 +1015,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, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
if (!macinf|| !fpinf) {
proto_tree_add_expert(edch_tree, pinfo, &ei_mac_per_frame_info_missing, tvb, 0, -1);
return;
@ -1092,8 +1092,8 @@ static void dissect_mac_fdd_hsdsch_common(tvbuff_t *tvb, packet_info *pinfo, pro
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, 0);
macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac);
if (!macinf) {
proto_tree_add_expert(hsdsch_tree, pinfo, &ei_mac_per_frame_info_missing, tvb, 0, -1);
@ -1149,8 +1149,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, 0);
macinf = (umts_mac_info *)p_get_proto_data(pinfo->fd, proto_umts_mac, 0);
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
macinf = (umts_mac_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0);
pos = fpinf->cur_tb;
bitoffs = fpinf->hsdsch_entity == ehs ? 0 : 4; /*No MAC-d header for type 2*/
@ -1167,7 +1167,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, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc, 0);
rlcinf->rbid[pos] = macinf->lchid[pos];
rlcinf->mode[pos] = lchId_rlc_map[macinf->lchid[pos]]; /*Look up RLC mode*/
bitoffs += 4;

View File

@ -467,10 +467,10 @@ static void vnc_server_ring_bell(tvbuff_t *tvb, packet_info *pinfo,
gint *offset, proto_tree *tree);
static guint vnc_server_cut_text(tvbuff_t *tvb, packet_info *pinfo,
gint *offset, proto_tree *tree);
static void vnc_set_bytes_per_pixel(const packet_info *pinfo, const guint8 bytes_per_pixel);
static void vnc_set_depth(const packet_info *pinfo, const guint8 depth);
static guint8 vnc_get_bytes_per_pixel(const packet_info *pinfo);
static guint8 vnc_get_depth(const packet_info *pinfo);
static void vnc_set_bytes_per_pixel(packet_info *pinfo, const guint8 bytes_per_pixel);
static void vnc_set_depth(packet_info *pinfo, const guint8 depth);
static guint8 vnc_get_bytes_per_pixel(packet_info *pinfo);
static guint8 vnc_get_depth(packet_info *pinfo);
static guint32 vnc_extended_desktop_size(tvbuff_t *tvb, gint *offset, proto_tree *tree);
static guint vnc_supported_messages(tvbuff_t *tvb, gint *offset,
@ -1008,7 +1008,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, 0);
per_packet_info = (vnc_packet_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_vnc, 0);
if(!per_packet_info) {
per_packet_info = wmem_new(wmem_file_scope(), vnc_packet_t);
@ -1016,7 +1016,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, 0, per_packet_info);
p_add_proto_data(wmem_file_scope(), pinfo, proto_vnc, 0, per_packet_info);
}
/* Packet dissection follows */
@ -1716,7 +1716,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, 0);
per_packet_info = (vnc_packet_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_vnc, 0);
/* Our calling function should have set the packet's proto data already */
DISSECTOR_ASSERT(per_packet_info != NULL);
@ -2948,7 +2948,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, 0);
per_packet_info = (vnc_packet_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_vnc, 0);
/* Our calling function should have set the packet's proto data already */
DISSECTOR_ASSERT(per_packet_info != NULL);
@ -2989,7 +2989,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, 0);
per_packet_info = (vnc_packet_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_vnc, 0);
/* Our calling function should have set the packet's proto data already */
DISSECTOR_ASSERT(per_packet_info != NULL);
@ -3273,11 +3273,11 @@ vnc_server_cut_text(tvbuff_t *tvb, packet_info *pinfo, gint *offset,
static void
vnc_set_bytes_per_pixel(const packet_info *pinfo, const guint8 bytes_per_pixel)
vnc_set_bytes_per_pixel(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, 0);
per_packet_info = (vnc_packet_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_vnc, 0);
/* Our calling function should have set the packet's proto data already */
DISSECTOR_ASSERT(per_packet_info != NULL);
@ -3286,11 +3286,11 @@ vnc_set_bytes_per_pixel(const packet_info *pinfo, const guint8 bytes_per_pixel)
static void
vnc_set_depth(const packet_info *pinfo, const guint8 depth)
vnc_set_depth(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, 0);
per_packet_info = (vnc_packet_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_vnc, 0);
/* Our calling function should have set the packet's proto data already */
DISSECTOR_ASSERT(per_packet_info != NULL);
@ -3299,11 +3299,11 @@ vnc_set_depth(const packet_info *pinfo, const guint8 depth)
static guint8
vnc_get_bytes_per_pixel(const packet_info *pinfo)
vnc_get_bytes_per_pixel(packet_info *pinfo)
{
vnc_packet_t *per_packet_info;
per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc, 0);
per_packet_info = (vnc_packet_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_vnc, 0);
/* Our calling function should have set the packet's proto data already */
DISSECTOR_ASSERT(per_packet_info != NULL);
@ -3312,11 +3312,11 @@ vnc_get_bytes_per_pixel(const packet_info *pinfo)
static guint8
vnc_get_depth(const packet_info *pinfo)
vnc_get_depth(packet_info *pinfo)
{
vnc_packet_t *per_packet_info;
per_packet_info = (vnc_packet_t *)p_get_proto_data(pinfo->fd, proto_vnc, 0);
per_packet_info = (vnc_packet_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_vnc, 0);
/* Our calling function should have set the packet's proto data already */
DISSECTOR_ASSERT(per_packet_info != NULL);

View File

@ -575,7 +575,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, 0);
pdata_ptr = (wcp_pdata_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_wcp, 0);
if ( !pdata_ptr) { /* exit if no data */
REPORT_DISSECTOR_BUG("Can't find uncompressed data");
@ -589,7 +589,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, 0, (void*)pdata_ptr);
p_add_proto_data(wmem_file_scope(), pinfo, proto_wcp, 0, (void*)pdata_ptr);
buf_ptr->buf_cur = dst;
}

View File

@ -1177,7 +1177,7 @@ dissect_zbee_aps_transport_key(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
offset += ZBEE_APS_CMD_KEY_LENGTH;
/* Update the key ring for this pan */
if ( !pinfo->fd->flags.visited && (nwk_hints = (zbee_nwk_hints_t *)p_get_proto_data(pinfo->fd,
if ( !pinfo->fd->flags.visited && (nwk_hints = (zbee_nwk_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo,
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);

View File

@ -372,13 +372,13 @@ dissect_zbee_nwk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
if (!pinfo->fd->flags.visited) {
/* Allocate frame data with hints for upper layers */
nwk_hints = wmem_new0(wmem_file_scope(), zbee_nwk_hints_t);
p_add_proto_data(pinfo->fd, proto_zbee_nwk, 0, nwk_hints);
p_add_proto_data(wmem_file_scope(), pinfo, 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, 0);
nwk_hints = (zbee_nwk_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_zbee_nwk, 0);
}
ieee_hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd,
ieee_hints = (ieee802154_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo,
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. */

View File

@ -452,9 +452,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,
nwk_hints = (zbee_nwk_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo,
proto_get_id_by_filter_name(ZBEE_PROTOABBREV_NWK), 0);
ieee_hints = (ieee802154_hints_t *)p_get_proto_data(pinfo->fd,
ieee_hints = (ieee802154_hints_t *)p_get_proto_data(wmem_file_scope(), pinfo,
proto_get_id_by_filter_name(IEEE802154_PROTOABBREV_WPAN), 0);
/* Create a subtree for the security information. */

View File

@ -256,6 +256,7 @@ epan_dissect_reset(epan_dissect_t *edt)
g_assert(edt);
g_slist_free(edt->pi.proto_data);
g_slist_free(edt->pi.dependent_frames);
/* Free the data sources list. */
@ -328,6 +329,7 @@ epan_dissect_cleanup(epan_dissect_t* edt)
{
g_assert(edt);
g_slist_free(edt->pi.proto_data);
g_slist_free(edt->pi.dependent_frames);
/* Free the data sources list. */

View File

@ -33,6 +33,7 @@
#include <epan/emem.h>
#include <epan/wmem/wmem.h>
#include <epan/timestamp.h>
#include <epan/packet_info.h>
/* Protocol-specific data attached to a frame_data structure - protocol
@ -67,23 +68,31 @@ p_compare(gconstpointer a, gconstpointer b)
}
void
p_add_proto_data(frame_data *fd, int proto, guint8 key, void *proto_data)
p_add_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint8 key, void *proto_data)
{
frame_proto_data *p1 = (frame_proto_data *)wmem_alloc(wmem_file_scope(), sizeof(frame_proto_data));
frame_proto_data *p1;
GSList** proto_list;
if (scope == pinfo->pool) {
p1 = (frame_proto_data *)wmem_alloc(scope, sizeof(frame_proto_data));
proto_list = &pinfo->proto_data;
} else {
p1 = (frame_proto_data *)wmem_alloc(wmem_file_scope(), sizeof(frame_proto_data));
proto_list = &pinfo->fd->pfd;
}
p1->proto = proto;
p1->key = key;
p1->proto_data = proto_data;
/* Add it to the GSLIST */
fd -> pfd = g_slist_insert_sorted(fd -> pfd,
*proto_list = g_slist_insert_sorted(*proto_list,
(gpointer *)p1,
p_compare);
}
void *
p_get_proto_data(frame_data *fd, int proto, guint8 key)
p_get_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint8 key)
{
frame_proto_data temp, *p1;
GSList *item;
@ -92,7 +101,11 @@ p_get_proto_data(frame_data *fd, int proto, guint8 key)
temp.key = key;
temp.proto_data = NULL;
item = g_slist_find_custom(fd->pfd, (gpointer *)&temp, p_compare);
if (scope == pinfo->pool) {
item = g_slist_find_custom(pinfo->proto_data, (gpointer *)&temp, p_compare);
} else {
item = g_slist_find_custom(pinfo->fd->pfd, (gpointer *)&temp, p_compare);
}
if (item) {
p1 = (frame_proto_data *)item->data;
@ -104,30 +117,41 @@ p_get_proto_data(frame_data *fd, int proto, guint8 key)
}
void
p_remove_proto_data(frame_data *fd, int proto, guint8 key)
p_remove_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint8 key)
{
frame_proto_data temp;
GSList *item;
GSList** proto_list;
temp.proto = proto;
temp.key = key;
temp.proto_data = NULL;
item = g_slist_find_custom(fd->pfd, (gpointer *)&temp, p_compare);
if (scope == pinfo->pool) {
item = g_slist_find_custom(pinfo->fd->pfd, (gpointer *)&temp, p_compare);
proto_list = &pinfo->proto_data;
} else {
item = g_slist_find_custom(pinfo->fd->pfd, (gpointer *)&temp, p_compare);
proto_list = &pinfo->fd->pfd;
}
if (item) {
fd->pfd = g_slist_remove(fd->pfd, item->data);
*proto_list = g_slist_remove(*proto_list, item->data);
}
}
gchar *
p_get_proto_name_and_key(frame_data *fd, guint pfd_index){
p_get_proto_name_and_key(wmem_allocator_t *scope, struct _packet_info* pinfo, guint pfd_index){
frame_proto_data *temp;
temp = (frame_proto_data*)g_slist_nth_data(fd->pfd, pfd_index);
return ep_strdup_printf("[%s, key %u]",proto_get_protocol_name(temp->proto), temp->key);
if (scope == pinfo->pool) {
temp = (frame_proto_data*)g_slist_nth_data(pinfo->proto_data, pfd_index);
} else {
temp = (frame_proto_data*)g_slist_nth_data(pinfo->fd->pfd, pfd_index);
}
return ep_strdup_printf("[%s, key %u]",proto_get_protocol_name(temp->proto), temp->key);
}
#define COMPARE_FRAME_NUM() ((fdata1->num < fdata2->num) ? -1 : \

View File

@ -95,11 +95,12 @@ typedef struct {
#endif
/* Utility routines used by packet*.c */
struct _packet_info;
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);
gchar *p_get_proto_name_and_key(frame_data *fd, guint pfd_index);
WS_DLL_PUBLIC void p_add_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint8 key, void *proto_data);
WS_DLL_PUBLIC void *p_get_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint8 key);
void p_remove_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint8 key);
gchar *p_get_proto_name_and_key(wmem_allocator_t *scope, struct _packet_info* pinfo, guint pfd_index);
/* no sense to include epan.h + dependencies for opaque epan session type */
struct epan_session;

View File

@ -194,9 +194,12 @@ typedef struct _packet_info {
guint16 clnp_dstref; /**< clnp/cotp destination reference (can't use dstport, this would confuse tpkt) */
int link_dir; /**< 3GPP messages are sometime different UP link(UL) or Downlink(DL) */
GSList* proto_data; /**< Per packet proto data */
GSList* dependent_frames; /**< A list of frames which this one depends on */
GSList *frame_end_routines;
GSList* frame_end_routines;
wmem_allocator_t *pool; /**< Memory pool scoped to the pinfo struct */
struct epan_session *epan;

View File

@ -2597,7 +2597,7 @@ typedef struct pnio_ar_s {
static void
pnio_ar_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pnio_ar_t *ar)
{
p_add_proto_data(pinfo->fd, proto_pn_io, 0, ar );
p_add_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0, ar );
pinfo->profinet_type = 10;
if (tree) {
@ -9426,7 +9426,7 @@ pn_io_ar_conv_valid(packet_info *pinfo)
static const gchar *
pn_io_ar_conv_filter(packet_info *pinfo)
{
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(pinfo->fd, proto_pn_io, 0);
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
char *buf;
if ((pinfo->profinet_type != 10) || (ar == NULL)) {
@ -9446,7 +9446,7 @@ pn_io_ar_conv_filter(packet_info *pinfo)
static const gchar *
pn_io_ar_conv_data_filter(packet_info *pinfo)
{
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(pinfo->fd, proto_pn_io, 0);
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
char *buf;
if ((pinfo->profinet_type != 10) || (ar == NULL)) {

View File

@ -356,7 +356,7 @@ followSslPacket(
)
{
follow_t * fp = (follow_t *)contextp;
SslPacketInfo * spip = (SslPacketInfo *)p_get_proto_data(pip->fd, GPOINTER_TO_INT(datap), 0);
SslPacketInfo * spip = (SslPacketInfo *)p_get_proto_data(wmem_file_scope(), pip, GPOINTER_TO_INT(datap), 0);
SslDataInfo * sdip;
gint length;
tcp_stream_chunk sc;

View File

@ -571,6 +571,8 @@ static const GtkActionEntry expert_popup_entries[] = {
{ "/Copy/Protocol Plus Summary", NULL, "Protocol Plus Summary", NULL, "Protocol Plus Summary", G_CALLBACK(copy_cb) },
};
int gselection_count = 0;
static void
expert_goto_pkt_cb (GtkTreeSelection *selection, gpointer data _U_)
{
@ -581,6 +583,8 @@ expert_goto_pkt_cb (GtkTreeSelection *selection, gpointer data _U_)
if (gtk_tree_selection_get_selected (selection, &model, &iter))
{
gselection_count++;
gtk_tree_model_get (model, &iter,
PROTOCOL_COLUMN, &pkt,
GROUP_COLUMN, &grp,

View File

@ -78,7 +78,7 @@ ssl_queue_packet_data(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_
show_stream_t from = FROM_CLIENT;
/* Skip packets without decrypted payload data. */
pi = (SslPacketInfo*) p_get_proto_data(pinfo->fd, proto_ssl, 0);
pi = (SslPacketInfo*) p_get_proto_data(wmem_file_scope(), pinfo, proto_ssl, 0);
if (!pi || !pi->appl_data) return 0;
/* Compute the packet's sender. */

View File

@ -561,7 +561,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"), 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, 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);

View File

@ -383,7 +383,7 @@ ssl_queue_packet_data(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, co
show_stream_t from = FROM_CLIENT;
/* Skip packets without decrypted payload data. */
pi = (SslPacketInfo*) p_get_proto_data(pinfo->fd, proto_ssl, 0);
pi = (SslPacketInfo*) p_get_proto_data(wmem_file_scope(), pinfo, proto_ssl, 0);
if (!pi || !pi->appl_data) return 0;
/* Compute the packet's sender. */

View File

@ -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"), 0);
p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_get_id_by_filter_name("rtp"), 0);
if (p_conv_data)
tmp_strinfo.setup_frame_number = p_conv_data->frame_number;
else