forked from osmocom/wireshark
parent
c5ffff76d8
commit
7850883904
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"))
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 ============== */
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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" : "",
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue