Nmap Development mailing list archives
Re: UDP 'bytes=' option with comm.exchange()
From: Brandon Enright <bmenrigh () ucsd edu>
Date: Sun, 27 Jul 2008 22:48:20 +0000
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, 27 Jul 2008 17:39:59 -0500 or thereabouts Kris Katterjohn <katterjohn () gmail com> wrote: ...snip...
I think the problem is that if no line or byte values are passed, the library defaults to reading as many lines as possible. While I thought this was good behavior when initially writing comm (because of the typical line-based protocols I figured would be used most), I think defaulting to reading as many bytes as possible seems like better behavior to me now (for this very reason). Unless there is any objection to this change, I will make it later tonight.BrandonThanks, Kris Katterjohn
I agree that in the absence of an option, getting the whole buffer rather than defaulting to line=1 (and blocking) is preferred. This change should be "safe" to make. As I understand it, these values are minimums. If you want 10 bytes you might get 20 but you'll always block until there are 10 available (or the timeout occurs). Thanks for your help, Brandon -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkiM+zsACgkQqaGPzAsl94I/qQCghCtFAdkE13IP8M8j4YMVyOCP BhAAnRj1wm9QSaBfmSW2EvF3dGr5+JM0 =E4Aq -----END PGP SIGNATURE----- _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- UDP 'bytes=' option with comm.exchange() Brandon Enright (Jul 27)
- Re: UDP 'bytes=' option with comm.exchange() Kris Katterjohn (Jul 27)
- Re: UDP 'bytes=' option with comm.exchange() Brandon Enright (Jul 27)
- Re: UDP 'bytes=' option with comm.exchange() Kris Katterjohn (Jul 27)
- Re: UDP 'bytes=' option with comm.exchange() Brandon Enright (Jul 27)
- Re: UDP 'bytes=' option with comm.exchange() Kris Katterjohn (Jul 27)