[Toybox] [Patch - New Toy] Add traceroute
Ashwini Sharma
ak.ashwini at gmail.com
Sat Sep 14 19:59:42 PDT 2013
my patch on lib/pending.c is only modifying get_int_value() function.
Checking '-' and leading white spaces in the string.
I changed this
- if (errno || numstr == ptr || *ptr || rvalue < lowrange || rvalue >
highrange)
- perror_exit("bad number '%s'", numstr);
to
+ if(errno || *ptr) perror_exit("invalid number '%s'", numstr);
+ if(rvalue < lowrange || rvalue > highrange)
+ error_exit("out of range '%s'", numstr);
for having a better error message.
IPv6 is in fact important. Working on it, but was confused whether to have
the IPv6 support
in the same traceroute.c or separate. As far as I see, there will be lot
many if/else checks for IPv4/IPv6 cases.
Like for the incoming packet parsing.
Any suggestions are welcome.
regards,
Ashwini
On Fri, Sep 13, 2013 at 11:31 PM, Isaac <ibid.ag at gmail.com> wrote:
> On Fri, Sep 13, 2013 at 03:10:24PM +0900, Ashwini Sharma wrote:
> > Hi All,
> >
> > Attached is the traceroute patch.
> >
> > This supports IPv4 destination trace.
> >
> > Have a look at the same and pass on your comments.
>
> I note that it appears to revert one of the recent changes to
> lib/pending.c.
>
> (Would you mind sending new toys as just the *.c file that goes in toys/*/
> when it doesn't need to touch lib/?)
>
> Also, isn't IPv6 rather important these days?
>
> Thanks,
> Isaac Dunham
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130915/86a1c595/attachment-0002.htm>
More information about the Toybox
mailing list