aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asn1/pres/packet-pres-template.c6
-rw-r--r--epan/dissectors/packet-nbap.c37
-rw-r--r--epan/dissectors/packet-p1.c88
-rw-r--r--epan/dissectors/packet-pres.c6
-rw-r--r--epan/dissectors/packet-ranap.c30
-rw-r--r--epan/dissectors/packet-rrc.c17
6 files changed, 93 insertions, 91 deletions
diff --git a/asn1/pres/packet-pres-template.c b/asn1/pres/packet-pres-template.c
index 7b17637970..d64a1fc38e 100644
--- a/asn1/pres/packet-pres-template.c
+++ b/asn1/pres/packet-pres-template.c
@@ -30,7 +30,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/conversation.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/expert.h>
#include <epan/uat.h>
@@ -141,9 +141,9 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
return;
}
- pco=se_new(pres_ctx_oid_t);
+ pco=wmem_new(wmem_file_scope(), pres_ctx_oid_t);
pco->ctx_id=idx;
- pco->oid=se_strdup(oid);
+ pco->oid=wmem_strdup(wmem_file_scope(), oid);
conversation=find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
if (conversation) {
diff --git a/epan/dissectors/packet-nbap.c b/epan/dissectors/packet-nbap.c
index 26875dc3f5..139b2904b6 100644
--- a/epan/dissectors/packet-nbap.c
+++ b/epan/dissectors/packet-nbap.c
@@ -40,6 +40,7 @@
#include <epan/packet.h>
#include <epan/sctpppids.h>
#include <epan/asn1.h>
+#include <epan/wmem/wmem.h>
#include <epan/conversation.h>
#include <epan/expert.h>
#include <epan/prefs.h>
@@ -1545,7 +1546,7 @@ typedef enum _ProtocolIE_ID_enum {
} ProtocolIE_ID_enum;
/*--- End of included file: packet-nbap-val.h ---*/
-#line 83 "../../asn1/nbap/packet-nbap-template.c"
+#line 84 "../../asn1/nbap/packet-nbap-template.c"
/* Initialize the protocol and registered fields */
static int proto_nbap = -1;
@@ -4849,7 +4850,7 @@ static int hf_nbap_RACH_SubChannelNumbers_subCh1 = -1;
static int hf_nbap_RACH_SubChannelNumbers_subCh0 = -1;
/*--- End of included file: packet-nbap-hf.c ---*/
-#line 91 "../../asn1/nbap/packet-nbap-template.c"
+#line 92 "../../asn1/nbap/packet-nbap-template.c"
/* Initialize the subtree pointers */
static int ett_nbap = -1;
@@ -6488,7 +6489,7 @@ static gint ett_nbap_UnsuccessfulOutcome = -1;
static gint ett_nbap_Outcome = -1;
/*--- End of included file: packet-nbap-ett.c ---*/
-#line 99 "../../asn1/nbap/packet-nbap-template.c"
+#line 100 "../../asn1/nbap/packet-nbap-template.c"
static expert_field ei_nbap_no_find_comm_context_id = EI_INIT;
static expert_field ei_nbap_no_find_port_info = EI_INIT;
@@ -6897,7 +6898,7 @@ dissect_nbap_ProcedureID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_
ett_nbap_ProcedureID, ProcedureID_sequence);
#line 106 "../../asn1/nbap/nbap.cnf"
- ProcedureID = ep_strdup_printf("%s/%s",
+ ProcedureID = wmem_strdup_printf(wmem_packet_scope(), "%s/%s",
val_to_str(ProcedureCode, VALS(nbap_ProcedureCode_vals), "unknown(%u)"),
val_to_str(ddMode, VALS(nbap_DdMode_vals), "unknown(%u)"));
crcn_context_present = FALSE; /*Reset CRNC Com context present flag.*/
@@ -18669,7 +18670,7 @@ BindingID_port = 0;
/* Set dissector */
conversation_set_dissector(conversation, fp_handle);
if(actx->pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/*Steal the old informatoin*/
memcpy(umts_fp_conversation_info,conversation_get_proto_data(old_conversation, proto_fp),sizeof(umts_fp_conversation_info_t));
@@ -23364,7 +23365,7 @@ int i;
/*Set NBAP configuration to lower layers*/
if(actx->pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/*Select frame type = 3 according to paragraph 5.1.6 in 3GPP TS 25.435*/
umts_fp_conversation_info->channel = CHANNEL_HSDSCH_COMMON;
umts_fp_conversation_info->division = Division_FDD;
@@ -23814,7 +23815,7 @@ dissect_nbap_HSDSCH_FDD_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
conversation_set_dissector(conversation, fp_handle);
if(actx->pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/* Fill in the HSDSCH relevant data */
umts_fp_conversation_info->iface_type = IuB_Interface;
@@ -24152,7 +24153,7 @@ dissect_nbap_HSDSCH_Information_to_Modify(tvbuff_t *tvb _U_, int offset _U_, asn
conversation_set_dissector(conversation, fp_handle);
if(actx->pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/* Fill in the HSDSCH relevant data */
umts_fp_conversation_info->iface_type = IuB_Interface;
@@ -28678,7 +28679,7 @@ dch_id = 0xFFFFFFFF;
/* Set dissector */
conversation_set_dissector(conversation, fp_handle);
if(actx->pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/* Fill in the data */
umts_fp_conversation_info->iface_type = IuB_Interface;
@@ -28822,7 +28823,7 @@ BindingID_port = 0;
/* Set dissector */
conversation_set_dissector(conversation, fp_handle);
if(actx->pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/* Fill in the data */
umts_fp_conversation_info->iface_type = IuB_Interface;
umts_fp_conversation_info->division = Division_FDD;
@@ -32383,7 +32384,7 @@ transportFormatSet_type = NBAP_CPCH;
/* Set dissector */
conversation_set_dissector(conversation, fp_handle);
if(actx->pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/* Fill in the data */
umts_fp_conversation_info->iface_type = IuB_Interface;
umts_fp_conversation_info->division = Division_FDD;
@@ -32548,7 +32549,7 @@ num_items = 1;
/* Set dissector */
conversation_set_dissector(conversation, fp_handle);
if(actx->pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/* Fill in the data */
umts_fp_conversation_info->iface_type = IuB_Interface;
umts_fp_conversation_info->division = Division_FDD;
@@ -32691,7 +32692,7 @@ transportFormatSet_type = NBAP_CPCH;
/* Set dissector */
conversation_set_dissector(conversation, fp_handle);
if(actx->pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/* Fill in the data */
umts_fp_conversation_info->iface_type = IuB_Interface;
umts_fp_conversation_info->division = Division_FDD;
@@ -55161,7 +55162,7 @@ static int dissect_NULL_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tre
/*--- End of included file: packet-nbap-fn.c ---*/
-#line 321 "../../asn1/nbap/packet-nbap-template.c"
+#line 322 "../../asn1/nbap/packet-nbap-template.c"
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
@@ -55219,7 +55220,7 @@ static void add_hsdsch_bind(packet_info *pinfo){
conversation_set_dissector(conversation, fp_handle);
if(pinfo->link_dir==P2P_DIR_DL){
- umts_fp_conversation_info = se_new0(umts_fp_conversation_info_t);
+ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t);
/* Fill in the HSDSCH relevant data */
umts_fp_conversation_info->iface_type = IuB_Interface;
@@ -68495,7 +68496,7 @@ void proto_register_nbap(void)
NULL, HFILL }},
/*--- End of included file: packet-nbap-hfarr.c ---*/
-#line 490 "../../asn1/nbap/packet-nbap-template.c"
+#line 491 "../../asn1/nbap/packet-nbap-template.c"
};
/* List of subtrees */
@@ -70135,7 +70136,7 @@ void proto_register_nbap(void)
&ett_nbap_Outcome,
/*--- End of included file: packet-nbap-ettarr.c ---*/
-#line 499 "../../asn1/nbap/packet-nbap-template.c"
+#line 500 "../../asn1/nbap/packet-nbap-template.c"
};
static ei_register_info ei[] = {
@@ -71289,7 +71290,7 @@ proto_reg_handoff_nbap(void)
/*--- End of included file: packet-nbap-dis-tab.c ---*/
-#line 556 "../../asn1/nbap/packet-nbap-template.c"
+#line 557 "../../asn1/nbap/packet-nbap-template.c"
}
diff --git a/epan/dissectors/packet-p1.c b/epan/dissectors/packet-p1.c
index 2835029cb2..a8e8902fb9 100644
--- a/epan/dissectors/packet-p1.c
+++ b/epan/dissectors/packet-p1.c
@@ -900,7 +900,7 @@ typedef struct p1_address_ctx {
gboolean do_address;
const char *content_type_id;
gboolean report_unknown_content_type;
- emem_strbuf_t* oraddress;
+ wmem_strbuf_t* oraddress;
} p1_address_ctx_t;
static void set_do_address(asn1_ctx_t* actx, gboolean do_address)
@@ -908,7 +908,7 @@ static void set_do_address(asn1_ctx_t* actx, gboolean do_address)
p1_address_ctx_t* ctx;
if (actx->subtree.tree_ctx == NULL) {
- actx->subtree.tree_ctx = ep_new0(p1_address_ctx_t);
+ actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t);
}
ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
@@ -921,10 +921,10 @@ static void do_address(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx)
if (ctx && ctx->do_address) {
if (addr) {
- ep_strbuf_append(ctx->oraddress, addr);
+ wmem_strbuf_append(ctx->oraddress, addr);
}
if (tvb_string) {
- ep_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_length(tvb_string)));
+ wmem_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_length(tvb_string)));
}
}
@@ -932,25 +932,25 @@ static void do_address(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx)
static void do_address_str(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx)
{
- emem_strbuf_t *ddatype = (emem_strbuf_t *)actx->value_ptr;
+ wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr;
p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
do_address(addr, tvb_string, actx);
if (ctx && ctx->do_address && ddatype && tvb_string)
- ep_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_length(tvb_string)));
+ wmem_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_length(tvb_string)));
}
static void do_address_str_tree(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx, proto_tree* tree)
{
- emem_strbuf_t *ddatype = (emem_strbuf_t *)actx->value_ptr;
+ wmem_strbuf_t *ddatype = (wmem_strbuf_t *)actx->value_ptr;
p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
do_address(addr, tvb_string, actx);
if (ctx && ctx->do_address && tvb_string && ddatype) {
- if (ddatype->len > 0) {
- proto_item_append_text (tree, " (%s=%s)", ddatype->str, tvb_format_text(tvb_string, 0, tvb_length(tvb_string)));
+ if (wmem_strbuf_get_len(ddatype) > 0) {
+ proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(tvb_string, 0, tvb_length(tvb_string)));
}
}
}
@@ -1050,8 +1050,8 @@ dissect_p1_TokenTypeIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
static int
dissect_p1_TokenTypeData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1154 "../../asn1/p1/p1.cnf"
-
- if(actx->external.direct_reference)
+
+ if(actx->external.direct_reference)
call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree);
@@ -1675,23 +1675,23 @@ dissect_p1_GlobalDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
p1_address_ctx_t* ctx;
if (actx->subtree.tree_ctx == NULL) {
- actx->subtree.tree_ctx = ep_new0(p1_address_ctx_t);
+ actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t);
}
ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
- ctx->oraddress = ep_strbuf_new("");
+ ctx->oraddress = wmem_strbuf_new(wmem_packet_scope(), "");
actx->subtree.tree = tree;
-
+
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
hf_index, BER_CLASS_APP, 3, TRUE, dissect_p1_GlobalDomainIdentifier_U);
- if (ctx->oraddress && (ctx->oraddress->len > 0)) {
- proto_item_append_text(actx->subtree.tree, " (%s/", ctx->oraddress->str);
+ if (ctx->oraddress && (wmem_strbuf_get_len(ctx->oraddress) > 0)) {
+ proto_item_append_text(actx->subtree.tree, " (%s/", wmem_strbuf_get_str(ctx->oraddress));
if (hf_index == hf_p1_subject_identifier) {
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%s/", ctx->oraddress->str);
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%s/", wmem_strbuf_get_str(ctx->oraddress));
}
}
@@ -1706,7 +1706,7 @@ dissect_p1_GlobalDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_p1_LocalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1050 "../../asn1/p1/p1.cnf"
- tvbuff_t *id = NULL;
+ tvbuff_t *id = NULL;
p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
@@ -1718,7 +1718,7 @@ dissect_p1_LocalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
if (ctx && ctx->do_address)
proto_item_append_text(actx->subtree.tree, " $ %s)", tvb_format_text(id, 0, tvb_length(id)));
- if (hf_index == hf_p1_subject_identifier)
+ if (hf_index == hf_p1_subject_identifier)
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %s)", tvb_format_text(id, 0, tvb_length(id)));
}
@@ -2081,7 +2081,7 @@ dissect_p1_T_printable_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
do_address_str("/DD.", pstring, actx);
-
+
return offset;
@@ -2100,7 +2100,7 @@ dissect_p1_T_printable_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
do_address_str_tree("=", pstring, actx, tree);
-
+
return offset;
@@ -2116,7 +2116,7 @@ static const ber_sequence_t BuiltInDomainDefinedAttribute_sequence[] = {
static int
dissect_p1_BuiltInDomainDefinedAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 974 "../../asn1/p1/p1.cnf"
- actx->value_ptr = ep_strbuf_new("");
+ actx->value_ptr = wmem_strbuf_new(wmem_packet_scope(), "");
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
BuiltInDomainDefinedAttribute_sequence, hf_index, ett_p1_BuiltInDomainDefinedAttribute);
@@ -2273,11 +2273,11 @@ dissect_p1_ORName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
p1_address_ctx_t* ctx;
if (actx->subtree.tree_ctx == NULL) {
- actx->subtree.tree_ctx = ep_new0(p1_address_ctx_t);
+ actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t);
}
ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
- ctx->oraddress = ep_strbuf_new("");
+ ctx->oraddress = wmem_strbuf_new(wmem_packet_scope(), "");
actx->subtree.tree = NULL;
set_do_address(actx, TRUE);
@@ -2286,8 +2286,8 @@ dissect_p1_ORName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
hf_index, BER_CLASS_APP, 0, TRUE, dissect_p1_ORName_U);
- if (ctx->oraddress && (ctx->oraddress->len > 0) && actx->subtree.tree)
- proto_item_append_text(actx->subtree.tree, " (%s/)", ctx->oraddress->str);
+ if (ctx->oraddress && (wmem_strbuf_get_len(ctx->oraddress) > 0) && actx->subtree.tree)
+ proto_item_append_text(actx->subtree.tree, " (%s/)", wmem_strbuf_get_str(ctx->oraddress));
set_do_address(actx, FALSE);
@@ -2490,7 +2490,7 @@ dissect_p1_BuiltInContentType_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
p1_address_ctx_t* ctx;
if (actx->subtree.tree_ctx == NULL)
- actx->subtree.tree_ctx = ep_new0(p1_address_ctx_t);
+ actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t);
ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
@@ -2535,7 +2535,7 @@ dissect_p1_ExtendedContentType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
p1_address_ctx_t* ctx;
if (actx->subtree.tree_ctx == NULL)
- actx->subtree.tree_ctx = ep_new0(p1_address_ctx_t);
+ actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t);
ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
@@ -2728,14 +2728,14 @@ static int
dissect_p1_T_bilateral_information(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1190 "../../asn1/p1/p1.cnf"
proto_item *item = NULL;
- int loffset = 0;
+ int loffset = 0;
guint32 len = 0;
/* work out the length */
loffset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, NULL, NULL, NULL);
(void) dissect_ber_length(actx->pinfo, tree, tvb, loffset, &len, NULL);
- /* create some structure so we can tell what this unknown ASN.1 represents */
+ /* create some structure so we can tell what this unknown ASN.1 represents */
item = proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p1_bilateral_information);
@@ -3647,7 +3647,7 @@ dissect_p1_ReportType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
ReportType_choice, hf_index, ett_p1_ReportType,
&report);
-
+
if( (report!=-1) && p1_ReportType_vals[report].strptr ){
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", p1_ReportType_vals[report].strptr);
}
@@ -3783,11 +3783,11 @@ dissect_p1_MTS_APDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
#line 1208 "../../asn1/p1/p1.cnf"
gint apdu = -1;
- offset = dissect_ber_choice(actx, tree, tvb, offset,
+ offset = dissect_ber_choice(actx, tree, tvb, offset,
MTS_APDU_choice, hf_index, ett_p1_MTS_APDU,
&apdu);
-
+
if( (apdu!=-1) && p1_MTS_APDU_vals[apdu].strptr ){
if(apdu != 0) { /* we don't show "message" - sub-dissectors have better idea */
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", p1_MTS_APDU_vals[apdu].strptr);
@@ -5736,11 +5736,11 @@ dissect_p1_ORAddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
p1_address_ctx_t* ctx;
if (actx->subtree.tree_ctx == NULL) {
- actx->subtree.tree_ctx = ep_new0(p1_address_ctx_t);
+ actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t);
}
ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
- ctx->oraddress = ep_strbuf_new("");
+ ctx->oraddress = wmem_strbuf_new(wmem_packet_scope(), "");
actx->subtree.tree = NULL;
set_do_address(actx, TRUE);
@@ -5748,10 +5748,10 @@ dissect_p1_ORAddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
ORAddress_sequence, hf_index, ett_p1_ORAddress);
-
- if (ctx->oraddress && (ctx->oraddress->len > 0) && actx->subtree.tree)
- proto_item_append_text(actx->subtree.tree, " (%s/)", ctx->oraddress->str);
+
+ if (ctx->oraddress && (wmem_strbuf_get_len(ctx->oraddress) > 0) && actx->subtree.tree)
+ proto_item_append_text(actx->subtree.tree, " (%s/)", wmem_strbuf_get_str(ctx->oraddress));
set_do_address(actx, FALSE);
@@ -7076,7 +7076,7 @@ static const ber_sequence_t TeletexDomainDefinedAttribute_sequence[] = {
static int
dissect_p1_TeletexDomainDefinedAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 899 "../../asn1/p1/p1.cnf"
- actx->value_ptr = ep_strbuf_new("");
+ actx->value_ptr = wmem_strbuf_new(wmem_packet_scope(), "");
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
TeletexDomainDefinedAttribute_sequence, hf_index, ett_p1_TeletexDomainDefinedAttribute);
@@ -7200,14 +7200,14 @@ static int
dissect_p1_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 1174 "../../asn1/p1/p1.cnf"
- proto_item_append_text(tree, " (%s)", val_to_str(actx->external.indirect_reference, p1_TokenDataType_vals, "tokendata-type %d"));
+ proto_item_append_text(tree, " (%s)", val_to_str(actx->external.indirect_reference, p1_TokenDataType_vals, "tokendata-type %d"));
if (dissector_try_uint(p1_tokendata_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
offset = tvb_length(tvb);
} else {
proto_item *item = NULL;
proto_tree *next_tree = NULL;
- item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset),
+ item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset),
"Dissector for tokendata-type %d not implemented. Contact Wireshark developers if you want this supported", actx->external.indirect_reference);
next_tree = proto_item_add_subtree(item, ett_p1_unknown_tokendata_type);
offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
@@ -8288,7 +8288,7 @@ void p1_initialize_content_globals (asn1_ctx_t* actx, proto_tree *tree, gboolean
p1_address_ctx_t* ctx;
if (actx->subtree.tree_ctx == NULL) {
- actx->subtree.tree_ctx = ep_new0(p1_address_ctx_t);
+ actx->subtree.tree_ctx = wmem_new0(wmem_packet_scope(), p1_address_ctx_t);
}
ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
@@ -8307,10 +8307,10 @@ const char* p1_get_last_oraddress (asn1_ctx_t* actx)
return "";
ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
- if (ctx->oraddress->len <= 0)
+ if (wmem_strbuf_get_len(ctx->oraddress) <= 0)
return "";
- return ctx->oraddress->str;
+ return wmem_strbuf_get_str(ctx->oraddress);
}
/*
diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c
index db961279f8..fc1283b737 100644
--- a/epan/dissectors/packet-pres.c
+++ b/epan/dissectors/packet-pres.c
@@ -38,7 +38,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/conversation.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/expert.h>
#include <epan/uat.h>
@@ -273,9 +273,9 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
return;
}
- pco=se_new(pres_ctx_oid_t);
+ pco=wmem_new(wmem_file_scope(), pres_ctx_oid_t);
pco->ctx_id=idx;
- pco->oid=se_strdup(oid);
+ pco->oid=wmem_strdup(wmem_file_scope(), oid);
conversation=find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
if (conversation) {
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c
index 76c4f779b5..d505ccb869 100644
--- a/epan/dissectors/packet-ranap.c
+++ b/epan/dissectors/packet-ranap.c
@@ -4580,9 +4580,9 @@ dissect_ranap_GlobalRNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
static int
dissect_ranap_GTP_TEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 332 "../../asn1/ranap/ranap.cnf"
- tvbuff_t *parameter_tvb=NULL;
+ tvbuff_t *parameter_tvb=NULL;
int saved_hf;
-
+
saved_hf = hf_index;
hf_index = -1;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@@ -4591,7 +4591,7 @@ dissect_ranap_GTP_TEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p
if (!parameter_tvb)
return offset;
- proto_tree_add_item(tree, saved_hf, parameter_tvb, 0, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, saved_hf, parameter_tvb, 0, 4, ENC_BIG_ENDIAN);
@@ -4768,18 +4768,18 @@ dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
3, 8, FALSE, &imsi_tvb);
-
+
if(!imsi_tvb)
return offset;
if ( actx->pinfo->sccp_info
&& actx->pinfo->sccp_info->data.co.assoc
&& ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) {
-
+
guint len = tvb_length(imsi_tvb);
guint8* bytes = (guint8 *)ep_tvb_memdup(imsi_tvb,0,len);
- actx->pinfo->sccp_info->data.co.assoc->calling_party =
- se_strdup_printf("IMSI: %s", bytes_to_str(bytes, len) );
+ actx->pinfo->sccp_info->data.co.assoc->calling_party =
+ wmem_strdup_printf(wmem_file_scope(), "IMSI: %s", bytes_to_str(bytes, len) );
}
digit_str = unpack_digits(imsi_tvb, 0);
proto_tree_add_string(tree, hf_ranap_imsi_digits, imsi_tvb, 0, -1, digit_str);
@@ -7336,7 +7336,7 @@ dissect_ranap_RRC_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
case id_Source_ToTarget_TransparentContainer: /* INTEGER ::= 61 */
/* 9.2.1.30a Source to Target Transparent Container
* Note: In the current version of this specification, this IE may
- * either carry the Source RNC to Target RNC Transparent Container
+ * either carry the Source RNC to Target RNC Transparent Container
* or the Source eNB to Target eNB Transparent Container IE as defined in [49]...
*/
call_dissector(rrc_s_to_trnc_handle,rrc_message_tvb,actx->pinfo, proto_tree_get_root(tree));
@@ -7344,7 +7344,7 @@ dissect_ranap_RRC_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
case id_Target_ToSource_TransparentContainer: /* INTEGER ::= 63 */
/* 9.2.1.30b Target to Source Transparent Container
* In the current version of this specification, this IE may
- * either carry the Target RNC to Source RNC Transparent Container
+ * either carry the Target RNC to Source RNC Transparent Container
* or the Target eNB to Source eNB Transparent Container IE as defined in [49]...
*/
call_dissector(rrc_t_to_srnc_handle,rrc_message_tvb,actx->pinfo, proto_tree_get_root(tree));
@@ -7514,13 +7514,13 @@ static const per_sequence_t SourceRNC_ToTargetRNC_TransparentContainer_sequence[
static int
dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 344 "../../asn1/ranap/ranap.cnf"
-/* If SourceRNC-ToTargetRNC-TransparentContainer is called trough
+/* If SourceRNC-ToTargetRNC-TransparentContainer is called trough
dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU
ProtocolIE_ID may be unset
*/
-
-
- ProtocolIE_ID = id_Source_ToTarget_TransparentContainer;
+
+
+ ProtocolIE_ID = id_Source_ToTarget_TransparentContainer;
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -7888,7 +7888,7 @@ dissect_ranap_TransportLayerAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
proto_item *item;
proto_tree *subtree, *nsap_tree;
gint tvb_len;
-
+
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
1, 160, TRUE, &parameter_tvb);
@@ -7910,7 +7910,7 @@ dissect_ranap_TransportLayerAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
nsap_tree = proto_item_add_subtree(item, ett_ranap_TransportLayerAddress_nsap);
dissect_nsap(parameter_tvb, 0, 20, nsap_tree);
}
-
+
return offset;
diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c
index 8fd0da8c3e..776fc41be1 100644
--- a/epan/dissectors/packet-rrc.c
+++ b/epan/dissectors/packet-rrc.c
@@ -46,6 +46,7 @@
#include <glib.h>
#include <epan/packet.h>
#include <epan/asn1.h>
+#include <epan/wmem/wmem.h>
#include <epan/conversation.h>
#include <epan/expert.h>
@@ -278,7 +279,7 @@ static int dissect_SysInfoType22_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tr
#define maxURNTI_Group 8
/*--- End of included file: packet-rrc-val.h ---*/
-#line 98 "../../asn1/rrc/packet-rrc-template.c"
+#line 99 "../../asn1/rrc/packet-rrc-template.c"
/* Initialize the protocol and registered fields */
int proto_rrc = -1;
@@ -9921,7 +9922,7 @@ static int hf_rrc_GsmSecurityCapability_a5_2 = -1;
static int hf_rrc_GsmSecurityCapability_a5_1 = -1;
/*--- End of included file: packet-rrc-hf.c ---*/
-#line 103 "../../asn1/rrc/packet-rrc-template.c"
+#line 104 "../../asn1/rrc/packet-rrc-template.c"
/* Initialize the subtree pointers */
static int ett_rrc = -1;
@@ -16047,7 +16048,7 @@ static gint ett_rrc_UE_RadioAccessCapability_r6 = -1;
static gint ett_rrc_UL_RFC3095_Context = -1;
/*--- End of included file: packet-rrc-ett.c ---*/
-#line 108 "../../asn1/rrc/packet-rrc-template.c"
+#line 109 "../../asn1/rrc/packet-rrc-template.c"
static gint ett_rrc_eutraFeatureGroupIndicators = -1;
static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1;
@@ -20498,7 +20499,7 @@ dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
#line 792 "../../asn1/rrc/rrc.cnf"
rrcinf = (struct rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0);
if (!rrcinf) {
- rrcinf = se_new0(struct rrc_info);
+ rrcinf = wmem_new0(wmem_file_scope(), struct rrc_info);
p_add_proto_data(actx->pinfo->fd, proto_rrc, 0, rrcinf);
}
rrcinf->hrnti[actx->pinfo->fd->subnum] = tvb_get_ntohs(hrnti_tvb, 0);
@@ -143324,7 +143325,7 @@ static int dissect_MeasurementReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _
/*--- End of included file: packet-rrc-fn.c ---*/
-#line 185 "../../asn1/rrc/packet-rrc-template.c"
+#line 186 "../../asn1/rrc/packet-rrc-template.c"
#include "packet-rrc.h"
@@ -181937,7 +181938,7 @@ void proto_register_rrc(void) {
NULL, HFILL }},
/*--- End of included file: packet-rrc-hfarr.c ---*/
-#line 265 "../../asn1/rrc/packet-rrc-template.c"
+#line 266 "../../asn1/rrc/packet-rrc-template.c"
{ &hf_test,
{ "RAB Test", "rrc.RAB.test",
FT_UINT8, BASE_DEC, NULL, 0,
@@ -188084,7 +188085,7 @@ void proto_register_rrc(void) {
&ett_rrc_UL_RFC3095_Context,
/*--- End of included file: packet-rrc-ettarr.c ---*/
-#line 291 "../../asn1/rrc/packet-rrc-template.c"
+#line 292 "../../asn1/rrc/packet-rrc-template.c"
&ett_rrc_eutraFeatureGroupIndicators,
&ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
};
@@ -188173,7 +188174,7 @@ void proto_register_rrc(void) {
/*--- End of included file: packet-rrc-dis-reg.c ---*/
-#line 312 "../../asn1/rrc/packet-rrc-template.c"
+#line 313 "../../asn1/rrc/packet-rrc-template.c"