aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.h
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-07-12 10:19:13 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-07-12 10:19:13 +0000
commit27572c22f4c47b845c90700f46e27d239515531c (patch)
tree8a20bb03d20a569e22078dd31657e0eaa9bd66e3 /epan/packet.h
parent052a2b965a424465fb87c83a5f2009b35471be8b (diff)
From Kovarththanan Rajaratnam via bug 3702:
This patch optimizes the data source name processing in add_new_data_source() by delaying it. We now simply store the constant string and lazily compute the name when needed. This gives a performance boost because we only need the name if we have multiple data sources. svn path=/trunk/; revision=29066
Diffstat (limited to 'epan/packet.h')
-rw-r--r--epan/packet.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/packet.h b/epan/packet.h
index 9f35f4d234..5725b58dd5 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -384,6 +384,11 @@ extern void add_new_data_source(packet_info *pinfo, tvbuff_t *tvb,
const char *name);
/*
+ * Return the data source name.
+ */
+extern const char* get_data_source_name(data_source *src);
+
+/*
* Free up a frame's list of data sources.
*/
extern void free_data_sources(packet_info *pinfo);