[cooja] plugins/analyzers: printout of UDP ports and clearer layer separation
This commit is contained in:
parent
70a44031bf
commit
d894390f3e
|
@ -53,6 +53,7 @@ public class ICMPv6Analyzer extends PacketAnalyzer {
|
|||
// int checksum = ((packet.get(2) & 0xff) << 8) | packet.get(3) & 0xff;
|
||||
|
||||
brief.append("ICMPv6 ");
|
||||
verbose.append("<b>ICMPv6</b>");
|
||||
if (type >= 128 && (type - 128) < TYPE_NAME.length) {
|
||||
brief.append(BRIEF_TYPE_NAME[type - 128]).append(' ').append(code);
|
||||
verbose.append("<br/>Type: ").append(TYPE_NAME[type - 128]);
|
||||
|
|
|
@ -454,17 +454,36 @@ public class IPHCPacketAnalyzer extends PacketAnalyzer {
|
|||
protoStr = "UDP";
|
||||
} else if (proto == PROTO_TCP) {
|
||||
protoStr = "TCP";
|
||||
} else {
|
||||
protoStr = String.valueOf(proto);
|
||||
}
|
||||
|
||||
verbose.append("<br><b>IPv6 ").append(protoStr)
|
||||
.append("</b> TC = ").append(trafficClass)
|
||||
.append(" FL: ").append(flowLabel)
|
||||
// IPv6 Information
|
||||
|
||||
brief.append("|IPv6");
|
||||
verbose.append("<br/><b>IPv6</b>")
|
||||
.append(" TC = ").append(trafficClass)
|
||||
.append(", FL = ").append(flowLabel)
|
||||
.append("<br>");
|
||||
verbose.append("From ");
|
||||
printAddress(verbose, srcAddress);
|
||||
verbose.append(" to ");
|
||||
printAddress(verbose, destAddress);
|
||||
if (error != null) verbose.append(" " + error);
|
||||
if (error != null) {
|
||||
verbose.append(" ").append(error);
|
||||
}
|
||||
|
||||
// Application Layer Information
|
||||
|
||||
if (proto != PROTO_ICMP) {
|
||||
brief.append('|').append(protoStr);
|
||||
verbose.append("<br/><b>").append(protoStr).append("</b>");
|
||||
}
|
||||
if (proto == PROTO_UDP) {
|
||||
brief.append(' ').append(srcPort).append(' ').append(destPort);
|
||||
verbose.append("<br/>Src Port: ").append(srcPort);
|
||||
verbose.append(", Dst Port: ").append(destPort);
|
||||
}
|
||||
|
||||
packet.lastDispatch = (byte) (proto & 0xff);
|
||||
if (proto == PROTO_UDP || proto == PROTO_ICMP
|
||||
|
|
Loading…
Reference in a new issue