summaryrefslogtreecommitdiff
path: root/epan/dissectors
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-09-15 18:03:32 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-09-15 18:03:32 +0000
commit20a40260d7b8d0353f82f389b17c6c27223d8d95 (patch)
treea7670a45def65438a559090921ceeda76d9a1a3e /epan/dissectors
parenta54e67abce764d954d915d62f9d30b675b5262ce (diff)
downloadwireshark-20a40260d7b8d0353f82f389b17c6c27223d8d95.tar.gz
A few more dissectors converted to wmem
svn path=/trunk/; revision=52071
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-omron-fins.c3
-rw-r--r--epan/dissectors/packet-openwire.c13
-rw-r--r--epan/dissectors/packet-ositp.c6
-rw-r--r--epan/dissectors/packet-p_mul.c35
-rw-r--r--epan/dissectors/packet-pim.c21
-rw-r--r--epan/dissectors/packet-ppcap.c9
-rw-r--r--epan/dissectors/packet-ppi.c3
-rw-r--r--epan/dissectors/packet-ppp.c2
-rw-r--r--epan/dissectors/packet-pvfs2.c14
-rw-r--r--epan/dissectors/packet-q931.c4
-rw-r--r--epan/dissectors/packet-quakeworld.c5
11 files changed, 61 insertions, 54 deletions
diff --git a/epan/dissectors/packet-omron-fins.c b/epan/dissectors/packet-omron-fins.c
index 425f8f8837..83596e1f45 100644
--- a/epan/dissectors/packet-omron-fins.c
+++ b/epan/dissectors/packet-omron-fins.c
@@ -37,6 +37,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/expert.h>
+#include <epan/wmem/wmem.h>
#define OMRON_FINS_UDP_PORT 9600
@@ -1122,7 +1123,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
cmd_str = try_val_to_str_idx(command_code, command_code_cv, &cmd_str_idx);
if (cmd_str_idx == -1)
- cmd_str = ep_strdup_printf("Unknown (%d)", command_code);
+ cmd_str = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)", command_code);
/* Setup and fill in the INFO column if it's there */
icf_flags = tvb_get_guint8(tvb, offset);
diff --git a/epan/dissectors/packet-openwire.c b/epan/dissectors/packet-openwire.c
index 55730fb195..c79693079f 100644
--- a/epan/dissectors/packet-openwire.c
+++ b/epan/dissectors/packet-openwire.c
@@ -47,6 +47,7 @@
#include <epan/conversation.h>
#include <epan/prefs.h>
#include <epan/expert.h>
+#include <epan/wmem/wmem.h>
#include "packet-tcp.h"
static int proto_openwire = -1;
@@ -603,7 +604,7 @@ detect_protocol_options(tvbuff_t *tvb, packet_info *pinfo, int offset, int iComm
type = tvb_get_guint8(tvb, offset + 11);
command_id = tvb_get_ntohl(tvb, offset + 5);
- cd = se_new(openwire_conv_data);
+ cd = wmem_new(wmem_file_scope(), openwire_conv_data);
cd->caching = FALSE;
cd->tight = FALSE;
if (command_id > (1 << 24))
@@ -639,7 +640,7 @@ detect_protocol_options(tvbuff_t *tvb, packet_info *pinfo, int offset, int iComm
cd = (openwire_conv_data*)conversation_get_proto_data(conv, proto_openwire);
if (!cd)
{
- cd = se_new(openwire_conv_data);
+ cd = wmem_new(wmem_file_scope(), openwire_conv_data);
cd->tight = TRUE;
cd->caching = FALSE; /* Dummy value */
conversation_add_proto_data(conv, proto_openwire, cd);
@@ -680,7 +681,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
{
gint startOffset = offset;
proto_item *boolean_item = NULL;
- emem_strbuf_t *cache_strbuf = ep_strbuf_new_label("");
+ wmem_strbuf_t *cache_strbuf = wmem_strbuf_new_label(wmem_packet_scope());
if (type == OPENWIRE_TYPE_CACHED && retrieve_caching(pinfo) == TRUE && tvb_length_remaining(tvb, offset) >= 3)
{
@@ -689,7 +690,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
proto_item * cached_item = NULL;
inlined = tvb_get_guint8(tvb, offset + 0) == TRUE ? TRUE : FALSE;
cachedID = tvb_get_ntohs(tvb, offset + 1);
- ep_strbuf_append_printf(cache_strbuf, " (CachedID: %d)", cachedID);
+ wmem_strbuf_append_printf(cache_strbuf, " (CachedID: %d)", cachedID);
if (openwire_verbose_type)
{
proto_tree_add_item(tree, hf_openwire_cached_inlined, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -704,7 +705,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
{
proto_item *ti;
ti = proto_tree_add_item(tree, particularize(field, hf_openwire_type_object), tvb, startOffset, 3, ENC_NA);
- proto_item_append_text(ti, "%s", cache_strbuf->str);
+ proto_item_append_text(ti, "%s", wmem_strbuf_get_str(cache_strbuf));
return 3;
}
else
@@ -895,7 +896,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
proto_item *ti;
ti = proto_tree_add_item(tree, particularize(field, hf_openwire_type_object), tvb, startOffset, -1, ENC_NA);
proto_item_append_text(ti, ": %s", val_to_str_ext(type, &openwire_type_vals_ext, "Unknown (0x%02x)"));
- proto_item_append_text(ti, "%s", cache_strbuf->str);
+ proto_item_append_text(ti, "%s", wmem_strbuf_get_str(cache_strbuf));
object_tree = proto_item_add_subtree(ti, ett_openwire_type);
diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c
index 8716ee4126..a5d46dcb71 100644
--- a/epan/dissectors/packet-ositp.c
+++ b/epan/dissectors/packet-ositp.c
@@ -34,7 +34,7 @@
#include <epan/packet.h>
#include <epan/reassemble.h>
#include <epan/conversation.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include "packet-frame.h"
#include "packet-osi.h"
#include "packet-osi-options.h"
@@ -356,7 +356,7 @@ static gchar *print_tsap(const guchar *tsap, int length)
gboolean allprintable;
gint idx = 0, returned_length;
- cur=(gchar *)ep_alloc(MAX_TSAP_LEN * 2 + 3);
+ cur=(gchar *)wmem_alloc(wmem_packet_scope(), MAX_TSAP_LEN * 2 + 3);
cur[0] = '\0';
if (length <= 0 || length > MAX_TSAP_LEN)
g_snprintf(cur, MAX_TSAP_LEN * 2 + 3, "<unsupported TSAP length>");
@@ -1012,7 +1012,7 @@ static int ositp_decode_DT(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
prev_dst_ref = (guint32 *)p_get_proto_data (pinfo->fd, proto_clnp, 0);
if (!prev_dst_ref) {
/* First COTP in frame - save previous dst_ref as offset */
- prev_dst_ref = se_new(guint32);
+ prev_dst_ref = wmem_new(wmem_file_scope(), guint32);
*prev_dst_ref = cotp_dst_ref;
p_add_proto_data (pinfo->fd, proto_clnp, 0, prev_dst_ref);
} else if (cotp_frame_reset) {
diff --git a/epan/dissectors/packet-p_mul.c b/epan/dissectors/packet-p_mul.c
index 4a3097cf76..ec69f58946 100644
--- a/epan/dissectors/packet-p_mul.c
+++ b/epan/dissectors/packet-p_mul.c
@@ -43,6 +43,7 @@
#include <epan/reassemble.h>
#include <epan/expert.h>
#include <epan/asn1.h>
+#include <epan/wmem/wmem.h>
#include <string.h>
#include "packet-cdt.h"
@@ -330,7 +331,7 @@ static p_mul_seq_val *lookup_seq_val (guint32 message_id, guint16 seq_no,
address *addr)
{
p_mul_seq_val *pkg_data;
- p_mul_id_key *p_mul_key = se_new(p_mul_id_key);
+ p_mul_id_key *p_mul_key = wmem_new(wmem_file_scope(), p_mul_id_key);
p_mul_key->id = message_id;
p_mul_key->seq = seq_no;
@@ -358,7 +359,7 @@ static void copy_hashtable_data (gpointer key, p_mul_ack_data *ack_data1, GHashT
{
p_mul_ack_data *ack_data2;
- ack_data2 = se_new(p_mul_ack_data);
+ ack_data2 = wmem_new(wmem_file_scope(), p_mul_ack_data);
ack_data2->ack_id = ack_data1->ack_id;
ack_data2->ack_resend_count = ack_data1->ack_resend_count;
@@ -386,7 +387,7 @@ static p_mul_seq_val *register_p_mul_id (packet_info *pinfo, address *addr, guin
nstime_set_zero(&addr_time);
nstime_set_zero(&prev_time);
- p_mul_key = se_new(p_mul_id_key);
+ p_mul_key = wmem_new(wmem_file_scope(), p_mul_id_key);
if (!pinfo->fd->flags.visited &&
(pdu_type == Address_PDU || pdu_type == Data_PDU || pdu_type == Discard_Message_PDU))
@@ -459,7 +460,7 @@ static p_mul_seq_val *register_p_mul_id (packet_info *pinfo, address *addr, guin
ack_data = (p_mul_ack_data *)g_hash_table_lookup (p_mul_data->ack_data, GUINT_TO_POINTER(dstIP));
if (!ack_data) {
/* Only save reference to first ACK */
- ack_data = se_new0(p_mul_ack_data);
+ ack_data = wmem_new0(wmem_file_scope(), p_mul_ack_data);
ack_data->ack_id = pinfo->fd->num;
g_hash_table_insert (p_mul_data->ack_data, GUINT_TO_POINTER(dstIP), ack_data);
} else {
@@ -482,7 +483,7 @@ static p_mul_seq_val *register_p_mul_id (packet_info *pinfo, address *addr, guin
} else {
/* New message */
if (pdu_type == Ack_PDU) {
- p_mul_data = se_new0(p_mul_seq_val);
+ p_mul_data = wmem_new0(wmem_file_scope(), p_mul_seq_val);
} else {
p_mul_data = (p_mul_seq_val *)g_malloc0(sizeof (p_mul_seq_val));
}
@@ -493,7 +494,7 @@ static p_mul_seq_val *register_p_mul_id (packet_info *pinfo, address *addr, guin
if (pdu_type == Ack_PDU) {
/* No matching message for this ack */
- ack_data = se_new0(p_mul_ack_data);
+ ack_data = wmem_new0(wmem_file_scope(), p_mul_ack_data);
ack_data->ack_id = pinfo->fd->num;
g_hash_table_insert (p_mul_data->ack_data, GUINT_TO_POINTER(dstIP), ack_data);
} else {
@@ -513,7 +514,7 @@ static p_mul_seq_val *register_p_mul_id (packet_info *pinfo, address *addr, guin
}
/* Copy the current package data to the frame */
- pkg_data = se_new(p_mul_seq_val);
+ pkg_data = wmem_new(wmem_file_scope(), p_mul_seq_val);
*pkg_data = *p_mul_data;
if (p_mul_data->ack_data) {
/* Copy the hash table for ack data */
@@ -804,7 +805,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 pdu_type, *value, map = 0, fec_len;
gint i, tot_no_missing = 0, no_missing = 0, offset = 0;
address src, dst;
- emem_strbuf_t *message_id_list = NULL;
+ wmem_strbuf_t *message_id_list = NULL;
nstime_t ts;
col_set_str (pinfo->cinfo, COL_PROTOCOL, "P_MUL");
@@ -940,7 +941,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (pdu_type == Ack_PDU) {
/* Source ID of Ack Sender */
ip = tvb_get_ipv4 (tvb, offset);
- SET_ADDRESS (&dst, AT_IPv4, sizeof(ip), ep_memdup (&ip, 4));
+ SET_ADDRESS (&dst, AT_IPv4, sizeof(ip), wmem_memdup (wmem_packet_scope(), &ip, 4));
proto_tree_add_item (p_mul_tree, hf_source_id_ack, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -951,7 +952,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} else {
/* Source Id */
ip = tvb_get_ipv4 (tvb, offset);
- SET_ADDRESS (&src, AT_IPv4, sizeof(ip), ep_memdup (&ip, 4));
+ SET_ADDRESS (&src, AT_IPv4, sizeof(ip), wmem_memdup (wmem_packet_scope(), &ip, 4));
proto_tree_add_item (p_mul_tree, hf_source_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -1027,7 +1028,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Destination Id */
ip = tvb_get_ipv4 (tvb, offset);
- SET_ADDRESS (&dst, AT_IPv4, sizeof(ip), ep_memdup(&ip, 4));
+ SET_ADDRESS (&dst, AT_IPv4, sizeof(ip), wmem_memdup(wmem_packet_scope(), &ip, 4));
proto_tree_add_item (field_tree, hf_dest_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -1067,7 +1068,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case Ack_PDU:
- message_id_list = ep_strbuf_new_label("");
+ message_id_list = wmem_strbuf_new_label(wmem_packet_scope());
for (i = 0; i < count; i++) {
/* Ack Info Entry */
@@ -1089,7 +1090,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Source Id */
ip = tvb_get_ipv4 (tvb, offset);
- SET_ADDRESS (&src, AT_IPv4, sizeof(ip), ep_memdup (&ip, 4));
+ SET_ADDRESS (&src, AT_IPv4, sizeof(ip), wmem_memdup (wmem_packet_scope(), &ip, 4));
proto_tree_add_item (field_tree, hf_source_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -1109,9 +1110,9 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4;
if (i == 0) {
- ep_strbuf_printf (message_id_list, "%u", message_id);
+ wmem_strbuf_append_printf (message_id_list, "%u", message_id);
} else {
- ep_strbuf_append_printf (message_id_list, ",%u", message_id);
+ wmem_strbuf_append_printf (message_id_list, ",%u", message_id);
}
if (len > 10) {
@@ -1260,8 +1261,8 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (pdu_type != Ack_PDU) {
col_append_fstr (pinfo->cinfo, COL_INFO, ", MSID: %u", message_id);
} else {
- if (message_id_list && message_id_list->len > 0) {
- col_append_fstr (pinfo->cinfo, COL_INFO, ", MSID: %s", message_id_list->str);
+ if (message_id_list && wmem_strbuf_get_len(message_id_list) > 0) {
+ col_append_fstr (pinfo->cinfo, COL_INFO, ", MSID: %s", wmem_strbuf_get_str(message_id_list));
}
}
diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c
index 38c555d9c5..93364b1183 100644
--- a/epan/dissectors/packet-pim.c
+++ b/epan/dissectors/packet-pim.c
@@ -32,6 +32,7 @@
#include <epan/afn.h>
#include <epan/prefs.h>
#include <epan/in_cksum.h>
+#include <epan/wmem/wmem.h>
#include "packet-pim.h"
#define PIM_TYPE(x) ((x) & 0x0f)
@@ -133,13 +134,13 @@ dissect_pimv1_addr(tvbuff_t *tvb, int offset) {
flags_masklen = tvb_get_ntohs(tvb, offset);
if (flags_masklen & 0x0180) {
- return ep_strdup_printf("(%s%s%s) ",
- flags_masklen & 0x0100 ? "S" : "",
- flags_masklen & 0x0080 ? "W" : "",
- flags_masklen & 0x0040 ? "R" : "");
+ return wmem_strdup_printf(wmem_packet_scope(), "(%s%s%s) ",
+ flags_masklen & 0x0100 ? "S" : "",
+ flags_masklen & 0x0080 ? "W" : "",
+ flags_masklen & 0x0040 ? "R" : "");
} else {
- return ep_strdup_printf("%s/%u",
- tvb_ip_to_str(tvb, offset + 2), flags_masklen & 0x3f);
+ return wmem_strdup_printf(wmem_packet_scope(), "%s/%u",
+ tvb_ip_to_str(tvb, offset + 2), flags_masklen & 0x3f);
}
}
@@ -1011,7 +1012,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
for (i = 0; i < ngroup; i++) {
if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group,
- ep_strdup_printf("Group %d", i), &tigroup,
+ wmem_strdup_printf(wmem_packet_scope(), "Group %d", i), &tigroup,
hf_pim_group_ip4, hf_pim_group_ip6, &advance))
goto breakbreak3;
@@ -1073,7 +1074,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
for (i = 0; tvb_reported_length_remaining(tvb, offset) > 0; i++) {
if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group,
- ep_strdup_printf("Group %d", i), &tigroup,
+ wmem_strdup_printf(wmem_packet_scope(), "Group %d", i), &tigroup,
hf_pim_group_ip4, hf_pim_group_ip6, &advance))
goto breakbreak4;
@@ -1088,7 +1089,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
for (j = 0; j < frpcnt; j++) {
if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast,
- ep_strdup_printf("RP %d", j), NULL,
+ wmem_strdup_printf(wmem_packet_scope(), "RP %d", j), NULL,
hf_pim_rp_ip4, hf_pim_rp_ip6, &advance))
goto breakbreak4;
@@ -1162,7 +1163,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
for (i = 0; i < pfxcnt; i++) {
if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group,
- ep_strdup_printf("Group %d", i), NULL,
+ wmem_strdup_printf(wmem_packet_scope(), "Group %d", i), NULL,
hf_pim_group_ip4, hf_pim_group_ip6, &advance))
goto breakbreak8;
offset += advance;
diff --git a/epan/dissectors/packet-ppcap.c b/epan/dissectors/packet-ppcap.c
index 53c5192add..e7778bc32c 100644
--- a/epan/dissectors/packet-ppcap.c
+++ b/epan/dissectors/packet-ppcap.c
@@ -28,6 +28,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/wmem/wmem.h>
#include "packet-mtp3.h"
#define INVALID_SSN 0xff
@@ -239,7 +240,7 @@ dissect_ppcap_source_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree * ppc
offset += 1;
proto_tree_add_item(ppcap_tree1, hf_ppcap_spc, tvb, offset, 3, ENC_BIG_ENDIAN);
/*src_addr1 = (guint32 )tvb_get_ntoh24(tvb, offset);*/
- mtp3_addr_opc = ep_new0(mtp3_addr_pc_t);
+ mtp3_addr_opc = wmem_new0(wmem_packet_scope(), mtp3_addr_pc_t);
mtp3_addr_opc->pc = (guint32 )tvb_get_ntoh24(tvb, offset);
mtp3_addr_opc->type = ITU_STANDARD;
mtp3_addr_opc->ni = 0;
@@ -256,7 +257,7 @@ dissect_ppcap_source_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree * ppc
proto_tree_add_item(ppcap_tree1, hf_ppcap_opc, tvb, offset, msg_len, ENC_BIG_ENDIAN);
/*src_addr1 = (guint32 )tvb_get_ntoh24(tvb, offset);*/
- mtp3_addr_opc = ep_new0(mtp3_addr_pc_t);
+ mtp3_addr_opc = wmem_new0(wmem_packet_scope(), mtp3_addr_pc_t);
mtp3_addr_opc->pc = tvb_get_ntohl(tvb, offset);
mtp3_addr_opc->type = ITU_STANDARD;
mtp3_addr_opc->ni = 0;
@@ -328,7 +329,7 @@ dissect_ppcap_destination_address(tvbuff_t *tvb, packet_info * pinfo, proto_tree
proto_tree_add_item(ppcap_tree1, hf_ppcap_spc1, tvb, offset, 3, ENC_BIG_ENDIAN);
/*dst_addr1 = (guint32 )tvb_get_ntoh24(tvb, offset);*/
- mtp3_addr_dpc = ep_new0(mtp3_addr_pc_t);
+ mtp3_addr_dpc = wmem_new0(wmem_packet_scope(), mtp3_addr_pc_t);
mtp3_addr_dpc->pc = (guint32)tvb_get_ntoh24(tvb, offset);
mtp3_addr_dpc->type = ITU_STANDARD;
mtp3_addr_dpc->ni = 0;
@@ -346,7 +347,7 @@ dissect_ppcap_destination_address(tvbuff_t *tvb, packet_info * pinfo, proto_tree
proto_tree_add_item(ppcap_tree1, hf_ppcap_dpc, tvb, offset, 4, ENC_BIG_ENDIAN);
/*dst_addr1 = (guint32 )tvb_get_ntoh24(tvb, offset);*/
- mtp3_addr_dpc = ep_new0(mtp3_addr_pc_t);
+ mtp3_addr_dpc = wmem_new0(wmem_packet_scope(), mtp3_addr_pc_t);
mtp3_addr_dpc->pc = tvb_get_ntohl(tvb, offset);
mtp3_addr_dpc->type = ITU_STANDARD;
mtp3_addr_dpc->ni = 0;
diff --git a/epan/dissectors/packet-ppi.c b/epan/dissectors/packet-ppi.c
index 2ef89b1ce2..b0c4f2c8f1 100644
--- a/epan/dissectors/packet-ppi.c
+++ b/epan/dissectors/packet-ppi.c
@@ -55,6 +55,7 @@
#include <epan/expert.h>
#include <epan/reassemble.h>
#include <epan/frequency-utils.h>
+#include <epan/wmem/wmem.h>
/* Needed for wtap_pcap_encap_to_wtap_encap(). */
#include <wiretap/pcap-encap.h>
@@ -974,7 +975,7 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
while (fd_head) {
if (fd_head->tvb_data && fd_head->len) {
mpdu_count++;
- mpdu_str = ep_strdup_printf("MPDU #%d", mpdu_count);
+ mpdu_str = wmem_strdup_printf(pinfo->pool, "MPDU #%d", mpdu_count);
next_tvb = tvb_new_chain(tvb, fd_head->tvb_data);
add_new_data_source(pinfo, next_tvb, mpdu_str);
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index 7cb9329b18..54ea0d7cb7 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -3635,7 +3635,7 @@ dissect_vsncp_pdnaddress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
case 3:
{
- struct e_in6_addr *ad = ep_new0(struct e_in6_addr);
+ struct e_in6_addr *ad = wmem_new0(wmem_packet_scope(), struct e_in6_addr);
tvb_memcpy(tvb, &ad->bytes[8], offset + 3, 8);
proto_tree_add_text(field_tree, tvb, offset + 3, length - 3, "%s: %s",
diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c
index f912c6a59f..b7936123cb 100644
--- a/epan/dissectors/packet-pvfs2.c
+++ b/epan/dissectors/packet-pvfs2.c
@@ -40,7 +40,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/strutil.h>
#include "packet-tcp.h"
@@ -873,10 +873,10 @@ dissect_pvfs_opaque_data(tvbuff_t *tvb, int offset,
tmpstr = (char *) tvb_get_ephemeral_string(tvb, data_offset,
string_length_copy);
- string_buffer = (char *)memcpy(ep_alloc(string_length_copy+1), tmpstr, string_length_copy);
+ string_buffer = (char *)memcpy(wmem_alloc(wmem_packet_scope(), string_length_copy+1), tmpstr, string_length_copy);
} else {
string_buffer = (char *) tvb_memcpy(tvb,
- ep_alloc(string_length_copy+1), data_offset, string_length_copy);
+ wmem_alloc(wmem_packet_scope(), string_length_copy+1), data_offset, string_length_copy);
}
string_buffer[string_length_copy] = '\0';
@@ -894,7 +894,7 @@ dissect_pvfs_opaque_data(tvbuff_t *tvb, int offset,
string_buffer_size = (guint16)strlen(formatted) + 12 + 1;
/* alloc maximum data area */
- string_buffer_print = (char*) ep_alloc(string_buffer_size);
+ string_buffer_print = (char*) wmem_alloc(wmem_packet_scope(), string_buffer_size);
/* copy over the data */
g_snprintf((char *)string_buffer_print, string_buffer_size,
"%s<TRUNCATED>", formatted);
@@ -912,7 +912,7 @@ dissect_pvfs_opaque_data(tvbuff_t *tvb, int offset,
} else {
if (string_data) {
string_buffer_print =
- ep_strdup(format_text((guint8 *) string_buffer,
+ wmem_strdup(wmem_packet_scope(), format_text((guint8 *) string_buffer,
(int)strlen(string_buffer)));
} else {
string_buffer_print="<DATA>";
@@ -2993,10 +2993,10 @@ pvfs2_io_tracking_new_with_tag(guint64 tag, guint32 num)
pvfs2_io_tracking_value_t *value;
pvfs2_io_tracking_key_t *newkey;
- newkey = se_new0(pvfs2_io_tracking_key_t);
+ newkey = wmem_new0(wmem_file_scope(), pvfs2_io_tracking_key_t);
newkey->tag = tag;
- value = se_new0(pvfs2_io_tracking_value_t);
+ value = wmem_new0(wmem_file_scope(), pvfs2_io_tracking_value_t);
g_hash_table_insert(pvfs2_io_tracking_value_table, newkey, value);
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c
index baed359e2c..8df37df250 100644
--- a/epan/dissectors/packet-q931.c
+++ b/epan/dissectors/packet-q931.c
@@ -37,7 +37,7 @@
#include "packet-e164.h"
#include <epan/prefs.h>
#include <epan/reassemble.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/sctpppids.h>
#include <epan/lapd_sapi.h>
@@ -2578,7 +2578,7 @@ dissect_q931_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
fragment_head *fd_head;
tvbuff_t *next_tvb = NULL;
- q931_pi=ep_new(q931_packet_info);
+ q931_pi=wmem_new(wmem_packet_scope(), q931_packet_info);
/* Init struct for collecting q931_packet_info */
reset_q931_packet_info(q931_pi);
diff --git a/epan/dissectors/packet-quakeworld.c b/epan/dissectors/packet-quakeworld.c
index c3213e413b..53ece18dcd 100644
--- a/epan/dissectors/packet-quakeworld.c
+++ b/epan/dissectors/packet-quakeworld.c
@@ -36,6 +36,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/strutil.h>
+#include <epan/wmem/wmem.h>
static int proto_quakeworld = -1;
@@ -226,7 +227,7 @@ Cmd_TokenizeString(char* text)
return;
if (cmd_argc < MAX_ARGS) {
- cmd_argv[cmd_argc] = ep_strdup(com_token);
+ cmd_argv[cmd_argc] = wmem_strdup(wmem_packet_scope(), com_token);
cmd_argv_start[cmd_argc] = start + com_token_start;
cmd_argv_length[cmd_argc] = com_token_length;
cmd_argc++;
@@ -446,7 +447,7 @@ dissect_quakeworld_ConnectionlessPacket(tvbuff_t *tvb, packet_info *pinfo,
info_tree = proto_item_add_subtree(
info_item, ett_quakeworld_connectionless_connect_infostring);
dissect_id_infostring(tvb, info_tree, offset + Cmd_Argv_start(4),
- ep_strdup(infostring),
+ wmem_strdup(wmem_packet_scope(), infostring),
ett_quakeworld_connectionless_connect_infostring_key_value,
hf_quakeworld_connectionless_connect_infostring_key_value,
hf_quakeworld_connectionless_connect_infostring_key,