summaryrefslogtreecommitdiff
path: root/epan/proto.h
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-11-26 12:22:22 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-11-26 12:22:22 +0000
commiteb39a99b2c4d80bf158942b769221d3271f99016 (patch)
tree6928527635c74e07a53b8709cbaa2661ae38df6b /epan/proto.h
parentd525d957e46c3816e22a8afa7c6f250dd0e15c17 (diff)
downloadwireshark-eb39a99b2c4d80bf158942b769221d3271f99016.tar.gz
Speed updates
create generic macros for allocating/freeing structures. remove one more slow GMemChunk and replace it with a simple linked list ~4% speed improvement in my tests. the allocated data is never freed. this may be a problem if ethereal is ever supported on a platform lacking resource tracking but makes the implementation faster and simpler. svn path=/trunk/; revision=9095
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/proto.h b/epan/proto.h
index ac00237165..671e94abed 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.47 2003/11/25 14:07:44 sahlberg Exp $
+ * $Id: proto.h,v 1.48 2003/11/26 12:22:22 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -105,7 +105,7 @@ typedef struct hf_register_info {
typedef struct _item_label_t {
struct _item_label_t *next;
- char *representation;
+ char representation[ITEM_LABEL_LENGTH];
} item_label_t;
/* Contains the field information for the proto_item. */
@@ -136,9 +136,10 @@ typedef struct {
/* Each GNode (proto_tree, proto_item) points to one of
* these. */
-typedef struct {
- field_info *finfo;
- tree_data_t *tree_data;
+typedef struct _proto_node {
+ struct _proto_node *next;
+ field_info *finfo;
+ tree_data_t *tree_data;
} proto_node;
typedef GNode proto_tree;