From a9cf1c1114490bc04eefb29b5a10940e9f9659f2 Mon Sep 17 00:00:00 2001 From: Enrico Joerns Date: Wed, 18 Jun 2014 19:23:16 +0200 Subject: [PATCH] [cooja] plugins/analyzers/FragHeadPacketAnalyzer: Printout if first or nth fragment in verbose output --- .../cooja/plugins/analyzers/FragHeadPacketAnalyzer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/cooja/java/org/contikios/cooja/plugins/analyzers/FragHeadPacketAnalyzer.java b/tools/cooja/java/org/contikios/cooja/plugins/analyzers/FragHeadPacketAnalyzer.java index 6961306d5..07d530a62 100644 --- a/tools/cooja/java/org/contikios/cooja/plugins/analyzers/FragHeadPacketAnalyzer.java +++ b/tools/cooja/java/org/contikios/cooja/plugins/analyzers/FragHeadPacketAnalyzer.java @@ -49,18 +49,21 @@ public class FragHeadPacketAnalyzer extends PacketAnalyzer { public int analyzePacket(Packet packet, StringBuilder brief, StringBuilder verbose) { int hdr_size = 0; + verbose.append("Frag Header "); + if ((packet.get(0) & 0xF8) == SICSLOWPAN_DISPATCH_FRAG1) { hdr_size = 4; brief.append("FRAG1"); + verbose.append("first
"); } else if ((packet.get(0) & 0xF8) == SICSLOWPAN_DISPATCH_FRAGN) { hdr_size = 5; brief.append("FRAGN"); + verbose.append("nth
"); } int datagram_size = ((packet.get(0) & 0x07) << 8) + packet.get(1); int datagram_tag = packet.getInt(2, 2); - verbose.append("Frag Header
"); verbose.append("size = ").append(datagram_size) .append(", tag = ").append(String.format("0x%04x", datagram_tag));