summaryrefslogtreecommitdiff
path: root/packet-tr.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-09-15 06:13:21 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-09-15 06:13:21 +0000
commitbcf4001ef0ce01d625cf530414e25e0534397b90 (patch)
tree100cc9ce71c7075023b15772cac93f4bf570584d /packet-tr.c
parentb1f5853f414131cae6c3eaabfde3d9f843265c09 (diff)
downloadwireshark-bcf4001ef0ce01d625cf530414e25e0534397b90.tar.gz
Changed (again) the way that the FT_BOOLEAN field type works internally.
Dissector code can add FT_BOOLEAN fields to the proto_tree and pass TRUE or FALSE values (non-zero and zero values). The display filter language, however, treats the checking for the existence of a FT_BOOLEAN field as the checking for its truth. Before this change, packet-tr.c was the only dissector using FT_BOOLEAN fields, and it only added the field to the proto_tree if the TRUE; the dissector was determining the difference between the check for existence and the check for truth. I made this change because packet-ppp.c added some FT_BOOLEAN fields and added them to the tree regardless of truth value, It's more natural just to do it this way and let the display filter code worry about whether to check for existence or truth. So that's how it works now. svn path=/trunk/; revision=679
Diffstat (limited to 'packet-tr.c')
-rw-r--r--packet-tr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-tr.c b/packet-tr.c
index 1f87c82bbd..1364bffe25 100644
--- a/packet-tr.c
+++ b/packet-tr.c
@@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $Id: packet-tr.c,v 1.24 1999/09/09 04:47:16 gram Exp $
+ * $Id: packet-tr.c,v 1.25 1999/09/15 06:13:20 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -180,8 +180,9 @@ capture_tr(const u_char *pd, guint32 cap_len, packet_counts *ld) {
trn_rif_bytes = pd[offset + 14] & 31;
/* sometimes we have a RCF but no RIF... half source-routed? */
- /* I'll check for 2 bytes of RIF and the 0x70 byte */
if (!source_routed && trn_rif_bytes > 0) {
+ /* I'll check for 2 bytes of RIF and mark the packet as source
+ * routed even though I'm not sure _what_ that kind of packet is */
if (trn_rif_bytes == 2) {
source_routed = 1;
}
@@ -435,8 +436,7 @@ dissect_tr(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
proto_tree_add_item(tr_tree, hf_tr_dst, offset + 2, 6, trn_dhost);
proto_tree_add_item(tr_tree, hf_tr_src, offset + 8, 6, trn_shost);
- if (source_routed)
- proto_tree_add_item_hidden(tr_tree, hf_tr_sr, offset + 8, 1, source_routed);
+ proto_tree_add_item_hidden(tr_tree, hf_tr_sr, offset + 8, 1, source_routed);
/* non-source-routed version of src addr */
proto_tree_add_item_hidden(tr_tree, hf_tr_src, offset + 8, 6, trn_shost_nonsr);