Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: Any Win32 porting clues?
From: kx <kxmail () gmail com>
Date: Wed, 28 May 2008 23:14:23 +0200

I am a sick, I love windows porting issues.

Nmap compile, has always thrown errors due to the type we pass being a
size_t (unsigned int), while the Windows connect expects an int:

This is due to calling sizeof to get the socklen, and sizeof returns size_t:

Thus, if you want to tweak it for windows, just
http://www.google.com/codesearch?q=%22typedef+int+socklen_t%22 as have
many others.

BTW, I really wish I could browse the SVN, so I tried to submit it to
Google Code Search. Not sure how it will work, especially with the
Nmap SVN requiring the username guest and blank password. I also
singly added http://nmap.org/dist/nmap-4.60.tar.bz2, but maybe Fyodor
could create a Code Search Site Map for the dist directory?

Maybe one of the SoCer's could talk to someone at Google to see if
they could get Nmap specially added. ;)

I did find source up to 4.20

Unfortunately, the page is no longer indexed/up.


On Wed, May 28, 2008 at 1:17 AM,  <doug () hcsw org> wrote:
On Tue, May 27, 2008 at 11:09:34PM +0200 or thereabouts,  mixter () gmail com wrote:
Currently, I'm stuck with missing definitions....

ncat\sys_wrap.h(41) : error C2061: syntax error : identifier 'socklen_t'

I think this might help:


Incidentally, socklen_t was kinda a POSIX mistake. From accept(2):

Quoting Linus Torvalds: _Any_ sane library _must_ have "socklen_t" be the same size as int. Anything else breaks any 
BSD socket layer stuff. POSIX initially _did_ make it a size_t, and I (and hopefully others, but obviously not too 
many) complained to them very loudly indeed. Making it a size_t is completely broken, exactly because size_t very 
seldom is the same size as "int" on 64-bit architectures, for example. And it _has_ to be the same size as "int" 
because that's what the BSD socket interface is. Anyway, the POSIX people eventually got a clue, and created 
"socklen_t". They shouldn't have touched it in the first place, but once they did they felt it had to have a named 
type for some unfathomable reason (probably somebody didn't like losing face over having done the original stupid 
thing, so they silently just renamed their blunder).

Windows one of the few things in development I've managed to avoid in
many years;)

Ah yes, in a perfect world. :)



Version: GnuPG v1.2.4 (GNU/Linux)


Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

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