[Toybox] - Add route

Isaac ibid.ag at gmail.com
Sat Sep 7 07:47:03 PDT 2013


On Mon, Sep 02, 2013 at 11:15:14AM +0900, Ashwini Sharma wrote:
> HI Rob & list,
> 
>   Attached is the patch for _route_ command. It does display, add and del
> functions for routing tables.
> Have a look at it.
> 
> regards,
> Ashwini Kumar

OK, I took a quick look through it.
First, thanks for doing route.

I note that show_route_help is identical to show_help() apart from the 
error message.  That's probably not needed.
Now...
Hmm, there's an else if (!strcmp) ladder.
It could be reduced to a switch if we take 
*argv[0]<<16 + *argv[1]<<8 + *argv[2]

And the help could use a little modification to make it more commonly 
understandable:
route [-ne] [-A inet | inet6] [add target | del target]
...
-A inet(6)  Select...
(note one space between the option and its parameter, 
but two between the parameter and the explanation)

The rest I don't understand well enough to comment on.

Thanks,
Isaac Dunham

 1378565223.0


More information about the Toybox mailing list