[Toybox] [PATCH] netcat: make -l exit after handling a request
Josh Gao
jmgao at google.com
Tue Jul 18 11:44:19 PDT 2017
Sorry for pestering, but have you gotten a chance to take a look at these
yet? We're starting to grow dependencies on some of these patches (tests
that want to be checked in Soon are being written against a checkout with
the patches manually applied)
On Fri, Jun 30, 2017 at 12:17 PM, Josh Gao <jmgao at google.com> wrote:
> Updated the original patch to just jump to cleanup, instead of rearranging
> things.
>
> Also, polished up the proof of concept xgetaddrinfo (this needs a better
> name)
> patch, and used it to implement -4, -6 (plus another patch to do -u).
>
> On Thu, Jun 29, 2017 at 6:59 PM, enh <enh at google.com> wrote:
>
>> ping? various networking folks are looking to add tests that use
>> netcat, and i'd rather start them off on toybox netcat rather than BSD
>> and then have to move them across to toybox later. (obviously there's
>> other missing stuff in toybox, but these patches are the only things
>> they actually need right now.)
>>
>> On Wed, Jun 28, 2017 at 3:47 PM, Josh Gao <jmgao at google.com> wrote:
>> > On Sun, Jun 25, 2017 at 12:14 PM, Rob Landley <rob at landley.net> wrote:
>> >>
>> >> 1) switching it to use xconnect() which it predates, and which is hard
>> >> because the various users in tree all want slighty different things out
>> >> of the getaddrinfo() plumbing and I've made a couple attempts to
>> >> unify/genericize it but keep getting pulled alway by $DAYJOB crisis du
>> >> jour halfway through and forgetting what design problem details I was
>> >> halfway through solving and have to start over again...
>> >
>> >
>> > BTW, I took a quick look at this because we have users that want -4/-6
>> (and
>> > IPv6 support in general). `nc -s` makes it so that you can't use
>> xconnect
>> > because you don't know what to bind to until after you've resolved the
>> > target
>> > address. Something like xbind_and_connect might work, but there's also
>> > things
>> > that we might want to do in between socket and bind (e.g. setting
>> > SO_REUSEADDR).
>> >
>> > The thing that everyone really wants is a way to iterate over
>> getaddrinfo
>> > results;
>> > maybe that's what should be exposed? I have a rough proof of concept
>> patch
>> > attached that implements this and uses it in netcat.
>> >
>> > (There's also another edge case with -s: what happens if the host you
>> pass
>> > in
>> > resolves to multiple addresses? OpenBSD's netcat seems to just bind the
>> > first
>> > compatible address it resolves to, so we can maybe just ignore this.)
>> >
>> > -Josh
>> >
>> > _______________________________________________
>> > Toybox mailing list
>> > Toybox at lists.landley.net
>> > http://lists.landley.net/listinfo.cgi/toybox-landley.net
>> >
>>
>>
>>
>> --
>> Elliott Hughes - http://who/enh - http://jessies.org/~enh/
>> Android native code/tools questions? Mail me/drop by/add me as a reviewer.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170718/4df2c0ac/attachment.htm>
More information about the Toybox
mailing list