traceroute: unknown protocol icmp: No such file or directory

Rich Felker dalias at aerifal.cx
Fri Sep 22 20:06:16 UTC 2006


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.

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




More information about the busybox mailing list