Nmap Development mailing list archives
[NSE][patch] Keep only one copy of mac_prefixes table in registry
From: Daniel Miller <bonsaiviking () gmail com>
Date: Thu, 26 Jul 2012 12:07:04 -0500
List,The scripts address-info, lltd-discovery, snmp-interfaces, and nbstat all make use of the datafiles.parse_mac_prefixes function, which parses the nmap-mac-prefixes file and returns a table with the results. The file is almost 400K, so the data structure is probably at least that large. In order to avoid parsing the file multiple times, each script stores the results of the parsing in a different area of the nmap.registry. I've attached a patch to allow them to all make use of the same table, avoiding up to 3 extra file parses and 3 extra copies of the table in memory.
I'd appreciate a second look to be sure I didn't mess something up. Dan
Attachment:
mac_prefixes.patch
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [NSE][patch] Keep only one copy of mac_prefixes table in registry Daniel Miller (Jul 26)
- Re: [NSE][patch] Keep only one copy of mac_prefixes table in registry Toni Ruottu (Jul 26)
- Re: [NSE][patch] Keep only one copy of mac_prefixes table in registry Daniel Miller (Jul 26)
- Re: [NSE][patch] Keep only one copy of mac_prefixes table in registry David Fifield (Jul 27)
- Re: [NSE][patch] Keep only one copy of mac_prefixes table in registry Daniel Miller (Jul 27)
- Re: [NSE][patch] Keep only one copy of mac_prefixes table in registry Daniel Miller (Jul 26)
- Re: [NSE][patch] Keep only one copy of mac_prefixes table in registry Toni Ruottu (Jul 26)