1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00
Commit Graph

24 Commits

Author SHA1 Message Date
david
86d766a34e Use an std::map instead of a custom hash table for MAC address prefix
lookup. The hash table used linear probing which got very slow as the
hash table got full. Using std::map is about 10 times faster. The hash
table was slow enough that it took the majority of the time for me in an
ARP scan of a single address.

# nmap -sP 192.168.0.190
mac_prefix_init took 0.49261 s.
Nmap done: 1 IP address (1 host up) scanned in 0.59 seconds

# nmap -sP 192.168.0.190
mac_prefix_init took 0.04392 s.
Nmap done: 1 IP address (1 host up) scanned in 0.13 seconds

The memory usage of std::map is probably greater. The hash table used
19037 pointers and about 13000 structures of size 8 (on a 32-bit
architecture), or about 176 KB. Assuming the map has left, right, and
parent pointers, and a red-black indicator per node, the usage is 16
bytes per prefix plus 8 bytes for the structure data, or 304 KB total.
But this makes fingerdiff so much faster, I want to leave it in place at
least until this round of OS integration is done.
2009-11-11 21:25:07 +00:00
josh
df71e36084 Updated uses of the ctype function to support explict casting of the arguments
to (int)(unsigned char).
2009-08-06 15:10:00 +00:00
fyodor
d0e21e1d03 Suggest that people send patches to nmap-dev rather than to me directly 2009-04-15 00:37:03 +00:00
fyodor
eccc235d5a Increase copyright year to 2009, simplify/reword some derivative works text, and remove a confusing clause about selling proprietary front-ends to Nmap 2009-03-31 04:16:12 +00:00
fyodor
779b96a197 trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
fyodor
10b54b773b minor license template updates from Kris--fix gnu.org link to GPLv2 (moved) and openssl license filename (COPYING.OpenSSL) 2008-05-05 04:10:00 +00:00
david
1b7063ee73 Fix a typo in MACLookup.cc: corolation -> correlation. 2008-03-31 23:05:53 +00:00
fyodor
1accc12fb2 fix typo in legal header found by Leigh Zhao (missing word: of) 2008-02-28 18:52:06 +00:00
fyodor
29c912f394 URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
fyodor
8220c8a42f update copyright line at the top of files from 1996-2006 to 1996-2008 2007-12-22 06:32:03 +00:00
fyodor
8d74bbcd8a merge soc07 r4871:4884 and r4888 - renaming __FUNCTION__ to __func__ and changing hardcoded func names to __func__ 2007-08-11 04:06:09 +00:00
fyodor
5e3bb361f2 merge soc07 r4860 - Add verbose data file path reporting. Some more changes might be coming, for example to change the conditions under which this information is displayed. 2007-08-11 03:59:18 +00:00
fyodor
58522c59f6 merge soc07 r4822 - Reduce the number of build dependencies. 2007-08-11 03:35:46 +00:00
fyodor
b361685be8 NSE committed 2006-12-11 00:34:26 +00:00
fyodor
9a1fece75d fix a couple bugs found by Jochen (voss at seehuhn.de 2006-11-06 02:14:35 +00:00
fyodor
8e553db834 Nmap 4.20ALPHA11 2006-11-03 05:36:41 +00:00
fyodor
354d0f8084 4.20ALPHA7 release imminent 2006-09-12 23:59:05 +00:00
fyodor
2140dfb00f Applied a patch by Kris Katterjohn which makes 14 functions static 2006-08-29 04:03:03 +00:00
fyodor
b28d51167c Minor source code header improvements 2006-08-25 01:47:49 +00:00
fyodor
a403864351 Replace file headers, mostly to update copyright to 2006 2006-08-24 04:43:50 +00:00
fyodor
29b1d58389 Some minor misc. fixes from Marek Majkowski and Kris Katterjohn 2006-08-22 21:31:37 +00:00
fyodor
76ab1500b3 make a ton of global symbols static 2006-03-05 23:59:46 +00:00
fyodor
aafb4a0a82 Arp sp00fing c0de 2005-07-26 06:26:00 +00:00
fyodor
26ce3d66f4 get rid of silly top-level trunk dir 2005-04-11 22:34:19 +00:00