Nmap Development mailing list archives

Re: Port scanning behind proxies: my experiments with making ultra_scan work with nsock


From: David Fifield <david () bamsoftware com>
Date: Wed, 1 Jul 2015 14:25:18 -0700

On Wed, Jul 01, 2015 at 10:54:44PM +0200, Jacek Wielemborek wrote:
W dniu 01.07.2015 o 22:33, David Fifield pisze:
On Wed, Jul 01, 2015 at 05:59:02PM +0200, Jacek Wielemborek wrote:
W dniu 01.07.2015 o 17:54, David Fifield pisze:
It looks like struct linger is just two ints. Maybe you could just
statically allocate it and not need to allocate and free memory
dynamically.

Is it guaranteed to be two ints on all supported platforms?

I don't know. How big could it be, though?

Ah, I think I got your point now. The trick, though, is that I would
prefer to set SO_LINGER if the user didn't request that. I think that if
I statically allocated it, I would need to set it to some value anyway
and use it - unless I also introduced a flag that said whether the user
requested a SO_LINGER change. What do you think about this?

Sure, whatever. It's not a lot of memory anyway (a 64-bit pointer plus
malloc overhead or two ints plus a bool).
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: