Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: get_max_open_descriptors() is more generous than Nsock.
From: "Luis MartinGarcia." <luis.mgarc () gmail com>
Date: Mon, 19 Dec 2011 14:02:01 +0100

On 12/19/2011 01:56 PM, Henri Doreau wrote:
Hi Luis,

2011/12/19 Luis MartinGarcia. <luis.mgarc () gmail com>:
nsock_core.c:186: Attempt to FD_SET fd 1024, which is not less than
FD_SETSIZE (1024). Try using a lower parallelism.

Has anyone experienced this behavior? Is nsock failing to determine the
maximum number of descriptors per process? Is it
get_max_open_descriptors()'s fault?

This is neither nsock nor netutil's fault. The problem is that
select(2) can't deal with more than FD_SETSIZE descriptors. This
number is usually set to 1024, regardless your system configuration
for resource limits. Removing this select(2)-related limitation was
one of my primary aims for writing nsock-engines.

Depending on how get_max_open_descriptors() is used it might make
sense to make the function return MIN(FD_SETSIZE, <rlimit>).

Hi Henri,

Thanks for your quick response.

I should know the answer to this but, what's the current status of the
nsock-engines branch? Has it been merged into trunk? If it has, how do I
determine if the selected engine is select()-based or uses something
better? I'd like to find a way to use more than 1024 descriptors when
possible, not just use 1024 by default.

Thanks! Regards,

Luis MartinGarcia.
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

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