On 10/17/07, Micah Cowan <[EMAIL PROTECTED]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Oleg Ace wrote:
> > Greetings,
> >
> > Was the feature being discussed here
> > http://www.mail-archive.com/wget@sunsite.dk/msg05546.html
> > and here
> > http://www.mail-archive.com/wget@sunsite.dk/msg05577.html
> > ever get implemented?
> >
> > In other words, is it possible to do:
> > wget --bind-address=1.2.3.4:2000-3000 http://...
> >
> >>From trying it out and looking briefly at the code, it would appear it
> > is not, but wanted to make sure.
> >
> > If that is the case, does anyone still have the old patch available,
> > or has a similar new one?
>
> Looking at the threads you indicated, it appears that people were
> generally happy to include the feature, but were unhappy with the
> specific implementation from the patch:
>
>   * parsing of --bind-address belongs in the getopt loop
>   * sscanf() should be avoided for use in the parsing.
>   * the ports should be chosen from that range at random, rather than
> sequentially, to address an issue pointed out by the Sockets FAQ.
>
> The third point above introduces its own problems: how many bind()
> attempts should we make before throwing in the towel? Or should we
> attempt every port in that range, keeping an 8k array of bits to track
> which ports we've tried already?

Well, I'm don't have much to say about about the other points but one
certainly does not need to keep an array for something like this- with
the classic pseudorandom shuffle algorithm you only need to keep a
count of the ones visited.  Shall I pull out my Knuth?

> Clearly, whatever approach we take will be _vastly_ less
> efficient/intelligent than the way the OS picks a port for us, and we'll
> need to point these limitations out in the documentation.
>
> I'm not going to write the code for this (at least not any time soon);
> if someone is interested enough to rewrite the patch to address these
> shortcomings, though, I'll be happy to include it, seeing as how it
> apparently met with Hrvoje's and Mauro's approval (and I see how it
> could be useful as well; though of course its primary use is probably to
> get around broken environments).
>
> I will submit a low-pri issue for it, in the meantime, in case someone
> sees it and wants to pick it up. :)
>
> - --
> Micah J. Cowan
> Programmer, musician, typesetting enthusiast, gamer...
> http://micah.cowan.name/
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHFm3C7M8hyUobTrERCKYdAJwMSsemuOoWGmDFLxK8vAzxNlXQWQCfV89r
> 0gVv77+C2CIlI4lVULFLLC8=
> =xpu6
> -----END PGP SIGNATURE-----
>


-- 
Best Regards.
Please keep in touch.

Reply via email to