diff options
author | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-05-20 06:52:22 +0000 |
---|---|---|
committer | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-05-20 06:52:22 +0000 |
commit | f8a308d76639941dd22a211d903a69bff72f2617 (patch) | |
tree | db1264dd01457d494859920376bf8ba5366a740d /epan/dissectors/packet-cimetrics.c | |
parent | cd22932785699ac6389755b676ae0b43822832ca (diff) |
From Steve Karg:
Added src and dst to BACnet MS/TP WTAP dissector. Added BACnet MS/TP summary
with src, dst, and frame type to tree. Removed src and dst in column info text
since this was duplicated. Changed field names for src, dst, hdr, and len to
be more consistent with other protocols.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25323 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-cimetrics.c')
-rw-r--r-- | epan/dissectors/packet-cimetrics.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/epan/dissectors/packet-cimetrics.c b/epan/dissectors/packet-cimetrics.c index a2bc56b048..50878f6d5f 100644 --- a/epan/dissectors/packet-cimetrics.c +++ b/epan/dissectors/packet-cimetrics.c @@ -32,6 +32,9 @@ #include <epan/oui.h> #include "packet-mstp.h" +/* Probably should be a preference, but here for now */ +#define BACNET_MSTP_SUMMARY_IN_TREE + /* the U+4 device does MS/TP, uLAN, Modbus */ static const value_string cimetrics_pid_vals[] = { { 0x0001, "U+4 MS/TP" }, @@ -54,10 +57,25 @@ dissect_cimetrics_mstp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_item *ti; proto_tree *subtree; - gint offset = 0; +#ifdef BACNET_MSTP_SUMMARY_IN_TREE + guint8 mstp_frame_type = 0; + guint8 mstp_frame_source = 0; + guint8 mstp_frame_destination = 0; +#endif +#ifdef BACNET_MSTP_SUMMARY_IN_TREE + mstp_frame_type = tvb_get_guint8(tvb, offset+3); + mstp_frame_destination = tvb_get_guint8(tvb, offset+4); + mstp_frame_source = tvb_get_guint8(tvb, offset+5); + ti = proto_tree_add_protocol_format(tree, + proto_cimetrics_mstp, tvb, offset, 9, + "BACnet MS/TP, Src (%u), Dst (%u), %s", + mstp_frame_source, mstp_frame_destination, + mstp_frame_type_text(mstp_frame_type)); +#else ti = proto_tree_add_item(tree, proto_cimetrics_mstp, tvb, offset, 9, FALSE); +#endif subtree = proto_item_add_subtree(ti, ett_cimetrics_mstp); proto_tree_add_item(subtree, hf_cimetrics_mstp_timer, tvb, offset++, 2, TRUE); |