1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 18:39:03 +00:00

Merge r30072 from nmap-npingchanges: Print ICMPv6 destination unreachable, time exceeded and parameter problem

This commit is contained in:
luis
2013-03-29 18:02:36 +00:00
parent 7a221508bf
commit 67a211e298

View File

@@ -200,11 +200,26 @@ int ICMPv6Header::print(FILE *output, int detail) const {
fprintf(output, " (type=%u/code=%u)", type, code);
switch(type) {
case ICMPv6_ECHO:
case ICMPv6_ECHOREPLY:
fprintf(output, " id=%u seq=%u", this->getIdentifier(), this->getSequence());
case ICMPv6_UNREACH:
case ICMPv6_TIMXCEED:
if(detail>=PRINT_DETAIL_HIGH)
fprintf(output, " unused=0x%08lX", (long unsigned int)this->getUnused());
break;
case ICMPv6_PKTTOOBIG:
fprintf(output, " mtu=%lu", (long unsigned int)this->getMTU());
break;
case ICMPv6_PARAMPROB:
fprintf(output, " pointer=%lu", (long unsigned int)this->getPointer());
break;
case ICMPv6_ECHO:
case ICMPv6_ECHOREPLY:
fprintf(output, " id=%u seq=%u", this->getIdentifier(), this->getSequence());
break;
default:
/* Print nothing */
break;