aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet_info.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-11-05 17:48:48 +0000
committerEvan Huus <eapache@gmail.com>2013-11-05 17:48:48 +0000
commit389423aaaac460f5b0fcbaf37b4f3d5cd7941c5b (patch)
tree7ad4c2fcd1bb606b9c88d33e6489650aafe4f661 /epan/packet_info.h
parentd04079eedc5e7ea91b3ca940ce43d7fa4dd47856 (diff)
Replace pinfo->layer_names as a string with pinfo->layers as a wmem_list of
protocol IDs. This is substantially more efficient, which means we can build it all the time rather than only if tree (in my benchmarks the extra time taken is not large enough to be statistically significant even over tens of thousands of packets). This fixes what was probably a bug in btobex that relied on layer_names for non-tree dissection. It also enables a much simpler fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9303 svn path=/trunk/; revision=53089
Diffstat (limited to 'epan/packet_info.h')
-rw-r--r--epan/packet_info.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/packet_info.h b/epan/packet_info.h
index 508361401c..ce56ad4aff 100644
--- a/epan/packet_info.h
+++ b/epan/packet_info.h
@@ -185,11 +185,10 @@ typedef struct _packet_info {
void *private_data; /**< pointer to data passed from one dissector to another */
GHashTable *private_table; /**< a hash table passed from one dissector to another */
+ wmem_list_t *layers; /**< layers of each protocol */
guint8 curr_layer_num; /**< The current "depth" or layer number in the current frame */
- /* TODO: Use emem_strbuf_t instead */
- GString *layer_names; /**< layers of each protocol */
guint16 link_number;
- guint8 annex_a_used; /**< used in packet-mtp2.c
+ guint8 annex_a_used; /**< used in packet-mtp2.c
* defined in wtap.h
* MTP2_ANNEX_A_NOT_USED 0
* MTP2_ANNEX_A_USED 1
@@ -210,7 +209,7 @@ typedef struct _packet_info {
GSList *frame_end_routines;
- struct _wmem_allocator_t *pool; /**< Memory pool scoped to the pinfo struct */
+ wmem_allocator_t *pool; /**< Memory pool scoped to the pinfo struct */
struct epan_session *epan;
nstime_t rel_ts; /**< Relative timestamp (yes, it can be negative) */
const gchar *pkt_comment; /**< NULL if not available */