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

29 Commits

Author SHA1 Message Date
dmiller
58874849d3 Reintegrate Nmap 7.98 release branch 2025-08-21 20:24:37 +00:00
dmiller
6db5c9cb85 Bump copyright date 2025-02-26 17:44:43 +00:00
dmiller
3f64103cf0 Move some prototypes to nsock_internal.h 2024-11-13 19:15:10 +00:00
dmiller
b94ae785ba Fix handling of non-select()-able pcap handles
1. pcap_get_selectable_fd() may return -1 for some devices, even if the
   platform as a whole supports select() on these handles. Check for
   this condition throughout.
2. The various backend system calls (kevent, poll, epoll, etc.) do not
   sleep for the timeout period if no valid handles are registered,
   unlike select on UNIX. This leads to busy wait, looping continuously.
   Instead, we call usleep() in those cases.
2024-10-11 20:59:34 +00:00
dmiller
532938f49c Do a non-blocking check for events when pcap data is available
For platforms without selectable pcap handles (e.g. Windows), the
arrival of data for a pcap read would previously skip checking for any
triggered non-pcap events in that loop iteration. This is not usually a
problem because the next loop will be triggered immediately, picking up
the non-pcap events before any further pcap data arrives. However,
excessive pcap data on a handle in immediate mode might prevent the
engine loop from checking for non-pcap events for long enough to result
in timeouts. Instead, do a non-blocking check for triggered events in
this case and handle those in the same loop iteration.
2024-10-09 17:40:10 +00:00
dmiller
dcb4ba569e Avoid multiple expansions of TIMEVAL_MSEC_SUBTRACT macro within MAX macro 2024-06-27 19:36:04 +00:00
dmiller
f999182d0f Bump date and reapply header templates 2024-02-28 18:46:45 +00:00
dmiller
6f6b2de214 Apply new license templates, bump copyright date 2023-04-14 17:11:46 +00:00
dmiller
dd690b3e0b Bump copyright date and update some links [ci skip] 2022-02-18 17:38:46 +00:00
fyodor
3aec3f3a07 Update to latest copyright templates. Main change is that Insecure.Com LLC is now Nmap Software LLC 2021-11-23 16:04:37 +00:00
dmiller
ef8213a36c Reintegrate Nmap 7.90 release branch 2020-10-05 23:00:30 +00:00
dmiller
d639a53088 Bump copyright date in license headers 2019-05-28 21:36:04 +00:00
fyodor
ff62300249 Bump copyright dates to 2018 and slightly improve wording (doesn't change meaning) of Nmap license header text 2018-01-28 21:18:17 +00:00
dmiller
9c7ea727a7 Update license terms for 2017 2017-06-07 12:32:38 +00:00
dmiller
f6db6731d2 Fix kqueue engine, not compliant with new Nsock API after IOCP integration 2016-08-25 21:02:19 +00:00
tudor
1e1f744186 Added IOCP integration for Nsock, engine IOCP is the default engine on Windows 2016-08-22 19:15:13 +00:00
dmiller
6e33d6ac3c Bump date in copyright headers 2016-04-04 15:38:44 +00:00
henri
b55ff2d68f Don't associate nsock logging info to a nspool.
Make current loglevel and current log callback global
to the library. Attaching them to the nsock pool doesn't
bring any benefit and prevents from logging activity in
code sections that don't have access to a pool (such as
proxy chain specification parsing).

Updated external calls and nsock tests accordingly.
2015-06-27 08:21:53 +00:00
henri
b75233ce98 Consistently renamed nsi_XXX calls into nsock_iod_XXX
This is part of the effort to make nsock expose only
nsock_ prefixed symbols and simplify the API.
2015-06-27 08:21:33 +00:00
dmiller
68409b2226 Update copyright date to 2015 2015-06-03 13:01:29 +00:00
fyodor
f6f59a7cd7 Auto regeneration with latest template files, etc. 2014-08-13 22:57:43 +00:00
henri
d13dab54c3 Replaced internal opaque types by structs. 2014-05-21 19:59:42 +00:00
henri
853aaff586 Manage expiration times via a heap queue.
This prevents nsock from iterating over the whole list of events at
each runloop, thus improving performance.

It made it necessary to have pointers from the msevents to the event
lists they belong to. The patch therefore also changes gh_list from
autonomous containers to embedded structures.

Added unit tests accordingly and cosmetic changes to make things look
more consistent.
2013-08-10 23:59:30 +00:00
fyodor
83fb10ec56 Update the Nmap copyright/license files. This isn't the new Nmap Public Source License we've been discussing on the list, but rather just a 'quick patch' to hopefully prevent some of the abuse we've been seeing from companies lately. More details on the changes will be posted to the dev list. Also, the copyright year was updated to 2013 (which is the only change to Nsock license statements). 2013-07-28 22:05:05 +00:00
henri
3206c48aab Normalized log messages. No idea why I initially put underscores instead of spaces there. 2012-12-15 18:16:59 +00:00
henri
809f1eda68 Merged nsock-logging from nmap-exp/henri/nsock-logging/
Reworked the logging infrastructure to make it more flexible
and consistent.

Updated nmap, nping and ncat accordingly.  Nsock log level can
now be adjusted at runtime by pressing d/D in nmap.
2012-12-15 10:59:30 +00:00
fyodor
6a42ef47c0 Update the Nmap and Nsock source code headers to note new Nmap dev mailing list email address and a better URL for Nmap license. 2012-12-06 01:21:42 +00:00
henri
9865b8f828 Cleaning up: consistently get event masks from a static inline get_evmask() function. 2012-10-22 04:26:19 +00:00
henri
0d3dda36d4 Added new poll and kqueue/kevent nsock engines.
poll should be available almost everywhere.
kqueue/kevent are available on BSD systems (including MacOS).
2012-10-21 23:20:35 +00:00