We use this file to get at the LPADAPTER member of struct pcap on Windows,
which we need in order to pass to PacketSetReadTimeout in a few places.
(Normally pcap_t is an opaque type so we're not supposed to see inside it.) I
don't see an easy way to get rid of the calls to PacketSetReadTimeout right
now.
$PROGRAMFILES64/WinPcap. Set $INSTDIR to $PROGRAMFILES/WinPcap or
$PROGRAMFILES64/WinPcap depending, but don't modify it if it already has a
value (from /D= on the command line). These changes make /D= work to install a
few files into an alternate directory.
installation directory, but it has some restrictions:
;; It must be the last parameter used in the command line and must not
;; contain any quotes, even if the path contains spaces. Only absolute
;; paths are supported.
before possibly changing it to 2 (SERVICE_AUTO_START) at the user's request.
This ensures that if the "Start NPF service at boot" option is unchecked, the
NPF service will not start at boot, even if WinPcap was previously installed
that way. The patch is by Rob Nicholls.
service 'NPF' at startup" box was unchecked and the "Start the
WinPcap service 'NPF' now" box was checked, the second checkbox
would be ignored (the service would not be started now). [Rob
Nicholls]
o UPgrades to latest version of WinPcap (4.1.1)
o corrects a long-standing bug in our WinPcap installer (we surrounded
the install path in the registry with double quotes, which meant we
wouldn't uninstall our older versions during an install)
o removed the GUI option to select where the WinPcap files are
installed (all of the important ones end up in the Windows directory
anyway). WinPcap folder is installed in the same Program Files
location on x64 platforms as the official WinPcap installer uses
(although we're not sure that is the best place)
o Rob notes that he's successfully tested the installer on XP SP3,
2003 SP2 x86, Vista SP2 x86 and Windows 7 x64
by the installer. Also notes that we recommend starting the WinPcap service at system startup for Windows 7 as well as vista. The patch is from Rob Nicholls.
Unfortunately, it seems cygwin doesn't know how to expand a variable like %ProgramFiles% so that the Makefile would be locale-agnostic, so I just modified it for the most common version of "Program Files".
Here is a mostly exhaustive list of the changes:
o Removes the SCRIPT_ENGINE_* status defines and replaces the
instances with regular boolean integer returns or changes the
procedure to return void. The latter case is better generally because
the caller ignores any status return (e.g. nmap.cc calling open_nse)
and/or the procedure raises a fatal error when unsuccessful.
o Moves the SCRIPT_ENGINE_LUA_DIR and the like to the nse_main.h header file.
o Removes the use of the SCRIPT_ENGINE_TRY (there was only one left)
and thus changes the call to l_dnet_open to a void function called
directly by luaopen_nsock (in nse_nsock.cc) instead of luaopen_nmap
(in nse_nmaplib.cc). I felt moving the function was also an
appropriate (but somewhat unrelated to the intent of the patch) change
as opening the dnet metatable is very related to opening up the
nsock library. This confines errors in opening the nsock library, including
opening the dnet metatable, to the call to luaopen_nsock.
o The FILES and DIRS defines are moved in to nse_fs.h where they are
more appropriate and localalized.