aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-09-15 15:11:11 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-09-15 15:11:11 +0000
commit78508839049dfc7163096b13db9e89f9091708f6 (patch)
tree436cba2be2b1cef227f8b6ae3f2b08b2499374cb /epan/dissectors
parentc5ffff76d87088bd66834af0ce8f2694d53fd54b (diff)
emem -> wmem
svn path=/trunk/; revision=52063
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-mac-lte-framed.c3
-rw-r--r--epan/dissectors/packet-mbtcp.c5
-rw-r--r--epan/dissectors/packet-meta.c3
-rw-r--r--epan/dissectors/packet-mgcp.c16
-rw-r--r--epan/dissectors/packet-miop.c14
-rw-r--r--epan/dissectors/packet-mmse.c5
-rw-r--r--epan/dissectors/packet-mndp.c4
-rw-r--r--epan/dissectors/packet-mq.c3
-rw-r--r--epan/dissectors/packet-msproxy.c20
-rw-r--r--epan/dissectors/packet-msrp.c8
-rw-r--r--epan/dissectors/packet-mtp3.c5
-rw-r--r--epan/dissectors/packet-multipart.c6
-rw-r--r--epan/dissectors/packet-nasdaq-itch.c5
-rw-r--r--epan/dissectors/packet-ncp.c6
-rw-r--r--epan/dissectors/packet-ndps.c8
-rw-r--r--epan/dissectors/packet-netanalyzer.c13
-rw-r--r--epan/dissectors/packet-netflow.c12
-rw-r--r--epan/dissectors/packet-netrom.c4
-rw-r--r--epan/dissectors/packet-nfsacl.c4
-rw-r--r--epan/dissectors/packet-nstrace.c11
20 files changed, 84 insertions, 71 deletions
diff --git a/epan/dissectors/packet-mac-lte-framed.c b/epan/dissectors/packet-mac-lte-framed.c
index 2a42e41dbd..b70fc265e1 100644
--- a/epan/dissectors/packet-mac-lte-framed.c
+++ b/epan/dissectors/packet-mac-lte-framed.c
@@ -26,6 +26,7 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/wmem/wmem.h>
#include "packet-mac-lte.h"
@@ -64,7 +65,7 @@ static void dissect_mac_lte_framed(tvbuff_t *tvb, packet_info *pinfo,
p_mac_lte_info = (struct mac_lte_info*)p_get_proto_data(pinfo->fd, proto_mac_lte, 0);
if (p_mac_lte_info == NULL) {
/* Allocate new info struct for this frame */
- p_mac_lte_info = (struct mac_lte_info*)se_alloc0(sizeof(struct mac_lte_info));
+ p_mac_lte_info = (struct mac_lte_info*)wmem_alloc0(wmem_file_scope(), sizeof(struct mac_lte_info));
infoAlreadySet = FALSE;
}
else {
diff --git a/epan/dissectors/packet-mbtcp.c b/epan/dissectors/packet-mbtcp.c
index 40309e4ab2..799f480617 100644
--- a/epan/dissectors/packet-mbtcp.c
+++ b/epan/dissectors/packet-mbtcp.c
@@ -76,6 +76,7 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/wmem/wmem.h>
#include "packet-tcp.h"
#include "packet-mbtcp.h"
#include <epan/prefs.h>
@@ -484,7 +485,7 @@ dissect_mbtcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
p_remove_proto_data(pinfo->fd, proto_modbus, 0);
/* Create enough context for Modbus dissector */
- request_info = ep_new(modbus_request_info_t);
+ request_info = 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;
@@ -625,7 +626,7 @@ dissect_mbrtu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
p_remove_proto_data(pinfo->fd, proto_modbus, 0);
/* Create enough context for Modbus dissector */
- request_info = ep_new(modbus_request_info_t);
+ request_info = 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;
diff --git a/epan/dissectors/packet-meta.c b/epan/dissectors/packet-meta.c
index e5949a138e..2b110cff20 100644
--- a/epan/dissectors/packet-meta.c
+++ b/epan/dissectors/packet-meta.c
@@ -28,6 +28,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/expert.h>
+#include <epan/wmem/wmem.h>
#include "packet-sscop.h"
#include "packet-gsm_a_common.h"
@@ -404,7 +405,7 @@ static guint16 evaluate_meta_item_dxt(proto_tree *meta_tree, tvbuff_t *tvb, pack
aal5proto = tvb_get_guint8(tvb, offs);
p_sscop_info = (sscop_payload_info *)p_get_proto_data(pinfo->fd, proto_sscop, 0);
if (!p_sscop_info) {
- p_sscop_info = se_new0(sscop_payload_info);
+ p_sscop_info = wmem_new0(wmem_file_scope(), sscop_payload_info);
p_add_proto_data(pinfo->fd, proto_sscop, 0, p_sscop_info);
}
switch (aal5proto) {
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c
index e5ac537250..c8e104953e 100644
--- a/epan/dissectors/packet-mgcp.c
+++ b/epan/dissectors/packet-mgcp.c
@@ -42,7 +42,7 @@
#include <string.h>
#include <epan/packet.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/prefs.h>
#include <epan/conversation.h>
#include <epan/tap.h>
@@ -1472,7 +1472,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (mgcp_type == MGCP_REQUEST)
{
endpointId = tvb_format_text(tvb, tvb_previous_offset,tokenlen);
- mi->endpointId = ep_strdup(endpointId);
+ mi->endpointId = wmem_strdup(wmem_packet_scope(), endpointId);
proto_tree_add_string(tree,hf_mgcp_req_endpoint, tvb,
tvb_previous_offset, tokenlen, endpointId);
}
@@ -1719,9 +1719,9 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
frame numbers are 1-origin, so we use 0
to mean "we don't yet know in which frame
the reply for this call appears". */
- new_mgcp_call_key = (mgcp_call_info_key *)se_alloc(sizeof(*new_mgcp_call_key));
+ new_mgcp_call_key = (mgcp_call_info_key *)wmem_alloc(wmem_file_scope(), sizeof(*new_mgcp_call_key));
*new_mgcp_call_key = mgcp_call_key;
- mgcp_call = (mgcp_call_t *)se_alloc(sizeof(*mgcp_call));
+ mgcp_call = (mgcp_call_t *)wmem_alloc(wmem_file_scope(), sizeof(*mgcp_call));
mgcp_call->req_num = pinfo->fd->num;
mgcp_call->rsp_num = 0;
mgcp_call->transid = mi->transid;
@@ -1854,12 +1854,12 @@ dissect_mgcp_connectionparams(proto_tree *parent_tree, tvbuff_t *tvb, gint offse
tokenline = tvb_get_ephemeral_string(tvb, offset, param_val_len);
/* Split into type=value pairs separated by comma */
- tokens = ep_strsplit(tokenline, ",", -1);
+ tokens = wmem_strsplit(wmem_packet_scope(), tokenline, ",", -1);
for (i = 0; tokens[i] != NULL; i++)
{
tokenlen = (int)strlen(tokens[i]);
- typval = ep_strsplit(tokens[i], "=", 2);
+ typval = wmem_strsplit(wmem_packet_scope(), tokens[i], "=", 2);
if ((typval[0] != NULL) && (typval[1] != NULL))
{
if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PS"))
@@ -1966,14 +1966,14 @@ dissect_mgcp_localconnectionoptions(proto_tree *parent_tree, tvbuff_t *tvb, gint
tokenline = tvb_get_ephemeral_string(tvb, offset, param_val_len);
/* Split into type=value pairs separated by comma */
- tokens = ep_strsplit(tokenline, ",", -1);
+ tokens = wmem_strsplit(wmem_packet_scope(), tokenline, ",", -1);
for (i = 0; tokens[i] != NULL; i++)
{
hf_uint = -1;
hf_string = -1;
tokenlen = (int)strlen(tokens[i]);
- typval = ep_strsplit(tokens[i], ":", 2);
+ typval = wmem_strsplit(wmem_packet_scope(), tokens[i], ":", 2);
if ((typval[0] != NULL) && (typval[1] != NULL))
{
if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "p"))
diff --git a/epan/dissectors/packet-miop.c b/epan/dissectors/packet-miop.c
index 118201af91..a7c98f972b 100644
--- a/epan/dissectors/packet-miop.c
+++ b/epan/dissectors/packet-miop.c
@@ -34,7 +34,7 @@
#include <epan/packet.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/expert.h>
#include "packet-giop.h"
@@ -138,7 +138,8 @@ static void dissect_miop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
guint32 unique_id_len;
- emem_strbuf_t *flags_strbuf = ep_strbuf_new_label("none");
+ wmem_strbuf_t *flags_strbuf = wmem_strbuf_new_label(wmem_packet_scope());
+ wmem_strbuf_append(flags_strbuf, "none");
col_set_str (pinfo->cinfo, COL_PROTOCOL, MIOP_MAGIC);
/* Clear out stuff in the info column */
@@ -197,14 +198,15 @@ static void dissect_miop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
"%u.%u", version_major, version_minor);
offset++;
if (flags & 0x01) {
- ep_strbuf_printf(flags_strbuf, "little-endian");
+ wmem_strbuf_truncate(flags_strbuf, 0);
+ wmem_strbuf_append(flags_strbuf, "little-endian");
}
if (flags & 0x02) {
- ep_strbuf_append_printf(flags_strbuf, "%s%s",
- flags_strbuf->len ? ", " : "", "last message");
+ wmem_strbuf_append_printf(flags_strbuf, "%s%s",
+ wmem_strbuf_get_len(flags_strbuf) ? ", " : "", "last message");
}
proto_tree_add_uint_format_value(miop_tree, hf_miop_flags, tvb, offset, 1,
- flags, "0x%02x (%s)", flags, flags_strbuf->str);
+ flags, "0x%02x (%s)", flags, wmem_strbuf_get_str(flags_strbuf));
offset++;
proto_tree_add_item(miop_tree, hf_miop_packet_length, tvb, offset, 2, byte_order);
offset += 2;
diff --git a/epan/dissectors/packet-mmse.c b/epan/dissectors/packet-mmse.c
index af0dc3a7d4..87dfdc8375 100644
--- a/epan/dissectors/packet-mmse.c
+++ b/epan/dissectors/packet-mmse.c
@@ -41,6 +41,7 @@
#include <epan/packet.h>
#include <epan/strutil.h>
+#include <epan/wmem/wmem.h>
#include "packet-wap.h"
#include "packet-wsp.h"
/* #include "packet-mmse.h" */ /* We autoregister */
@@ -764,9 +765,9 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
major = (version & 0x70) >> 4;
minor = version & 0x0F;
if (minor == 0x0F)
- vers_string = ep_strdup_printf("%u", major);
+ vers_string = wmem_strdup_printf(wmem_packet_scope(), "%u", major);
else
- vers_string = ep_strdup_printf("%u.%u", major, minor);
+ vers_string = wmem_strdup_printf(wmem_packet_scope(), "%u.%u", major, minor);
proto_tree_add_string(mmse_tree, hf_mmse_mms_version,
tvb, offset - 2, 2, vers_string);
}
diff --git a/epan/dissectors/packet-mndp.c b/epan/dissectors/packet-mndp.c
index ec9ab22c13..6e18725768 100644
--- a/epan/dissectors/packet-mndp.c
+++ b/epan/dissectors/packet-mndp.c
@@ -36,7 +36,7 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
/* protocol handles */
static int proto_mndp = -1;
@@ -111,7 +111,7 @@ extval_to_str_idx(guint32 val, const ext_value_string *vs, gint *idx, const char
if (ret != NULL)
return ret;
- return ep_strdup_printf(fmt, val);
+ return wmem_strdup_printf(wmem_packet_scope(), fmt, val);
}
/* ============= end copy/paste/modify ============== */
diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c
index 9484a741d2..ed1f67a447 100644
--- a/epan/dissectors/packet-mq.c
+++ b/epan/dissectors/packet-mq.c
@@ -73,6 +73,7 @@
#include <epan/conversation.h>
#include <epan/reassemble.h>
#include <epan/prefs.h>
+#include <epan/wmem/wmem.h>
#include "packet-tcp.h"
#include "packet-mq.h"
@@ -2290,7 +2291,7 @@ dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8* sFormat = NULL;
sFormat = tvb_get_ephemeral_string_enc(tvb, tMsgProps.iOffsetFormat, 8, string_rep);
if (strip_trailing_blanks(sFormat, 8) == 0)
- sFormat = (guint8*)ep_strdup("MQNONE");
+ sFormat = (guint8*)wmem_strdup(wmem_packet_scope(), "MQNONE");
col_append_fstr(pinfo->cinfo, COL_INFO, " Fmt=%s", sFormat);
if (tree)
diff --git a/epan/dissectors/packet-msproxy.c b/epan/dissectors/packet-msproxy.c
index 3723dd53f9..c0b24a7302 100644
--- a/epan/dissectors/packet-msproxy.c
+++ b/epan/dissectors/packet-msproxy.c
@@ -29,13 +29,13 @@
*/
/************************************************************************
- * *
- * Notes: These are possible command values. User input is welcome *
- * *
- * Command = 0x040a - Remote host closed connection (maybe ?? ) *
- * Command = 0x0411 - Remote host closed connection *
- * Command = 0x0413 - Local host closed connection or SYN worked *
- * *
+ * *
+ * Notes: These are possible command values. User input is welcome *
+ * *
+ * Command = 0x040a - Remote host closed connection (maybe ?? ) *
+ * Command = 0x0411 - Remote host closed connection *
+ * Command = 0x0413 - Local host closed connection or SYN worked *
+ * *
************************************************************************/
@@ -49,7 +49,7 @@
#include <epan/packet.h>
#include <epan/addr_resolv.h>
#include <epan/conversation.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/expert.h>
#include "packet-tcp.h"
@@ -289,7 +289,7 @@ static void add_msproxy_conversation( packet_info *pinfo,
}
conversation_set_dissector(conversation, msproxy_sub_handle);
- new_conv_info = se_new(redirect_entry_t);
+ new_conv_info = wmem_new(wmem_file_scope(), redirect_entry_t);
new_conv_info->remote_addr = hash_info->dst_addr;
new_conv_info->clnt_port = hash_info->clnt_port;
@@ -1089,7 +1089,7 @@ static void dissect_msproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hash_info = (hash_entry_t *)conversation_get_proto_data(conversation, proto_msproxy);
if ( !hash_info) {
- hash_info = se_new(hash_entry_t);
+ hash_info = wmem_new(wmem_file_scope(), hash_entry_t);
conversation_add_proto_data(conversation, proto_msproxy,
hash_info);
}
diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c
index f96f7a1eca..1782753df9 100644
--- a/epan/dissectors/packet-msrp.c
+++ b/epan/dissectors/packet-msrp.c
@@ -36,7 +36,7 @@
#include <epan/packet.h>
#include <epan/conversation.h>
#include <epan/strutil.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/prefs.h>
#include <wsutil/str_util.h>
@@ -199,7 +199,7 @@ msrp_add_address( packet_info *pinfo,
*/
if (!p_conv_data) {
/* Create conversation data */
- p_conv_data = se_new0(struct _msrp_conversation_info);
+ p_conv_data = wmem_new0(wmem_file_scope(), struct _msrp_conversation_info);
conversation_add_proto_data(p_conv, proto_msrp, p_conv_data);
}
@@ -240,8 +240,8 @@ show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (p_conv_data)
{
/* Save this conversation info into packet info */
- p_conv_packet_data = (struct _msrp_conversation_info *)se_memdup(p_conv_data,
- sizeof(struct _msrp_conversation_info));
+ 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);
}
diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c
index c374783e82..e835b73590 100644
--- a/epan/dissectors/packet-mtp3.c
+++ b/epan/dissectors/packet-mtp3.c
@@ -45,7 +45,6 @@
#include <epan/packet.h>
#include <epan/tap.h>
#include <epan/prefs.h>
-#include <epan/emem.h>
#include <epan/wmem/wmem.h>
#include "packet-q708.h"
#include "packet-sccp.h"
@@ -287,7 +286,7 @@ mtp3_pc_to_str(const guint32 pc)
{
gchar *str;
- str=(gchar *)ep_alloc(MAX_STRUCTURED_PC_LENGTH);
+ str=(gchar *)wmem_alloc(wmem_packet_scope(), MAX_STRUCTURED_PC_LENGTH);
mtp3_pc_to_str_buf(pc, str, MAX_STRUCTURED_PC_LENGTH);
return str;
}
@@ -698,7 +697,7 @@ reset_mtp3_standard(void)
static void
dissect_mtp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- mtp3_tap_rec_t* tap_rec = ep_new0(mtp3_tap_rec_t);
+ mtp3_tap_rec_t* tap_rec = wmem_new0(wmem_packet_scope(), mtp3_tap_rec_t);
gint heuristic_standard;
guint8 si;
mtp3_addr_pc_t* mtp3_addr_dpc;
diff --git a/epan/dissectors/packet-multipart.c b/epan/dissectors/packet-multipart.c
index 10fb1dbff7..0415783d5c 100644
--- a/epan/dissectors/packet-multipart.c
+++ b/epan/dissectors/packet-multipart.c
@@ -66,7 +66,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/base64.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include "packet-imf.h"
@@ -205,7 +205,7 @@ unfold_and_compact_mime_header(const char *lines, gint *first_colon_offset)
if (! lines) return NULL;
c = *p;
- ret = (char *)ep_alloc(strlen(lines) + 1);
+ ret = (char *)wmem_alloc(wmem_packet_scope(), strlen(lines) + 1);
q = ret;
while (c) {
@@ -658,7 +658,7 @@ process_body_part(proto_tree *tree, tvbuff_t *tvb, const guint8 *boundary,
if (semicolon_offset > 0) {
value_str[semicolon_offset] = '\0';
- parameters = ep_strdup(value_str + semicolon_offset + 1);
+ parameters = wmem_strdup(wmem_packet_scope(), value_str + semicolon_offset + 1);
} else {
parameters = NULL;
}
diff --git a/epan/dissectors/packet-nasdaq-itch.c b/epan/dissectors/packet-nasdaq-itch.c
index 4f3dd9c178..bbb008c3a5 100644
--- a/epan/dissectors/packet-nasdaq-itch.c
+++ b/epan/dissectors/packet-nasdaq-itch.c
@@ -42,6 +42,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
+#include <epan/wmem/wmem.h>
#include <wsutil/type_util.h>
/* Chi-X version */
@@ -173,12 +174,12 @@ time_stamp(tvbuff_t *tvb, proto_tree *nasdaq_itch_tree, int id, int offset, int
ms = val = (guint32)strtoul(str_value, NULL, 10);
switch (size) {
case 3:
- display = ep_strdup_printf(" %03u" , val);
+ display = wmem_strdup_printf(wmem_packet_scope(), " %03u" , val);
break;
case 5:
ms = val *1000;
case 8: /* 0 86 400 000 */
- display = ep_strdup_printf(" %u (%02u:%02u:%02u.%03u)", val,
+ display = wmem_strdup_printf(wmem_packet_scope(), " %u (%02u:%02u:%02u.%03u)", val,
ms/3600000, (ms % 3600000)/60000, (ms % 60000)/1000, ms %1000);
break;
}
diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c
index 31ca6534e9..accc248262 100644
--- a/epan/dissectors/packet-ncp.c
+++ b/epan/dissectors/packet-ncp.c
@@ -49,7 +49,7 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/prefs.h>
#include "packet-ipx.h"
#include "packet-tcp.h"
@@ -264,12 +264,12 @@ mncp_hash_insert(conversation_t *conversation, guint32 nwconnection, guint8 nwta
/* Now remember the request, so we can find it if we later
a reply to it. Track by conversation, connection, and task number.
in NetWare these values determine each unique session */
- key = se_new(mncp_rhash_key);
+ key = wmem_new(wmem_file_scope(), mncp_rhash_key);
key->conversation = conversation;
key->nwconnection = nwconnection;
key->nwtask = nwtask;
- value = se_new(mncp_rhash_value);
+ value = wmem_new(wmem_file_scope(), mncp_rhash_value);
g_hash_table_insert(mncp_rhash, key, value);
diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c
index 8efa4bf2dc..e45d355bce 100644
--- a/epan/dissectors/packet-ndps.c
+++ b/epan/dissectors/packet-ndps.c
@@ -32,7 +32,7 @@
#include <epan/reassemble.h>
#include <epan/conversation.h>
#include <epan/expert.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/strutil.h>
#include "packet-ipx.h"
@@ -2022,7 +2022,7 @@ ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset, char *
{
proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, 4, "<Not Specified>");
if (stringval != NULL)
- *stringval = ep_strdup("");
+ *stringval = wmem_strdup(wmem_packet_scope(), "");
return foffset;
}
if (str_length <= 2 || (str_length & 0x01) || tvb_get_guint8(tvb, foffset + 1) != 0) {
@@ -4138,11 +4138,11 @@ ndps_hash_insert(conversation_t *conversation, guint32 ndps_xport)
/* Now remember the request, so we can find it if we later
a reply to it. */
- request_key = se_new(ndps_req_hash_key);
+ request_key = wmem_new(wmem_file_scope(), ndps_req_hash_key);
request_key->conversation = conversation;
request_key->ndps_xport = ndps_xport;
- request_value = se_new(ndps_req_hash_value);
+ request_value = wmem_new(wmem_file_scope(), ndps_req_hash_value);
request_value->ndps_prog = 0;
request_value->ndps_func = 0;
request_value->ndps_frame_num = 0;
diff --git a/epan/dissectors/packet-netanalyzer.c b/epan/dissectors/packet-netanalyzer.c
index cec6eda34c..ce4002c10f 100644
--- a/epan/dissectors/packet-netanalyzer.c
+++ b/epan/dissectors/packet-netanalyzer.c
@@ -60,6 +60,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/wmem/wmem.h>
#include <expert.h>
@@ -207,12 +208,12 @@ dissect_netanalyzer_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else
{
- emem_strbuf_t *strbuf;
+ wmem_strbuf_t *strbuf;
gboolean first = TRUE;
ti_status = proto_tree_add_uint_format(netanalyzer_header_tree, hf_netanalyzer_status, tvb, 0, 1,
packet_status, "Status: Error present (expand tree for details)");
- strbuf = ep_strbuf_new_label("");
+ strbuf = wmem_strbuf_new_label(wmem_epan_scope());
for (idx = 0; idx < 8; idx++)
{
if (packet_status & (1 << idx))
@@ -223,12 +224,12 @@ dissect_netanalyzer_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else
{
- ep_strbuf_append(strbuf, ", ");
+ wmem_strbuf_append(strbuf, ", ");
}
- ep_strbuf_append(strbuf, msk_strings[idx]);
+ wmem_strbuf_append(strbuf, msk_strings[idx]);
}
}
- proto_item_append_text(ti, "%s)", strbuf->str);
+ proto_item_append_text(ti, "%s)", wmem_strbuf_get_str(strbuf));
}
netanalyzer_status_tree = proto_item_add_subtree(ti_status, ett_netanalyzer_status);
@@ -270,7 +271,7 @@ dissect_netanalyzer_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
(tvb_get_guint8(tvb, INFO_TYPE_OFFSET) == 0x00) )
{
#define MAX_BUFFER 255
- szTemp=(guchar *)ep_alloc(MAX_BUFFER);
+ szTemp=(guchar *)wmem_alloc(wmem_epan_scope(), MAX_BUFFER);
/* everything ok */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "netANALYZER");
diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c
index 6ad21b978f..989d0e56f3 100644
--- a/epan/dissectors/packet-netflow.c
+++ b/epan/dissectors/packet-netflow.c
@@ -126,7 +126,7 @@
#include "config.h"
#include <epan/packet.h>
-
+#include <epan/wmem/wmem.h>
#include <epan/prefs.h>
#include <epan/sminmpec.h>
#include <epan/dissectors/packet-tcp.h>
@@ -5427,8 +5427,8 @@ dissect_v9_v10_options_template(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p
/* ToDo: Test for changed template ? If so: expert ? */
break; /* Don't allow cacheing of this template */
}
- tmplt.fields_p[TF_SCOPES] = (v9_v10_tmplt_entry_t *)se_alloc0(option_scope_field_count *sizeof(v9_v10_tmplt_entry_t));
- tmplt.fields_p[TF_ENTRIES] = (v9_v10_tmplt_entry_t *)se_alloc0(option_field_count *sizeof(v9_v10_tmplt_entry_t));
+ tmplt.fields_p[TF_SCOPES] = (v9_v10_tmplt_entry_t *)wmem_alloc0(wmem_file_scope(), option_scope_field_count *sizeof(v9_v10_tmplt_entry_t));
+ tmplt.fields_p[TF_ENTRIES] = (v9_v10_tmplt_entry_t *)wmem_alloc0(wmem_file_scope(), option_field_count *sizeof(v9_v10_tmplt_entry_t));
break;
} while (FALSE);
}
@@ -5441,7 +5441,7 @@ dissect_v9_v10_options_template(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p
if ((tmplt_p == NULL) && (tmplt.fields_p[TF_SCOPES] || tmplt.fields_p[TF_ENTRIES])) {
/* create permanent template copy for storage in template table */
- tmplt_p = (v9_v10_tmplt_t *)se_memdup(&tmplt, sizeof(tmplt));
+ tmplt_p = (v9_v10_tmplt_t *)wmem_memdup(wmem_file_scope(), &tmplt, sizeof(tmplt));
SE_COPY_ADDRESS(&tmplt_p->src_addr, &pinfo->net_src);
SE_COPY_ADDRESS(&tmplt_p->dst_addr, &pinfo->net_dst);
g_hash_table_insert(v9_v10_tmplt_table, tmplt_p, tmplt_p);
@@ -5520,7 +5520,7 @@ dissect_v9_v10_data_template(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdut
/* ToDo: Test for changed template ? If so: expert ? */
break; /* Don't allow cacheing of this template */
}
- tmplt.fields_p[TF_ENTRIES] = (v9_v10_tmplt_entry_t *)se_alloc0(count * sizeof(v9_v10_tmplt_entry_t));
+ tmplt.fields_p[TF_ENTRIES] = (v9_v10_tmplt_entry_t *)wmem_alloc0(wmem_file_scope(), count * sizeof(v9_v10_tmplt_entry_t));
break;
} while (FALSE);
}
@@ -5529,7 +5529,7 @@ dissect_v9_v10_data_template(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdut
if ((tmplt_p == NULL) && tmplt.fields_p[TF_ENTRIES]) {
/* create permanent template copy for storage in template table */
- tmplt_p = (v9_v10_tmplt_t *)se_memdup(&tmplt, sizeof(tmplt));
+ tmplt_p = (v9_v10_tmplt_t *)wmem_memdup(wmem_file_scope(), &tmplt, sizeof(tmplt));
SE_COPY_ADDRESS(&tmplt_p->src_addr, &pinfo->net_src);
SE_COPY_ADDRESS(&tmplt_p->dst_addr, &pinfo->net_dst);
g_hash_table_insert(v9_v10_tmplt_table, tmplt_p, tmplt_p);
diff --git a/epan/dissectors/packet-netrom.c b/epan/dissectors/packet-netrom.c
index e299352930..80167f297e 100644
--- a/epan/dissectors/packet-netrom.c
+++ b/epan/dissectors/packet-netrom.c
@@ -48,7 +48,7 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/ax25_pids.h>
#include "packet-netrom.h"
@@ -163,7 +163,7 @@ dissect_netrom_type(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *t
type = tvb_get_guint8( tvb, offset );
op_code = type &0x0f;
- info_buffer = ep_strdup_printf( "%s%s%s%s (0x%02x)",
+ info_buffer = wmem_strdup_printf( wmem_packet_scope(), "%s%s%s%s (0x%02x)",
val_to_str_const( op_code, op_code_vals_text, "Unknown" ),
( type & NETROM_MORE_FLAG ) ? ", More" : "",
( type & NETROM_NAK_FLAG ) ? ", NAK" : "",
diff --git a/epan/dissectors/packet-nfsacl.c b/epan/dissectors/packet-nfsacl.c
index 1b57908fa7..8707027c75 100644
--- a/epan/dissectors/packet-nfsacl.c
+++ b/epan/dissectors/packet-nfsacl.c
@@ -27,6 +27,8 @@
#include "config.h"
+#include <epan/wmem/wmem.h>
+
#include "packet-rpc.h"
#include "packet-nfs.h"
@@ -307,7 +309,7 @@ dissect_nfsacl2_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* Get access mask to check and save it for comparison to the access reply. */
amask = tvb_get_ntohl(tvb, offset);
- acc_request = (guint32 *)se_memdup( &amask, sizeof(guint32));
+ acc_request = (guint32 *)wmem_memdup(wmem_file_scope(), &amask, sizeof(guint32));
civ = (rpc_call_info_value *)pinfo->private_data;
civ->private_data = acc_request;
diff --git a/epan/dissectors/packet-nstrace.c b/epan/dissectors/packet-nstrace.c
index 75c151b378..d7a5c7c710 100644
--- a/epan/dissectors/packet-nstrace.c
+++ b/epan/dissectors/packet-nstrace.c
@@ -27,6 +27,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/wmem/wmem.h>
#include <wiretap/netscaler.h>
static int proto_nstrace = -1;
@@ -145,7 +146,7 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb_eth_client;
guint8 offset;
guint i, bpos;
- emem_strbuf_t *flags_strbuf = ep_strbuf_new_label("None");
+ wmem_strbuf_t *flags_strbuf = wmem_strbuf_new_label(wmem_packet_scope());
static const gchar *flags[] = {"FP", "FR", "DFD", "SRSS", "RSSH"};
gboolean first_flag = TRUE;
guint8 flagoffset, flagval;
@@ -153,6 +154,8 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 variable_ns_len = 0;
guint flagval32;
+ wmem_strbuf_append(flags_strbuf, "None");
+
if (pnstr->rec_type == NSPR_HEADER_VERSION205)
{
src_vmname_len = tvb_get_guint8(tvb,pnstr->src_vmname_len_offset);
@@ -201,9 +204,9 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
bpos = 1 << i;
if (flagval & bpos) {
if (first_flag) {
- ep_strbuf_truncate(flags_strbuf, 0);
+ wmem_strbuf_truncate(flags_strbuf, 0);
}
- ep_strbuf_append_printf(flags_strbuf, "%s%s", first_flag ? "" : ", ", flags[i]);
+ wmem_strbuf_append_printf(flags_strbuf, "%s%s", first_flag ? "" : ", ", flags[i]);
first_flag = FALSE;
}
}
@@ -212,7 +215,7 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ns_tree, hf_ns_dnode, tvb, pnstr->destnodeid_offset, 2, ENC_LITTLE_ENDIAN);
flagitem = proto_tree_add_uint_format_value(ns_tree, hf_ns_clflags, tvb, flagoffset, 1, flagval,
- "0x%02x (%s)", flagval, flags_strbuf->str);
+ "0x%02x (%s)", flagval, wmem_strbuf_get_str(flags_strbuf));
flagtree = proto_item_add_subtree(flagitem, ett_ns_flags);
proto_tree_add_boolean(flagtree, hf_ns_clflags_res, tvb, flagoffset, 1, flagval);