aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-23 02:20:13 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-23 02:20:13 +0000
commit9b7fb8a81120f99babc82e25416f9e25fe616c73 (patch)
tree5dc37cedfddb9588b91957f7da7aeaac83d75543 /plugins
parentb3a24c5cc401498535ffdb64aaa212e46e587698 (diff)
Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)
I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future. And search/replace of a function name is easy enough to do. The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As. All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope(). All other dissectors were converted to using file_scope() which was the original scope for "proto" data. svn path=/trunk/; revision=53520
Diffstat (limited to 'plugins')
-rw-r--r--plugins/profinet/packet-dcerpc-pn-io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c
index 417232f065..5a6b2f3839 100644
--- a/plugins/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/profinet/packet-dcerpc-pn-io.c
@@ -2597,7 +2597,7 @@ typedef struct pnio_ar_s {
static void
pnio_ar_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pnio_ar_t *ar)
{
- p_add_proto_data(pinfo->fd, proto_pn_io, 0, ar );
+ p_add_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0, ar );
pinfo->profinet_type = 10;
if (tree) {
@@ -9426,7 +9426,7 @@ pn_io_ar_conv_valid(packet_info *pinfo)
static const gchar *
pn_io_ar_conv_filter(packet_info *pinfo)
{
- pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(pinfo->fd, proto_pn_io, 0);
+ pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
char *buf;
if ((pinfo->profinet_type != 10) || (ar == NULL)) {
@@ -9446,7 +9446,7 @@ pn_io_ar_conv_filter(packet_info *pinfo)
static const gchar *
pn_io_ar_conv_data_filter(packet_info *pinfo)
{
- pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(pinfo->fd, proto_pn_io, 0);
+ pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
char *buf;
if ((pinfo->profinet_type != 10) || (ar == NULL)) {