traceroute: unknown protocol icmp: No such file or directory
Tito
farmatito at tiscali.it
Fri Sep 22 20:12:05 UTC 2006
On Friday 22 September 2006 22:06, Rich Felker wrote:
> On Fri, Sep 22, 2006 at 09:41:23PM +0200, Tito wrote:
> > > Then by reading "man getprotobyname", I discovered that it was because
> > > the function didn't find anything in /etc/protocols corresponding to
> > > icmp (and also that this file doesn't exist [it explain the last part
> > > of the error]). I simply copied /etc/protocols and it worked.
> > >
> > > It may also affects other applets calling that function.
> > >
> > > Regards,
> > >
> > > Thomas
> >
> > Just a question couldn't the requested values be hardcoded?
> > to avoid this call to getprotobyname.
> > Will they change?
>
> No, getprotobyname is an utterly useless function. These numbers are
> permanent constants defined by internet standards and included in the
> IP packet headers. Busybox especially should just hard-code the
> numbers, but all apps should really be doing this anyway.
Hi,
The files that use getprotobyname are:
busybox/libbb/create_icmp6_socket.c
busybox/libbb/create_icmp_socket.c
busybox/networking/inetd.c
busybox/networking/traceroute.c
maybe you want to take a look at them? ;-)
Ciao,
Tito
> As an aside, perhaps uclibc should adopt my improved version of
> getprotobyname an friends which don't need useless files in /etc:
>
> http://svn.mplayerhq.hu/libc/trunk/posix/netdb/proto.c?view=markup&rev=451
>
> Rich
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
More information about the busybox
mailing list