Home page logo

nmap-dev logo Nmap Development mailing list archives

Portreasons Changes
From: "Colin L. Rice" <ricec2 () rpi edu>
Date: Mon, 23 May 2011 14:46:28 -0700


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.

Comments, Suggestions, Random Insults?

P.S. Please do look over the reason code strings. I think I caught all
of the synchronization issues but if you see some please tell me.

Attachment: icmp_codes_small.patch

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 ]