Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: Portreasons Changes
From: David Fifield <david () bamsoftware com>
Date: Fri, 27 May 2011 21:55:52 -0700

On Mon, May 23, 2011 at 02:46:28PM -0700, Colin L. Rice wrote:

I wrote a small patch to redo the port-reasons mapping system from ICMP
code and type to error type to output strings.

Instead of using icmp_mod_code and icmp_mod_type which was confusing
there is now a single function icmp_to_reason(type,code) which
translates ICMP codes and types to reason codes. This has the additional
benefit of allowing us to not worry about overlapping ICMP types and
codes in the modular system.

Instead of using to arrays to translate the reason codes to plural and
singular strings we now use a map combined with a reason_string class.
This allows us to add more items to the reason_string in the future such
as a detailed description as to how we got this as well as avoiding
synchronization issues.

Colin, I'm getting some strange output with this change:

$ sudo ./nmap -PE google.com -sn --reason

Starting Nmap 5.51SVN ( http://nmap.org ) at 2011-05-27 21:54 PDT
Nmap scan report for google.com (
Host is up, received unknown-responses (0.014s latency).

I expect echo-reply (singular). Do you get the same?

David Fifield
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]