Re: [Toybox] [New Toy] - ip

2014-10-15 Thread Ashwini Sharma
Hi Rob,

The version uploaded onto the hg tree is the old one.
You might have missed the last one due to the size issue.

This time I have zipped the patch to stay in the size limit.
Please apply this one.

Thanks,
Ashwini

On Mon, Sep 29, 2014 at 6:38 AM, Rob Landley  wrote:

> On 09/15/14 23:19, Ashwini Sharma wrote:
> > Hi Rob,
> >
> > Earlier had sent a version of ip, which had many TODO items.
> > Attached is the updated version, having complete support for
> > ip _link_, _addr_, _rule_, _route_ and _tunnel_ options.
> >
> > Please see to it, if this can be added to the hg.
>
> Alright, I'm not personally comfortable with this order of operations (I
> wanted to implement route and so on as separate operations and then
> optionally have an ip that acted as a wrapper for the other commands,
> and this shares no code with even the existing ifconfig that I've noticed).
>
> But if you've already done the work and presumably have a use for it, I
> can at least put it in pending until I get around to doing something
> with networking.
>
> Rob
>


ip.c.patch.bz2
Description: BZip2 compressed data
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] [New Toy] - ip

2014-09-28 Thread Rob Landley
On 09/15/14 23:19, Ashwini Sharma wrote:
> Hi Rob,
> 
> Earlier had sent a version of ip, which had many TODO items.
> Attached is the updated version, having complete support for
> ip _link_, _addr_, _rule_, _route_ and _tunnel_ options.
> 
> Please see to it, if this can be added to the hg.

Alright, I'm not personally comfortable with this order of operations (I
wanted to implement route and so on as separate operations and then
optionally have an ip that acted as a wrapper for the other commands,
and this shares no code with even the existing ifconfig that I've noticed).

But if you've already done the work and presumably have a use for it, I
can at least put it in pending until I get around to doing something
with networking.

Rob
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] [New Toy] - ip

2014-09-22 Thread Rob Landley
On 09/22/14 07:05, Bastian Bittorf wrote:
> * Rob Landley  [22.09.2014 13:48]:
>> I really don't want two implementations of the same functionality. (If I
>> did ip, I was going to do it as a wrapper around "ifconfig" and "route"
>> and similar...)
> 
> the other way around, a wrapper around 'ip' - because
> 'ifconfig','route' etc. implements a subset of 'ip'. sharing code is an
> important goal and now we have a mess 8-( sorry...

So if all you need is "ifconfig" and "route", you have to suck in the
whole ip command with tunnel support and everything?

You're starting with the assumption that ip is the way to do it and
reasoning backwards from your conclusion.

> at the moment, there are no test defined under 'scripts/test' for ifconfig.

Because they require root access and I haven't figured out how I want to
handle that. The old "make chroot" code I did back in 2006 for busybox
was better than nothing, but doesn't help you clean up if failed tests
leave mountpoints or fiddle with your network status. Needing to reboot
your development machine after running a test suite is a bad thing.

Also, ifconfig has the problem of knowing what devices are available. if
you run it on a machine that _only_ has wireless, there's no eth0.
Running it on a machine that only has a wired connection, no wlan0. (And
then off x86 they may have different names entirely...)

What I might do is set up an lxc container with known devices based on
tun/tap. Or maybe set up a qemu instance (again with known devices).
Either would introduce an external dependency to run the root parts of
the test suite, but it's probably my best option...

> i'am really unsure how to 'test' this command. set ip-addresses on a
> dummy-interface and check/screen-scrape the output of ifconfig?

We can require that lo (loopback interface) exists, but that doesn't let
us test all the codepaths. Hence qemu, where we can emulate known devices.

> minor notice: the link to 'ifconfig' on http://landley.net/toybox/status.html
> is wrong/broken, please use http://linux.die.net/man/8/ifconfig

That's actually generated by a script:

http://landley.net/hg/toybox/file/tip/scripts/mkstatus.py

Not sure how to teach that about manual _sections_.  Hmmm...

Rob
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] [New Toy] - ip

2014-09-22 Thread Bastian Bittorf
* Rob Landley  [22.09.2014 13:48]:
> code with that. And last year a very ineffective advocate for "ip" was
> here doing his best to convince everyone we really didn't need it:
> 
> http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000825.html
> 
> The end result of that big long thread was me saying "if somebody wants
> to send a patch, I'll look, but I'm not writing it myself". Now somebody
> has sent a patch.

sorry, I was not good enough to convince everybody.

[...}
> I really don't want two implementations of the same functionality. (If I
> did ip, I was going to do it as a wrapper around "ifconfig" and "route"
> and similar...)

the other way around, a wrapper around 'ip' - because
'ifconfig','route' etc. implements a subset of 'ip'. sharing code is an
important goal and now we have a mess 8-( sorry...

at the moment, there are no test defined under 'scripts/test' for ifconfig.
i'am really unsure how to 'test' this command. set ip-addresses on a
dummy-interface and check/screen-scrape the output of ifconfig?

minor notice: the link to 'ifconfig' on http://landley.net/toybox/status.html
is wrong/broken, please use http://linux.die.net/man/8/ifconfig

bye, bastian
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] [New Toy] - ip

2014-09-22 Thread Rob Landley
On 09/15/14 23:19, Ashwini Sharma wrote:
> Hi Rob,
> 
> Earlier had sent a version of ip, which had many TODO items.
> Attached is the updated version, having complete support for
> ip _link_, _addr_, _rule_, _route_ and _tunnel_ options.

The reason this got trapped in the spam filter (along with about 200
other messages since the last time I went rhoguh and deleted them) is
the command's larger than the message size limit.

This is an enormous command, and there's a certain amount of "bracing
myself to read through it". There's also the amount of time ifconfig
took to clean up, and here's a new implementation that doesn't share
code with that. And last year a very ineffective advocate for "ip" was
here doing his best to convince everyone we really didn't need it:

http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000825.html

The end result of that big long thread was me saying "if somebody wants
to send a patch, I'll look, but I'm not writing it myself". Now somebody
has sent a patch.

Sigh. I should just put this in pending and cut a release (I'm behind
but haven't finished ping or the user*.c and group*.c cleanups yet), but
I really don't want two implementations of the same functionality. (If I
did ip, I was going to do it as a wrapper around "ifconfig" and "route"
and similar...)

Part of the problem is I don't use ip, I use the ifconfig side of
things, so I'm not personally familiar with the command syntax of the ip
versions, so it's harder for me to test them. I have to learn a whole
second set of commands well enough to find corner cases that break.

This is why it has not yet bubbled to the top of my todo list. Lemme
revisit this after I get 0.4.10 out.

Rob
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


[Toybox] [New Toy] - ip

2014-09-18 Thread Ashwini Sharma
Hi Rob,

Earlier had sent a version of ip, which had many TODO items.
Attached is the updated version, having complete support for
ip _link_, _addr_, _rule_, _route_ and _tunnel_ options.

Please see to it, if this can be added to the hg.

regards,
Ashwini


ip.c.patch
Description: Binary data
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net