Nmap Development mailing list archives

Re: get_max_open_descriptors() is more generous than Nsock.


From: "Luis MartinGarcia." <luis.mgarc () gmail com>
Date: Mon, 23 Jan 2012 20:45:04 +0100

On 01/23/2012 08:30 PM, Henri Doreau wrote:
Hi Luis,

2011/12/19 Luis MartinGarcia. <luis.mgarc () gmail com>:
I'm going to add a new item to Nping's to-do list so I can look into
this again the day the nsock-engines branch gets merged.

nsock-engines has now been merged[1]. So what would be the best API? A
nsock function that returns the maximum number of fds each nsock_pool
can handle? This, combined with libnetutil::get_max_open_descriptors()
should let applications know how many fds can still be opened.

What about postponing this until the stable branch is created though?
What do you think?


Hi Henri,

I am glad to see that the nsock engines branch got merged. About your
question, from Nping's perspective, it would be great to know the
maximum number of fds that nsock can handle simultaneously. I do not
expect to be able to determine the max number of sockets per nsock pool.
I honestly don't see how that could be implemented. For me, having
access to the per-process limit, is fine.

In practical terms, Nping needs that information to determine when to
stop requesting new sockets and start reusing existing ones.

About when to implement the feature, it is up to you. This is certainly
not critical, so there is no hurry at all.

Thanks a lot! Best 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/


Current thread: