aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/profinet/packet-dcerpc-pn-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/profinet/packet-dcerpc-pn-io.c')
-rw-r--r--plugins/profinet/packet-dcerpc-pn-io.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c
index 70d5745fd1..f54d07883b 100644
--- a/plugins/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/profinet/packet-dcerpc-pn-io.c
@@ -51,7 +51,7 @@
#include <glib.h>
#include <epan/packet.h>
-#include <epan/emem.h>
+#include <epan/wmem/wmem.h>
#include <epan/dissectors/packet-dcerpc.h>
#include <epan/expert.h>
#include <epan/dissector_filters.h>
@@ -2679,7 +2679,7 @@ pnio_ar_new(e_uuid_t *aruuid)
pnio_ar_t *ar;
- ar = (pnio_ar_t *)se_alloc0(sizeof(pnio_ar_t));
+ ar = (pnio_ar_t *)wmem_alloc0(wmem_file_scope(), sizeof(pnio_ar_t));
memcpy(&ar->aruuid, aruuid, sizeof(e_uuid_t));
@@ -3240,14 +3240,14 @@ dissect_IandM0_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_vendor_id_low, &u8VendorIDLow);
/* c8[20] OrderID */
- pOrderID = (char *)ep_alloc(20+1);
+ pOrderID = (char *)wmem_alloc(wmem_packet_scope(), 20+1);
tvb_memcpy(tvb, (guint8 *) pOrderID, offset, 20);
pOrderID[20] = '\0';
proto_tree_add_string (tree, hf_pn_io_order_id, tvb, offset, 20, pOrderID);
offset += 20;
/* c8[16] IM_Serial_Number */
- pIMSerialNumber = (char *)ep_alloc(16+1);
+ pIMSerialNumber = (char *)wmem_alloc(wmem_packet_scope(), 16+1);
tvb_memcpy(tvb, (guint8 *) pIMSerialNumber, offset, 16);
pIMSerialNumber[16] = '\0';
proto_tree_add_string (tree, hf_pn_io_im_serial_number, tvb, offset, 16, pIMSerialNumber);
@@ -3305,14 +3305,14 @@ dissect_IandM1_block(tvbuff_t *tvb, int offset,
}
/* IM_Tag_Function [32] */
- pTagFunction = (char *)ep_alloc(32+1);
+ pTagFunction = (char *)wmem_alloc(wmem_packet_scope(), 32+1);
tvb_memcpy(tvb, (guint8 *) pTagFunction, offset, 32);
pTagFunction[32] = '\0';
proto_tree_add_string (tree, hf_pn_io_im_tag_function, tvb, offset, 32, pTagFunction);
offset += 32;
/* IM_Tag_Location [22] */
- pTagLocation = (char *)ep_alloc(22+1);
+ pTagLocation = (char *)wmem_alloc(wmem_packet_scope(), 22+1);
tvb_memcpy(tvb, (guint8 *) pTagLocation, offset, 22);
pTagLocation[22] = '\0';
proto_tree_add_string (tree, hf_pn_io_im_tag_location, tvb, offset, 22, pTagLocation);
@@ -3337,7 +3337,7 @@ dissect_IandM2_block(tvbuff_t *tvb, int offset,
}
/* IM_Date [16] */
- pDate = (char *)ep_alloc(16+1);
+ pDate = (char *)wmem_alloc(wmem_packet_scope(), 16+1);
tvb_memcpy(tvb, (guint8 *) pDate, offset, 16);
pDate[16] = '\0';
proto_tree_add_string (tree, hf_pn_io_im_date, tvb, offset, 16, pDate);
@@ -3362,7 +3362,7 @@ dissect_IandM3_block(tvbuff_t *tvb, int offset,
}
/* IM_Descriptor [54] */
- pDescriptor = (char *)ep_alloc(54+1);
+ pDescriptor = (char *)wmem_alloc(wmem_packet_scope(), 54+1);
tvb_memcpy(tvb, (guint8 *) pDescriptor, offset, 54);
pDescriptor[54] = '\0';
proto_tree_add_string (tree, hf_pn_io_im_descriptor, tvb, offset, 54, pDescriptor);
@@ -4319,7 +4319,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_length_own_port_id, &u8LengthOwnPortID);
/* OwnPortID */
- pOwnPortID = (char *)ep_alloc(u8LengthOwnPortID+1);
+ pOwnPortID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthOwnPortID+1);
tvb_memcpy(tvb, (guint8 *) pOwnPortID, offset, u8LengthOwnPortID);
pOwnPortID[u8LengthOwnPortID] = '\0';
proto_tree_add_string (tree, hf_pn_io_own_port_id, tvb, offset, u8LengthOwnPortID, pOwnPortID);
@@ -4337,7 +4337,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_length_peer_port_id, &u8LengthPeerPortID);
/* PeerPortID */
- pPeerPortID = (char *)ep_alloc(u8LengthPeerPortID+1);
+ pPeerPortID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthPeerPortID+1);
tvb_memcpy(tvb, (guint8 *) pPeerPortID, offset, u8LengthPeerPortID);
pPeerPortID[u8LengthPeerPortID] = '\0';
proto_tree_add_string (tree, hf_pn_io_peer_port_id, tvb, offset, u8LengthPeerPortID, pPeerPortID);
@@ -4347,7 +4347,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_length_peer_chassis_id, &u8LengthPeerChassisID);
/* PeerChassisID */
- pPeerChassisID = (char *)ep_alloc(u8LengthPeerChassisID+1);
+ pPeerChassisID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthPeerChassisID+1);
tvb_memcpy(tvb, (guint8 *) pPeerChassisID, offset, u8LengthPeerChassisID);
pPeerChassisID[u8LengthPeerChassisID] = '\0';
proto_tree_add_string (tree, hf_pn_io_peer_chassis_id, tvb, offset, u8LengthPeerChassisID, pPeerChassisID);
@@ -4433,7 +4433,7 @@ dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
/* MRP_DomainName */
- pDomainName = (char *)ep_alloc(u8LengthDomainName+1);
+ pDomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthDomainName+1);
tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
pDomainName[u8LengthDomainName] = '\0';
proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
@@ -4507,7 +4507,7 @@ dissect_PDInterfaceMrpDataReal_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
/* MRP_DomainName */
- pDomainName = (char *)ep_alloc(u8LengthDomainName+1);
+ pDomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthDomainName+1);
tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
pDomainName[u8LengthDomainName] = '\0';
proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
@@ -5087,7 +5087,7 @@ dissect_CheckPeers_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_length_peer_port_id, &u8LengthPeerPortID);
/* PeerPortID */
- pPeerPortID = (char *)ep_alloc(u8LengthPeerPortID+1);
+ pPeerPortID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthPeerPortID+1);
tvb_memcpy(tvb, (guint8 *) pPeerPortID, offset, u8LengthPeerPortID);
pPeerPortID[u8LengthPeerPortID] = '\0';
proto_tree_add_string (tree, hf_pn_io_peer_port_id, tvb, offset, u8LengthPeerPortID, pPeerPortID);
@@ -5097,7 +5097,7 @@ dissect_CheckPeers_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_length_peer_chassis_id, &u8LengthPeerChassisID);
/* PeerChassisID */
- pPeerChassisID = (char *)ep_alloc(u8LengthPeerChassisID+1);
+ pPeerChassisID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthPeerChassisID+1);
tvb_memcpy(tvb, (guint8 *) pPeerChassisID, offset, u8LengthPeerChassisID);
pPeerChassisID[u8LengthPeerChassisID] = '\0';
proto_tree_add_string (tree, hf_pn_io_peer_chassis_id, tvb, offset, u8LengthPeerChassisID, pPeerChassisID);
@@ -5343,7 +5343,7 @@ dissect_MrpInstanceDataAdjust_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
/* MRP_DomainName */
- pDomainName = (char *)ep_alloc(u8LengthDomainName+1);
+ pDomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthDomainName+1);
tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
pDomainName[u8LengthDomainName] = '\0';
proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
@@ -5393,7 +5393,7 @@ dissect_MrpInstanceDataReal_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
/* MRP_DomainName */
- pDomainName = (char *)ep_alloc(u8LengthDomainName+1);
+ pDomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthDomainName+1);
tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
pDomainName[u8LengthDomainName] = '\0';
proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
@@ -5524,7 +5524,7 @@ dissect_PDInterfaceDataReal_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_length_own_chassis_id, &u8LengthOwnChassisID);
/* OwnChassisID */
- pOwnChassisID = (char *)ep_alloc(u8LengthOwnChassisID+1);
+ pOwnChassisID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthOwnChassisID+1);
tvb_memcpy(tvb, (guint8 *) pOwnChassisID, offset, u8LengthOwnChassisID);
pOwnChassisID[u8LengthOwnChassisID] = '\0';
proto_tree_add_string (tree, hf_pn_io_own_chassis_id, tvb, offset, u8LengthOwnChassisID, pOwnChassisID);
@@ -5672,7 +5672,7 @@ dissect_PDSyncData_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_ptcp_length_subdomain_name, &u8LengthSubdomainName);
/* PTCPSubdomainName */
- pSubdomainName = (char *)ep_alloc(u8LengthSubdomainName+1);
+ pSubdomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthSubdomainName+1);
tvb_memcpy(tvb, (guint8 *) pSubdomainName, offset, u8LengthSubdomainName);
pSubdomainName[u8LengthSubdomainName] = '\0';
proto_tree_add_string (tree, hf_pn_io_ptcp_subdomain_name, tvb, offset, u8LengthSubdomainName, pSubdomainName);
@@ -6282,7 +6282,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
hf_pn_io_cminitiator_objectuuid, &uuid);
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
hf_pn_io_station_name_length, &u16NameLength);
- pStationName = (char *)ep_alloc(u16NameLength+1);
+ pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
pStationName[u16NameLength] = '\0';
proto_tree_add_string (ar_tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
@@ -6368,7 +6368,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
hf_pn_io_station_name_length, &u16NameLength);
/* ParameterServerStationName */
- pStationName = (char *)ep_alloc(u16NameLength+1);
+ pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
pStationName[u16NameLength] = '\0';
proto_tree_add_string (ar_tree, hf_pn_io_parameter_server_station_name, tvb, offset, u16NameLength, pStationName);
@@ -6413,7 +6413,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_cmresponder_udprtport, &u16UDPRTPort);
/* CMInitiatorStationName*/
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_station_name_length, &u16NameLength);
- pStationName = (char *)ep_alloc(u16NameLength+1);
+ pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
pStationName[u16NameLength] = '\0';
proto_tree_add_string (ar_tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
@@ -6425,7 +6425,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_station_name_length, &u16NameLength);
if (u16NameLength != 0) {
/* ParameterServerStationName */
- pStationName = (char *)ep_alloc(u16NameLength+1);
+ pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
pStationName[u16NameLength] = '\0';
proto_tree_add_string (ar_tree, hf_pn_io_parameter_server_station_name, tvb, offset, u16NameLength, pStationName);
@@ -6820,7 +6820,7 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
hf_pn_io_station_name_length, &u16NameLength);
- pStationName = (char *)ep_alloc(u16NameLength+1);
+ pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
pStationName[u16NameLength] = '\0';
proto_tree_add_string (tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
@@ -7199,7 +7199,7 @@ dissect_ARServerBlock(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
hf_pn_io_station_name_length, &u16NameLength);
- pStationName = (char *)ep_alloc(u16NameLength+1);
+ pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
pStationName[u16NameLength] = '\0';
proto_tree_add_string (tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
@@ -7295,7 +7295,7 @@ dissect_MCRBlockReq_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
hf_pn_io_station_name_length, &u16NameLength);
- pStationName = (char *)ep_alloc(u16NameLength+1);
+ pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
pStationName[u16NameLength] = '\0';
proto_tree_add_string (tree, hf_pn_io_provider_station_name, tvb, offset, u16NameLength, pStationName);