Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: [nping] WINAPI becoming undefined
From: "Luis MartinGarcia." <luis.mgarc () gmail com>
Date: Mon, 11 Apr 2011 18:57:06 +0200

On 04/07/2011 07:49 PM, Gisle Vanem wrote:
"David Fifield" <david () bamsoftware com> wrote:

This is getting outside of my offhand Windows header knowledge. Could
you perhaps trace the problem backwards with

#ifndef WINAPI
#error WINAPI undefined
#endif

I've done that too and other things (like studying the 'gcc -E'
output). I've not found the problem, so I'll leave winfix.cc with my
fix of putting system-headers ahead of local headers.

But I must say the state of building and understanding the file-structure
etc. of Nmap/Win is rather hard and confusing.
* Take the hand-edited *config*.h files for instance. The  "#define
HAVE_OPENSSL" is defined in 4 different places!
 Couldn't there be a master-file "mswin32/win_config.h" where all
 this stuff gets placed?
* There are duplicates of several files. E.g. 2 "winclude.h" files.
 Also confusing and unneeded IMHO. If the motive for this was that
 'nping' could be built outside the nmap source-tree, it's
understandable.
 But I doubt that will work. Has anyone tried that?

We need more ideas on this. I'm willing to provide some of the patches
(to the project/solution files too), but I've not been involved with
nmap so long... I don't know the details and motivation of why things
are as they are. The original authors better step forward, if they're
still there?


Hi Gisle,

Sorry I took so long to respond. Thanks for reporting this problem and
trying to fix it.

First of all, your suspicions about being able to build Nping outside of
the Nmap source tree are partially correct. Nping was originally meant
to be built as a standalone application. We didn't know how stable it
was so it was decided not to include it in the Nmap distribution package
at first. Eventually Fyodor decided that Nping met the necessary
requirements and included it in Nmap. That's the reason why there is a
bit of a mess with all those header files.

When I've tested Nping on Windows, I've been able to compile it just
fine, using Visual Studio (the "recommended" way to build on Windows),
but I do understand people that prefer to use MingW. Obviously, we can
make a few changes to improve our support for MingW. Since you have been
looking into the problem, could you please produce a patch that fixes
the issue and/or improves the existing header organization?

Thanks again. Kind regards,

Luis MartinGarcia.




_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault