aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-e212.c11
-rw-r--r--epan/dissectors/packet-e212.h2
-rw-r--r--epan/dissectors/packet-gsm_a_bssmap.c9
-rw-r--r--epan/dissectors/packet-gsm_a_common.c21
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c8
-rw-r--r--epan/dissectors/packet-gsm_a_gm.c43
-rw-r--r--epan/dissectors/packet-gsm_rlcmac.c5
-rw-r--r--epan/dissectors/packet-gsm_sms.c5
-rw-r--r--epan/dissectors/packet-gtpv2.c6
-rw-r--r--epan/dissectors/packet-mac-lte.c39
-rw-r--r--epan/dissectors/packet-mip6.c2
-rw-r--r--epan/dissectors/packet-nas_eps.c3
-rw-r--r--epan/dissectors/packet-pdcp-lte.c14
-rw-r--r--epan/dissectors/packet-rlc-lte.c27
-rw-r--r--epan/dissectors/packet-sip.c16
15 files changed, 110 insertions, 101 deletions
diff --git a/epan/dissectors/packet-e212.c b/epan/dissectors/packet-e212.c
index f8da33f695..e9401f49ef 100644
--- a/epan/dissectors/packet-e212.c
+++ b/epan/dissectors/packet-e212.c
@@ -33,6 +33,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/wmem/wmem.h>
#include "packet-e212.h"
#include "expert.h"
@@ -2499,10 +2500,10 @@ static expert_field ei_E212_mnc_non_decimal = EI_INIT;
*/
/*
- * Return MCC MNC in a ep allocated string that can be used in labels.
+ * Return MCC MNC in a packet scope allocated string that can be used in labels.
*/
gchar *
-dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian)
+dissect_e212_mcc_mnc_packet_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian)
{
int start_offset, mcc_mnc;
@@ -2551,7 +2552,7 @@ dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Prepare a string with the MCC and MNC including the country and Operator if
* known, do NOT print unknown.
*/
- mcc_mnc_str = ep_strdup_printf("MCC %u %s, MNC %03u %s",
+ mcc_mnc_str = wmem_strdup_printf(wmem_packet_scope(), "MCC %u %s, MNC %03u %s",
mcc,
val_to_str_ext_const(mcc,&E212_codes_ext,""),
mnc,
@@ -2564,7 +2565,7 @@ dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Prepare a string with the MCC and MNC including the country and Operator if
* known, do NOT print unknown.
*/
- mcc_mnc_str = ep_strdup_printf("MCC %u %s, MNC %02u %s",
+ mcc_mnc_str = wmem_strdup_printf(wmem_packet_scope(), "MCC %u %s, MNC %02u %s",
mcc,
val_to_str_ext_const(mcc,&E212_codes_ext,""),
mnc,
@@ -2580,7 +2581,7 @@ dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int
dissect_e212_mcc_mnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian)
{
- dissect_e212_mcc_mnc_ep_str(tvb, pinfo, tree, offset, little_endian);
+ dissect_e212_mcc_mnc_packet_str(tvb, pinfo, tree, offset, little_endian);
return offset +3;
}
diff --git a/epan/dissectors/packet-e212.h b/epan/dissectors/packet-e212.h
index 9546b6cfdd..74ff077ff6 100644
--- a/epan/dissectors/packet-e212.h
+++ b/epan/dissectors/packet-e212.h
@@ -31,7 +31,7 @@
extern value_string_ext E212_codes_ext;
-gchar* dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian);
+gchar* dissect_e212_mcc_mnc_packet_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian);
WS_DLL_PUBLIC
int dissect_e212_mcc_mnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian);
WS_DLL_PUBLIC
diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c
index 96a8a7fd49..16137af5bb 100644
--- a/epan/dissectors/packet-gsm_a_bssmap.c
+++ b/epan/dissectors/packet-gsm_a_bssmap.c
@@ -44,7 +44,7 @@
#include <epan/packet.h>
#include <epan/tap.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/asn1.h>
#include "packet-bssap.h"
@@ -7216,9 +7216,10 @@ dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
str = try_val_to_str_idx_ext((guint32) oct, &gsm_a_bssmap_msg_strings_ext, &idx);
if (sccp_msg_p && !sccp_msg_p->data.co.label) {
- sccp_msg_p->data.co.label = se_strdup(val_to_str_ext((guint32)oct,
- &gsm_a_bssmap_msg_strings_ext,
- "BSSMAP (0x%02x)"));
+ sccp_msg_p->data.co.label = wmem_strdup(wmem_file_scope(),
+ val_to_str_ext((guint32)oct,
+ &gsm_a_bssmap_msg_strings_ext,
+ "BSSMAP (0x%02x)"));
}
/*
diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c
index 587275ea5c..2904559981 100644
--- a/epan/dissectors/packet-gsm_a_common.c
+++ b/epan/dissectors/packet-gsm_a_common.c
@@ -36,6 +36,7 @@
#include <epan/packet.h>
#include <epan/expert.h>
#include <epan/tap.h>
+#include <epan/wmem/wmem.h>
#include "packet-bssap.h"
#include "packet-sccp.h"
@@ -1279,7 +1280,7 @@ guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei
{
gchar *a_add_string;
- a_add_string = (gchar *)ep_alloc(1024);
+ a_add_string = (gchar *)wmem_alloc(wmem_packet_scope(), 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 2,
@@ -1374,7 +1375,7 @@ guint16 elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 ie
{
gchar *a_add_string;
- a_add_string = (gchar*)ep_alloc(1024);
+ a_add_string = (gchar*)wmem_alloc(wmem_packet_scope(), 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1 + lengt_length,
@@ -1455,7 +1456,7 @@ guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 i
{
gchar *a_add_string;
- a_add_string = (gchar*)ep_alloc(1024);
+ a_add_string = (gchar*)wmem_alloc(wmem_packet_scope(), 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1 + 2,
@@ -1532,7 +1533,7 @@ guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei,
{
gchar *a_add_string;
- a_add_string = (gchar*)ep_alloc(1024);
+ a_add_string = (gchar*)wmem_alloc(wmem_packet_scope(), 1024);
a_add_string[0] = '\0';
consumed = (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1, -1, a_add_string, 1024);
@@ -1613,7 +1614,7 @@ guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint
{
gchar *a_add_string;
- a_add_string = (gchar*)ep_alloc(1024);
+ a_add_string = (gchar*)wmem_alloc(wmem_packet_scope(), 1024);
a_add_string[0] = '\0';
consumed = (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset, RIGHT_NIBBLE, a_add_string, 1024);
@@ -1720,7 +1721,7 @@ elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int
{
gchar *a_add_string;
- a_add_string = (gchar*)ep_alloc(1024);
+ a_add_string = (gchar*)wmem_alloc(wmem_packet_scope(), 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1,
@@ -1787,7 +1788,7 @@ guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_
{
gchar *a_add_string;
- a_add_string = (gchar*)ep_alloc(1024);
+ a_add_string = (gchar*)wmem_alloc(wmem_packet_scope(), 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 2,
@@ -1848,7 +1849,7 @@ guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_typ
subtree = proto_item_add_subtree(item, elem_ett[idx]);
- a_add_string= (gchar*)ep_alloc(1024);
+ a_add_string= (gchar*)wmem_alloc(wmem_packet_scope(), 1024);
a_add_string[0] = '\0';
consumed = (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset, -1, a_add_string, 1024);
if (a_add_string[0] != '\0')
@@ -1897,7 +1898,7 @@ guint16 elem_v_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint p
subtree = proto_item_add_subtree(item, elem_ett[idx]);
- a_add_string= (gchar*)ep_alloc(1024);
+ a_add_string= (gchar*)wmem_alloc(wmem_packet_scope(), 1024);
a_add_string[0] = '\0';
if (elem_funcs[idx] == NULL)
@@ -2239,7 +2240,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
digit_str);
if (sccp_assoc && ! sccp_assoc->calling_party) {
- sccp_assoc->calling_party = se_strdup_printf(
+ sccp_assoc->calling_party = wmem_strdup_printf(wmem_file_scope(),
((oct & 0x07) == 3) ? "IMEISV: %s" : "IMSI: %s",
digit_str );
}
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index a28ce2a817..7e9f5bf1a6 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -106,7 +106,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/tap.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/asn1.h>
#include <epan/strutil.h>
@@ -2634,7 +2634,7 @@ de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu
if(addr_extr) {
if (sccp_assoc && ! sccp_assoc->called_party) {
- sccp_assoc->called_party = se_strdup(a_bigbuf);
+ sccp_assoc->called_party = wmem_strdup(wmem_file_scope(), a_bigbuf);
}
if (add_string)
@@ -6527,7 +6527,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dtap_tree = proto_item_add_subtree(dtap_item, ett_dtap_msg);
if (sccp_msg && !sccp_msg->data.co.label) {
- sccp_msg->data.co.label = se_strdup_printf("DTAP (0x%02x)",oct);
+ sccp_msg->data.co.label = wmem_strdup_printf(wmem_file_scope(), "DTAP (0x%02x)",oct);
}
@@ -6542,7 +6542,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dtap_tree = proto_item_add_subtree(dtap_item, ett_tree);
if (sccp_msg && !sccp_msg->data.co.label) {
- sccp_msg->data.co.label = se_strdup(msg_str);
+ sccp_msg->data.co.label = wmem_strdup(wmem_file_scope(), msg_str);
}
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c
index 41a83cfa32..fb2d904d4a 100644
--- a/epan/dissectors/packet-gsm_a_gm.c
+++ b/epan/dissectors/packet-gsm_a_gm.c
@@ -77,6 +77,7 @@
#include <epan/prefs.h>
#include <epan/tap.h>
#include <epan/asn1.h>
+#include <epan/wmem/wmem.h>
#include "packet-bssap.h"
#include "packet-sccp.h"
@@ -4535,7 +4536,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
{
case 0x00: str = "Subscribed maximum bit rate for uplink/reserved"; break;
case 0xff: str = "0 kbps"; break;
- default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
+ default: str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_upl, tvb,
@@ -4551,7 +4552,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
{
case 0x00: str = "Subscribed maximum bit rate for downlink/reserved"; break;
case 0xff: str = "0 kbps"; break;
- default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
+ default: str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl, tvb,
@@ -4582,7 +4583,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
temp32 = (tmp_oct - 0x10) * 50 + 200;
else
temp32 = (tmp_oct - 0x20) * 100 + 1000;
- str = ep_strdup_printf("%u ms", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u ms", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_trans_delay, tvb,
@@ -4600,7 +4601,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
{
case 0x00: str = "Subscribed guaranteed bit rate for uplink/reserved"; break;
case 0xff: str = "0 kbps"; break;
- default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
+ default: str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_upl, tvb,
@@ -4616,7 +4617,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
{
case 0x00: str = "Subscribed guaranteed bit rate for downlink/reserved"; break;
case 0xff: str = "0 kbps"; break;
- default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
+ default: str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_downl, tvb,
@@ -4651,9 +4652,9 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
{
temp32 = qos_calc_ext_bitrate(oct);
if (temp32 % 1000 == 0)
- str = ep_strdup_printf("%u Mbps", temp32 / 1000);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000);
else
- str = ep_strdup_printf("%u kbps", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
@@ -4670,9 +4671,9 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
{
temp32 = qos_calc_ext_bitrate(oct);
if (temp32 % 1000 == 0)
- str = ep_strdup_printf("%u Mbps", temp32 / 1000);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000);
else
- str = ep_strdup_printf("%u kbps", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_downl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
@@ -4689,9 +4690,9 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
{
temp32 = qos_calc_ext_bitrate(oct);
if (temp32 % 1000 == 0)
- str = ep_strdup_printf("%u Mbps", temp32 / 1000);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000);
else
- str = ep_strdup_printf("%u kbps", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_upl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
@@ -4708,9 +4709,9 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
{
temp32 = qos_calc_ext_bitrate(oct);
if (temp32 % 1000 == 0)
- str = ep_strdup_printf("%u Mbps", temp32 / 1000);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000);
else
- str = ep_strdup_printf("%u kbps", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_upl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
@@ -4726,7 +4727,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
else
{
temp32 = qos_calc_ext2_bitrate(oct);
- str = ep_strdup_printf("%u Mbps", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl_ext2, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
@@ -4742,7 +4743,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
else
{
temp32 = qos_calc_ext2_bitrate(oct);
- str = ep_strdup_printf("%u Mbps", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_downl_ext2, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
@@ -4758,7 +4759,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
else
{
temp32 = qos_calc_ext2_bitrate(oct);
- str = ep_strdup_printf("%u Mbps", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_upl_ext2, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
@@ -4774,7 +4775,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
else
{
temp32 = qos_calc_ext2_bitrate(oct);
- str = ep_strdup_printf("%u Mbps", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_upl_ext2, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
@@ -5392,7 +5393,7 @@ de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint
{
case 0x00: str = "Subscribed maximum bit rate for downlink/reserved"; break;
case 0xff: str = "0 kbps"; break;
- default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
+ default: str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", qos_calc_bitrate(oct));
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl, tvb,
@@ -5409,9 +5410,9 @@ de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint
{
temp32 = qos_calc_ext_bitrate(oct);
if (temp32 % 1000 == 0)
- str = ep_strdup_printf("%u Mbps", temp32 / 1000);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u Mbps", temp32 / 1000);
else
- str = ep_strdup_printf("%u kbps", temp32);
+ str = wmem_strdup_printf(wmem_packet_scope(), "%u kbps", temp32);
}
proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl_ext, tvb,
curr_offset, 1, oct, "%s (%u)", str, oct);
@@ -5454,7 +5455,7 @@ de_sm_enh_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
if(oct < 0x80)
str = "Reserved";
else if (oct < 0xff)
- str = ep_strdup_printf("NSAPI %u for Multimedia Broadcast/Multicast Service (MBMS) Multicast mode", oct);
+ str = wmem_strdup_printf(wmem_packet_scope(), "NSAPI %u for Multimedia Broadcast/Multicast Service (MBMS) Multicast mode", oct);
else
str = "Reserved for use by lower layers in the p2p radio bearer allocation message for MBMS Broadcast mode";
diff --git a/epan/dissectors/packet-gsm_rlcmac.c b/epan/dissectors/packet-gsm_rlcmac.c
index 40ec0ffceb..c36addd36b 100644
--- a/epan/dissectors/packet-gsm_rlcmac.c
+++ b/epan/dissectors/packet-gsm_rlcmac.c
@@ -53,6 +53,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/expert.h>
+#include <epan/wmem/wmem.h>
#include "packet-csn1.h"
#include "packet-gsm_rlcmac.h"
@@ -7702,7 +7703,7 @@ dissect_gsm_rlcmac_downlink(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
RlcMacDownlink_t * data;
/* allocate a data structure and guess the coding scheme */
- data = ep_new(RlcMacDownlink_t);
+ data = wmem_new(wmem_packet_scope(), RlcMacDownlink_t);
if ((pinfo->private_data != NULL) && (((RlcMacPrivateData_t *)(pinfo->private_data))->magic == GSM_RLC_MAC_MAGIC_NUMBER))
{
@@ -7752,7 +7753,7 @@ dissect_gsm_rlcmac_uplink(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
RlcMacUplink_t *data;
/* allocate a data structure and set the coding scheme */
- data = ep_new(RlcMacUplink_t);
+ data = wmem_new(wmem_packet_scope(), RlcMacUplink_t);
if ((pinfo->private_data != NULL) && (((RlcMacPrivateData_t *)(pinfo->private_data))->magic == GSM_RLC_MAC_MAGIC_NUMBER))
{
diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c
index b14b2516da..300a0db974 100644
--- a/epan/dissectors/packet-gsm_sms.c
+++ b/epan/dissectors/packet-gsm_sms.c
@@ -44,6 +44,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/reassemble.h>
+#include <epan/wmem/wmem.h>
#include "packet-gsm_sms.h"
@@ -440,7 +441,7 @@ dis_field_addr(tvbuff_t *tvb, proto_tree *tree, guint32 *offset_p, const gchar *
addrstr = gsm_sms_chars_to_utf8(addrbuf, i);
break;
default:
- addrstr = (gchar *)ep_alloc(numdigocts*2 + 1);
+ addrstr = (gchar *)wmem_alloc(wmem_packet_scope(), numdigocts*2 + 1);
for (i = 0; i < numdigocts; i++)
{
oct = tvb_get_guint8(tvb, offset + i);
@@ -1749,7 +1750,7 @@ gsm_sms_chars_to_utf8(const unsigned char* src, int len)
}
/* Now allocate a buffer for the output string and fill it in */
- outbuf = (gchar *)ep_alloc(outlen + 1);
+ outbuf = (gchar *)wmem_alloc(wmem_packet_scope(), outlen + 1);
for (i = 0, j = 0; j < len; j++)
{
if (char_is_escape(src[j])) {
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index 665338449a..23e54c0b43 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -1794,7 +1794,7 @@ dissect_gtpv2_serv_net(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
{
gchar *mcc_mnc_str;
- mcc_mnc_str = dissect_e212_mcc_mnc_ep_str(tvb, pinfo, tree, 0, TRUE);
+ mcc_mnc_str = dissect_e212_mcc_mnc_packet_str(tvb, pinfo, tree, 0, TRUE);
proto_item_append_text(item, "%s", mcc_mnc_str);
}
@@ -3715,7 +3715,7 @@ dissect_gtpv2_trace_reference(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
guint32 trace_id;
gchar *mcc_mnc_str;
- mcc_mnc_str = dissect_e212_mcc_mnc_ep_str(tvb, pinfo, tree, 0, TRUE);
+ mcc_mnc_str = dissect_e212_mcc_mnc_packet_str(tvb, pinfo, tree, 0, TRUE);
offset += 3;
trace_id = tvb_get_ntohs(tvb, offset);
@@ -3978,7 +3978,7 @@ dissect_gtpv2_sel_plmn_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, p
{
gchar *mcc_mnc_str;
- mcc_mnc_str = dissect_e212_mcc_mnc_ep_str(tvb, pinfo, tree, 0, FALSE);
+ mcc_mnc_str = dissect_e212_mcc_mnc_packet_str(tvb, pinfo, tree, 0, FALSE);
proto_item_append_text(item, "%s", mcc_mnc_str);
}
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index f67fe04de2..339224c673 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -28,6 +28,7 @@
#include <epan/prefs.h>
#include <epan/tap.h>
#include <epan/uat.h>
+#include <epan/wmem/wmem.h>
#include "packet-mac-lte.h"
#include "packet-rlc-lte.h"
@@ -1169,7 +1170,7 @@ static void set_drx_info(packet_info *pinfo, mac_lte_info *p_mac_lte_info)
GUINT_TO_POINTER((guint)p_mac_lte_info->ueid));
if (drx_config_entry != NULL) {
/* Copy config into separate struct just for this frame, and add to result table */
- drx_config_t *frame_config = se_new(drx_config_t);
+ drx_config_t *frame_config = wmem_new(wmem_file_scope(), drx_config_t);
*frame_config = *drx_config_entry;
g_hash_table_insert(mac_lte_drx_config_result, GUINT_TO_POINTER(pinfo->fd->num), frame_config);
}
@@ -1425,7 +1426,7 @@ static gboolean dissect_mac_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
p_mac_lte_info = (mac_lte_info *)p_get_proto_data(pinfo->fd, proto_mac_lte, 0);
if (p_mac_lte_info == NULL) {
/* Allocate new info struct for this frame */
- p_mac_lte_info = se_new0(struct mac_lte_info);
+ p_mac_lte_info = wmem_new0(wmem_file_scope(), struct mac_lte_info);
infoAlreadySet = FALSE;
}
else {
@@ -1775,7 +1776,7 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
gint offset, mac_lte_info *p_mac_lte_info, mac_lte_tap_info *tap_info)
{
gint number_of_rars = 0; /* No of RAR bodies expected following headers */
- guint8 *rapids = (guint8 *)ep_alloc(MAX_RAR_PDUS * sizeof(guint8));
+ guint8 *rapids = (guint8 *)wmem_alloc(wmem_packet_scope(), MAX_RAR_PDUS * sizeof(guint8));
gboolean backoff_indicator_seen = FALSE;
guint8 backoff_indicator = 0;
guint8 extension;
@@ -2073,7 +2074,7 @@ static void call_rlc_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* Resuse or create RLC info */
p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte, 0);
if (p_rlc_lte_info == NULL) {
- p_rlc_lte_info = se_new0(struct rlc_lte_info);
+ p_rlc_lte_info = wmem_new0(wmem_file_scope(), struct rlc_lte_info);
}
/* Fill in struct details for srb channels */
@@ -2170,7 +2171,7 @@ static void TrackReportedDLHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil
if ((total_gap >= 8) && (total_gap <= 13)) {
/* Resend detected! Store result pointing back. */
- result = se_new0(DLHARQResult);
+ result = wmem_new0(wmem_file_scope(), DLHARQResult);
result->previousSet = TRUE;
result->previousFrameNum = lastData->framenum;
result->timeSincePreviousFrame = total_gap;
@@ -2179,7 +2180,7 @@ static void TrackReportedDLHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil
/* Now make previous frame point forward to here */
original_result = (DLHARQResult *)g_hash_table_lookup(mac_lte_dl_harq_result_hash, GUINT_TO_POINTER(lastData->framenum));
if (original_result == NULL) {
- original_result = se_new0(DLHARQResult);
+ original_result = wmem_new0(wmem_file_scope(), DLHARQResult);
g_hash_table_insert(mac_lte_dl_harq_result_hash, GUINT_TO_POINTER(lastData->framenum), original_result);
}
original_result->nextSet = TRUE;
@@ -2191,7 +2192,7 @@ static void TrackReportedDLHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil
}
else {
/* Allocate entry in table for this UE/RNTI */
- ueData = se_new0(DLHarqBuffers);
+ ueData = wmem_new0(wmem_file_scope(), DLHarqBuffers);
g_hash_table_insert(mac_lte_dl_harq_hash, GUINT_TO_POINTER((guint)p_mac_lte_info->rnti), ueData);
}
@@ -2319,7 +2320,7 @@ static void TrackReportedULHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil
ULHARQResult *original_result;
/* Original detected!!! Store result pointing back */
- result = se_new0(ULHARQResult);
+ result = wmem_new0(wmem_file_scope(), ULHARQResult);
result->previousSet = TRUE;
result->previousFrameNum = lastData->framenum;
result->timeSincePreviousFrame = total_gap;
@@ -2328,7 +2329,7 @@ static void TrackReportedULHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil
/* Now make previous frame point forward to here */
original_result = (ULHARQResult *)g_hash_table_lookup(mac_lte_ul_harq_result_hash, GUINT_TO_POINTER(lastData->framenum));
if (original_result == NULL) {
- original_result = se_new0(ULHARQResult);
+ original_result = wmem_new0(wmem_file_scope(), ULHARQResult);
g_hash_table_insert(mac_lte_ul_harq_result_hash, GUINT_TO_POINTER(lastData->framenum), original_result);
}
original_result->nextSet = TRUE;
@@ -2341,7 +2342,7 @@ static void TrackReportedULHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil
}
else {
/* Allocate entry in table for this UE/RNTI */
- ueData = se_new0(ULHarqBuffers);
+ ueData = wmem_new0(wmem_file_scope(), ULHarqBuffers);
g_hash_table_insert(mac_lte_ul_harq_hash, GUINT_TO_POINTER((guint)p_mac_lte_info->rnti), ueData);
}
@@ -2406,7 +2407,7 @@ static SRResult *GetSRResult(guint32 frameNum, gboolean can_create)
result = (SRResult *)g_hash_table_lookup(mac_lte_sr_request_hash, GUINT_TO_POINTER(frameNum));
if ((result == NULL) && can_create) {
- result = se_new0(SRResult);
+ result = wmem_new0(wmem_file_scope(), SRResult);
g_hash_table_insert(mac_lte_sr_request_hash, GUINT_TO_POINTER((guint)frameNum), result);
}
return result;
@@ -2440,7 +2441,7 @@ static void TrackSRInfo(SREvent event, packet_info *pinfo, proto_tree *tree,
state = (SRState *)g_hash_table_lookup(mac_lte_ue_sr_state, GUINT_TO_POINTER((guint)rnti));
if (state == NULL) {
/* Allocate status for this RNTI */
- state = se_new(SRState);
+ state = wmem_new(wmem_file_scope(), SRState);
state->status = None;
g_hash_table_insert(mac_lte_ue_sr_state, GUINT_TO_POINTER((guint)rnti), state);
}
@@ -2708,7 +2709,7 @@ static guint16 count_ues_tti(mac_lte_info *p_mac_lte_info, packet_info *pinfo)
}
/* Set result state for this frame */
- result = se_new(TTIInfoResult_t);
+ result = wmem_new(wmem_file_scope(), TTIInfoResult_t);
result->ues_in_tti = tti_info->ues_in_tti;
g_hash_table_insert(mac_lte_tti_info_result_hash,
GUINT_TO_POINTER(pinfo->fd->num), result);
@@ -3253,7 +3254,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
guint msg3Key = p_mac_lte_info->rnti;
/* Allocate result and add it to the table */
- crResult = se_new(ContentionResolutionResult);
+ crResult = wmem_new(wmem_file_scope(), ContentionResolutionResult);
g_hash_table_insert(mac_lte_cr_result_hash, GUINT_TO_POINTER(pinfo->fd->num), crResult);
/* Look for Msg3 */
@@ -3781,7 +3782,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Look for previous entry for this UE */
if (data == NULL) {
/* Allocate space for data and add to table */
- data = se_new(Msg3Data);
+ data = wmem_new(wmem_file_scope(), Msg3Data);
g_hash_table_insert(mac_lte_msg3_hash, GUINT_TO_POINTER(key), data);
}
@@ -4374,7 +4375,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint n;
/* Allocate and zero tap struct */
- mac_lte_tap_info *tap_info = (mac_lte_tap_info *)ep_alloc0(sizeof(mac_lte_tap_info));
+ mac_lte_tap_info *tap_info = (mac_lte_tap_info *)wmem_alloc0(wmem_packet_scope(), sizeof(mac_lte_tap_info));
/* Set protocol name */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAC-LTE");
@@ -4918,7 +4919,7 @@ void set_mac_lte_channel_mapping(drb_mapping_t *drb_mapping)
GUINT_TO_POINTER((guint)drb_mapping->ueid));
if (!ue_mappings) {
/* If not found, create & add to table */
- ue_mappings = se_new0(ue_dynamic_drb_mappings_t);
+ ue_mappings = wmem_new0(wmem_file_scope(), ue_dynamic_drb_mappings_t);
g_hash_table_insert(mac_lte_ue_channels_hash,
GUINT_TO_POINTER((guint)drb_mapping->ueid),
ue_mappings);
@@ -5000,7 +5001,7 @@ void set_mac_lte_drx_config(guint16 ueid, drx_config_t *drx_config, packet_info
/* Find or create config struct for table entry */
drx_config_entry = (drx_config_t *)g_hash_table_lookup(mac_lte_drx_config, GUINT_TO_POINTER((guint)ueid));
if (drx_config_entry == NULL) {
- drx_config_entry = (drx_config_t *)se_new(drx_config_t);
+ drx_config_entry = (drx_config_t *)wmem_new(wmem_file_scope(), drx_config_t);
}
/* Copy in new config */
*drx_config_entry = *drx_config;
@@ -5009,7 +5010,7 @@ void set_mac_lte_drx_config(guint16 ueid, drx_config_t *drx_config, packet_info
/* TODO: remember previous config (if any?) */
/* Store this snapshot into the result info table */
- result_entry = (drx_config_t *)se_new(drx_config_t);
+ result_entry = (drx_config_t *)wmem_new(wmem_file_scope(), drx_config_t);
*result_entry = *drx_config_entry;
g_hash_table_insert(mac_lte_drx_config, GUINT_TO_POINTER((guint)ueid), result_entry);
}
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c
index 8804037bb7..1b88e2094c 100644
--- a/epan/dissectors/packet-mip6.c
+++ b/epan/dissectors/packet-mip6.c
@@ -1806,7 +1806,7 @@ dissect_mip6_opt_vsm_3gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
break;
/* 13, Serving Network */
case 13:
- mcc_mnc_str = dissect_e212_mcc_mnc_ep_str(tvb, pinfo, tree, offset, TRUE);
+ mcc_mnc_str = dissect_e212_mcc_mnc_packet_str(tvb, pinfo, tree, offset, TRUE);
proto_item_append_text(hdr_item," %s", mcc_mnc_str);
break;
/* 14, APN Restriction */
diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c
index 82698d6fa6..ff295dad85 100644
--- a/epan/dissectors/packet-nas_eps.c
+++ b/epan/dissectors/packet-nas_eps.c
@@ -32,6 +32,7 @@
#include <epan/packet.h>
#include <epan/asn1.h>
#include <epan/prefs.h>
+#include <epan/wmem/wmem.h>
#include "packet-gsm_map.h"
#include "packet-gsm_a_common.h"
@@ -1011,7 +1012,7 @@ unpack_eps_mid_digits(tvbuff_t *tvb) {
length = tvb_length(tvb);
- digit_str = (char *)ep_alloc(length*2);
+ digit_str = (char *)wmem_alloc(wmem_packet_scope(), length*2);
/* Get identity digit 1 */
octet = tvb_get_guint8(tvb,offset);
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c
index d9f34670e7..3709dbb7e4 100644
--- a/epan/dissectors/packet-pdcp-lte.c
+++ b/epan/dissectors/packet-pdcp-lte.c
@@ -32,7 +32,7 @@
#include <epan/prefs.h>
#include <epan/expert.h>
#include <epan/addr_resolv.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include "packet-rlc-lte.h"
#include "packet-pdcp-lte.h"
@@ -324,7 +324,7 @@ static gpointer get_report_hash_key(guint16 SN, guint32 frameNumber,
/* Only allocate a struct when will be adding entry */
if (do_persist) {
- p_key = se_new(pdcp_result_hash_key);
+ p_key = wmem_new(wmem_file_scope(), pdcp_result_hash_key);
}
else {
memset(&key, 0, sizeof(pdcp_result_hash_key));
@@ -538,7 +538,7 @@ static void checkChannelSequenceInfo(packet_info *pinfo, tvbuff_t *tvb,
createdChannel = TRUE;
/* Allocate a new value and duplicate key contents */
- p_channel_status = se_new0(pdcp_channel_status);
+ p_channel_status = wmem_new0(wmem_file_scope(), pdcp_channel_status);
/* Add entry */
g_hash_table_insert(pdcp_sequence_analysis_channel_hash,
@@ -546,7 +546,7 @@ static void checkChannelSequenceInfo(packet_info *pinfo, tvbuff_t *tvb,
}
/* Create space for frame state_report */
- p_report_in_frame = se_new(pdcp_sequence_report_in_frame);
+ p_report_in_frame = wmem_new(wmem_file_scope(), pdcp_sequence_report_in_frame);
p_report_in_frame->nextFrameNum = 0;
switch (p_pdcp_lte_info->seqnum_length) {
@@ -879,7 +879,7 @@ static gboolean dissect_pdcp_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
p_pdcp_lte_info = (pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte, 0);
if (p_pdcp_lte_info == NULL) {
/* Allocate new info struct for this frame */
- p_pdcp_lte_info = se_new0(pdcp_lte_info);
+ p_pdcp_lte_info = wmem_new0(wmem_file_scope(), pdcp_lte_info);
infoAlreadySet = FALSE;
}
else {
@@ -1233,7 +1233,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset, -1, ENC_NA);
bitmap_tree = proto_item_add_subtree(bitmap_ti, ett_pdcp_report_bitmap);
- buff = (gchar *)ep_alloc(BUFF_SIZE);
+ buff = (gchar *)wmem_alloc(wmem_packet_scope(), BUFF_SIZE);
len = tvb_length_remaining(tvb, offset);
bit_offset = offset<<3;
/* For each byte... */
@@ -1393,7 +1393,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
rohc_tvb = tvb_new_subset_remaining(tvb, rohc_offset);
/* RoHC settings */
- p_rohc_info = ep_new(rohc_info);
+ p_rohc_info = wmem_new(wmem_packet_scope(), rohc_info);
p_rohc_info->rohc_compression = p_pdcp_info->rohc_compression;
p_rohc_info->rohc_ip_version = p_pdcp_info->rohc_ip_version;
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index ced995bdac..3cbe0496a3 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -32,6 +32,7 @@
#include <epan/expert.h>
#include <epan/prefs.h>
#include <epan/tap.h>
+#include <epan/wmem/wmem.h>
#include "packet-mac-lte.h"
#include "packet-rlc-lte.h"
@@ -425,7 +426,7 @@ static GHashTable *reassembly_report_hash = NULL;
/* Create a new struct for reassembly */
static void reassembly_reset(channel_sequence_analysis_status *status)
{
- status->reassembly_info = se_new0(rlc_channel_reassembly_info);
+ status->reassembly_info = wmem_new0(wmem_file_scope(), rlc_channel_reassembly_info);
}
/* Hide previous one */
@@ -449,7 +450,7 @@ static void reassembly_add_segment(channel_sequence_analysis_status *status,
return;
}
- segment_data = (guint8 *)se_alloc(length);
+ segment_data = (guint8 *)wmem_alloc(wmem_file_scope(), length);
/* TODO: is there a better way to do this? */
memcpy(segment_data, tvb_get_ptr(tvb, offset, length), length);
@@ -766,7 +767,7 @@ 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);
if (p_pdcp_lte_info == NULL) {
- p_pdcp_lte_info = se_new0(pdcp_lte_info);
+ 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);
}
@@ -940,7 +941,7 @@ static gpointer get_report_hash_key(guint16 SN, guint32 frameNumber,
/* Only allocate a struct when will be adding entry */
if (do_persist) {
- p_key = se_new0(rlc_result_hash_key);
+ p_key = wmem_new0(wmem_file_scope(), rlc_result_hash_key);
}
else {
memset(&key, 0, sizeof(rlc_result_hash_key));
@@ -1370,8 +1371,8 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
createdChannel = TRUE;
/* Allocate a new value and duplicate key contents */
- p_channel_status = se_new0(channel_sequence_analysis_status);
- p_channel_key = (channel_hash_key *)se_memdup(&channel_key, sizeof(channel_hash_key));
+ p_channel_status = wmem_new0(wmem_file_scope(), channel_sequence_analysis_status);
+ p_channel_key = (channel_hash_key *)wmem_memdup(wmem_file_scope(), &channel_key, sizeof(channel_hash_key));
/* Set mode */
p_channel_status->rlcMode = p_rlc_lte_info->rlcMode;
@@ -1381,7 +1382,7 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
}
/* Create space for frame state_report */
- p_report_in_frame = se_new0(sequence_analysis_report);
+ p_report_in_frame = wmem_new0(wmem_file_scope(), sequence_analysis_report);
/* Deal with according to channel mode */
@@ -1780,8 +1781,8 @@ static void checkChannelRepeatedNACKInfo(packet_info *pinfo,
if (p_channel_status == NULL) {
/* Allocate a new key and value */
- p_channel_key = se_new(channel_hash_key);
- p_channel_status = se_new0(channel_repeated_nack_status);
+ p_channel_key = wmem_new(wmem_file_scope(), channel_hash_key);
+ p_channel_status = wmem_new0(wmem_file_scope(), channel_repeated_nack_status);
/* Copy key contents */
memcpy(p_channel_key, &channel_key, sizeof(channel_hash_key));
@@ -1813,7 +1814,7 @@ static void checkChannelRepeatedNACKInfo(packet_info *pinfo,
if (noOfNACKsRepeated >= 1) {
/* Create space for frame state_report */
- p_report_in_frame = se_new(channel_repeated_nack_report);
+ p_report_in_frame = wmem_new(wmem_file_scope(), channel_repeated_nack_report);
/* Copy in found duplicates */
for (n=0; n < MIN(tap_info->noOfNACKs, MAX_NACKs); n++) {
@@ -1891,7 +1892,7 @@ static void checkChannelACKWindow(guint16 ack_sn,
if (((1024 + p_channel_status->previousSequenceNumber+1 - ack_sn) % 1024) > 512) {
/* Set result */
- p_report_in_frame = se_new0(sequence_analysis_report);
+ p_report_in_frame = wmem_new0(wmem_file_scope(), sequence_analysis_report);
p_report_in_frame->state = ACK_Out_of_Window;
p_report_in_frame->previousFrameNum = p_channel_status->previousFrameNum;
p_report_in_frame->sequenceExpected = p_channel_status->previousSequenceNumber;
@@ -2647,7 +2648,7 @@ static gboolean dissect_rlc_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
p_rlc_lte_info = (rlc_lte_info *)p_get_proto_data(pinfo->fd, proto_rlc_lte, 0);
if (p_rlc_lte_info == NULL) {
/* Allocate new info struct for this frame */
- p_rlc_lte_info = se_new0(struct rlc_lte_info);
+ p_rlc_lte_info = wmem_new0(wmem_file_scope(), struct rlc_lte_info);
infoAlreadySet = FALSE;
}
else {
@@ -2742,7 +2743,7 @@ static void dissect_rlc_lte_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree
struct rlc_lte_info *p_rlc_lte_info = NULL;
/* Allocate and Zero tap struct */
- rlc_lte_tap_info *tap_info = ep_new0(rlc_lte_tap_info);
+ rlc_lte_tap_info *tap_info = wmem_new0(wmem_packet_scope(), rlc_lte_tap_info);
/* Set protocol name */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RLC-LTE");
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index d9de61ed9a..c70d36793b 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -42,7 +42,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/req_resp_hdrs.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/strutil.h>
#include <epan/tap.h>
#include <epan/exported_pdu.h>
@@ -2215,7 +2215,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
}
/* Initialise stat info for passing to tap */
- stat_info = ep_new0(sip_info_value_t);
+ stat_info = wmem_new0(wmem_packet_scope(), sip_info_value_t);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIP");
@@ -2810,7 +2810,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
case POS_CALL_ID :
/* Store the Call-id */
g_strlcpy(call_id, value, MAX_CALL_ID_SIZE);
- stat_info->tap_call_id = ep_strdup(call_id);
+ stat_info->tap_call_id = wmem_strdup(wmem_packet_scope(), call_id);
/* Add 'Call-id' string item to tree */
if(hdr_tree) {
@@ -3688,8 +3688,8 @@ guint sip_is_packet_resend(packet_info *pinfo,
/* Need to create a new table entry */
/* Allocate a new key and value */
- p_key = se_new(sip_hash_key);
- p_val = se_new(sip_hash_value);
+ p_key = wmem_new(wmem_file_scope(), sip_hash_key);
+ p_val = wmem_new(wmem_file_scope(), sip_hash_value);
/* Fill in key and value details */
g_snprintf(p_key->call_id, MAX_CALL_ID_SIZE, "%s", call_id);
@@ -3780,7 +3780,7 @@ guint sip_is_packet_resend(packet_info *pinfo,
sip_frame_result = (sip_frame_result_value *)p_get_proto_data(pinfo->fd, proto_sip, pinfo->curr_layer_num);
if (sip_frame_result == NULL)
{
- sip_frame_result = se_new0(sip_frame_result_value);
+ 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);
}
@@ -3884,7 +3884,7 @@ guint sip_find_request(packet_info *pinfo,
if (sip_frame_result == NULL)
{
/* Allocate and set all values to zero */
- sip_frame_result = se_new0(sip_frame_result_value);
+ 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);
}
@@ -4003,7 +4003,7 @@ guint sip_find_invite(packet_info *pinfo,
if (sip_frame_result == NULL)
{
/* Allocate and set all values to zero */
- sip_frame_result = se_new0(sip_frame_result_value);
+ 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);
}