o [NSE] Added a stun library and the scripts stun-version and stun-info, which
  extract version information and the external NAT:ed address.
  [Patrik Karlsson]


git-svn-id: https://svn.nmap.org/nmap@28287 e0a8ed71-7df4-0310-8962-fdc924857419
updated script documentation


git-svn-id: https://svn.nmap.org/nmap@28289 e0a8ed71-7df4-0310-8962-fdc924857419
Smooth out random starting timing offsets in OS scan.

Previously it was taking a random u8 mod 100, which meant that the
numbers 0-55 were 50% more likely to come up than any others. Make it a
u16 instead, so that the numbers 0-35 are only about 0.15% more likely.

git-svn-id: https://svn.nmap.org/nmap@28290 e0a8ed71-7df4-0310-8962-fdc924857419
Typo.

git-svn-id: https://svn.nmap.org/nmap@28291 e0a8ed71-7df4-0310-8962-fdc924857419
Update nsock_tod before creating a timer.

nsock_tod is Nsock's idea of the current time. It is updated when an
nsock_pool is initialized, on each iteration of nsock_loop, and in a few
other places. What could go wrong, with respect to timers, is a sequence
like this:
	nsp_new
	[... some long delay ...]
	nsock_create_timer(timeout)
	nsock_loop
The time elapsed after the creatino of the timer until it fires would
not be timeout, but rather timeout - delay. If the delay was long
enough, the timer would fire as loop as nsock_loop was entered.

This showed itself in IPv6 OS detection. We schedule 6 timers
immediately, 100 ms apart. If the pcap_open or anything else took too
long, then the timers would fire all at once. This messed up the
calculation of the TCP_ISR feature.

Perhaps we should do this when any new event is created? It is already
done manually at the beginning of each of the connect functions.

git-svn-id: https://svn.nmap.org/nmap@28292 e0a8ed71-7df4-0310-8962-fdc924857419
Include <net/if_arp.h> from struct_ip.h.

This may be a better way to solve AIX build problems; anyway tcpip.cc didn't build for me on Solaris.


git-svn-id: https://svn.nmap.org/nmap@28294 e0a8ed71-7df4-0310-8962-fdc924857419
Try /dev/net/<iface> after /dev/<iface> with DLPI.

This appears to be a new place on Solaris 11. WIthout this, I get a MAC address of 00:00:00:00:00:00 from --iflist for example.


git-svn-id: https://svn.nmap.org/nmap@28295 e0a8ed71-7df4-0310-8962-fdc924857419
o [NSE] Added new script broadcast-ataoe-discover, which discovers ATA over
  Ethernet capable devices through LAN ethernet broadcasts. [Patrik Karlsson]


git-svn-id: https://svn.nmap.org/nmap@28297 e0a8ed71-7df4-0310-8962-fdc924857419
Use a separate variable for srtt - delta.

Previously the "delta" variable, representing the measured rtt, was
cobbered in place to be srtt - delta in one branch. This was confusing
when a later output message printed "delta", which could have a
different meaning depending on which path was taken.

git-svn-id: https://svn.nmap.org/nmap@28298 e0a8ed71-7df4-0310-8962-fdc924857419
Whitespace.

git-svn-id: https://svn.nmap.org/nmap@28299 e0a8ed71-7df4-0310-8962-fdc924857419
Give a loacl variable better locality.

This was only used in an #ifdef LINUX, and gave a "set but not used"
warning on other platforms.

git-svn-id: https://svn.nmap.org/nmap@28300 e0a8ed71-7df4-0310-8962-fdc924857419
More attempted header rearrangement for AIX compatibility.

git-svn-id: https://svn.nmap.org/nmap@28301 e0a8ed71-7df4-0310-8962-fdc924857419
Remove unused include.

git-svn-id: https://svn.nmap.org/nmap@28302 e0a8ed71-7df4-0310-8962-fdc924857419
Get rid of "using namespace std".

This entails using names like std::vector and std::list rather than bare
vector and list, which was already the prevailing style. The immediate
cause of this is a header file on Solaris 10 that uses a "struct map"
that conflicts with std::map.

In file included from struct_ip.h:40:0,
                 from tcpip.cc:108:
/usr/include/net/if.h:99:9: error: template argument required for 'struct map'

git-svn-id: https://svn.nmap.org/nmap@28303 e0a8ed71-7df4-0310-8962-fdc924857419
Disambiguate another map from std::map.

git-svn-id: https://svn.nmap.org/nmap@28304 e0a8ed71-7df4-0310-8962-fdc924857419