From c114f9e1fbdb03d15306581d091dfca9917fe149 Mon Sep 17 00:00:00 2001 From: Joakim Eriksson Date: Tue, 8 Feb 2011 21:27:33 +0100 Subject: [PATCH] added more verbose data on RPL-DIO messages --- .../cooja/plugins/analyzers/ICMPv6Analyzer.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/cooja/java/se/sics/cooja/plugins/analyzers/ICMPv6Analyzer.java b/tools/cooja/java/se/sics/cooja/plugins/analyzers/ICMPv6Analyzer.java index ec06d12ab..df2045d8a 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/analyzers/ICMPv6Analyzer.java +++ b/tools/cooja/java/se/sics/cooja/plugins/analyzers/ICMPv6Analyzer.java @@ -61,7 +61,18 @@ public class ICMPv6Analyzer extends PacketAnalyzer { break; case RPL_CODE_DIO: brief.append("DIO"); - verbose.append("DIO"); + verbose.append("DIO
"); + + int instanceID = packet.get(4) & 0xff; + int version = packet.get(5) & 0xff; + int rank = ((packet.get(6) & 0xff) << 8) + (packet.get(7) & 0xff); + int mop = (packet.get(8) >> 3) & 0x07; + int dtsn = packet.get(9); + + verbose.append(" InstanceID: " + instanceID + " Version: " + version + + " Rank:" + rank + " MOP: " + mop + " DTSN: " + dtsn); + packet.consumeBytesStart(8); + break; case RPL_CODE_DAO: brief.append("DAO");