aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2007-09-17 12:12:02 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2007-09-17 12:12:02 +0000
commit72af3183ab319a86c636b3a9dbad8df8ad7614e1 (patch)
treee537f738193f75876e581b96885032dc0389120f /epan/proto.c
parent8f19616ae86f9e5a5f70eb2bb2b468caf40461ea (diff)
Added functionality to highlight the FCS bytes in Ethernet and IEEE 802.11
packets in the Packet Details View. This "appendix" bytes are not copied with the Copy functions or in the Export Selected Packet Bytes. svn path=/trunk/; revision=22887
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/epan/proto.c b/epan/proto.c
index e112b7fb95..f5b3a9b2e0 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -3069,6 +3069,9 @@ new_field_info(proto_tree *tree, header_field_info *hfinfo, tvbuff_t *tvb,
/* add the data source tvbuff */
fi->ds_tvb=tvb?TVB_GET_DS_TVB(tvb):NULL;
+ fi->appendix_start = 0;
+ fi->appendix_length = 0;
+
return fi;
}
@@ -3412,6 +3415,22 @@ proto_tree_move_item(proto_tree *tree, proto_item *fixed_item, proto_item *item_
}
}
+void
+proto_tree_set_appendix(proto_tree *tree, tvbuff_t *tvb, gint start, gint length)
+{
+ field_info *fi;
+
+ if (tree == NULL)
+ return;
+
+ fi = tree->finfo;
+ start += TVB_RAW_OFFSET(tvb);
+ DISSECTOR_ASSERT(start >= 0);
+ DISSECTOR_ASSERT(length >= 0);
+
+ fi->appendix_start = start;
+ fi->appendix_length = length;
+}
int
proto_register_protocol(const char *name, const char *short_name, const char *filter_name)