bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inetutils-1.4.1: suggest removal of getprotobyname() calls


From: Michael Deutschmann
Subject: Re: inetutils-1.4.1: suggest removal of getprotobyname() calls
Date: Fri, 4 Oct 2002 05:31:58 -0700 (PDT)

On Fri, 4 Oct 2002, Sergey Poznyakoff wrote:
> > the numbers), and means that ping requires /etc/protocols to be available
> > to function.
>
> Hmm, /etc/protocols is supposed to function on any decent platform :^)

I originally noticed this years ago when I was first learning to make
boot/root disks.  I was puzzled at first by the "unknown protocol icmp"
error after achieving the shell prompt and trying to use ping.  I
immediately looked up the source and figured it out, but still it's a
niggle.  "ping" is one of very few programs that need that file, and the
only one that goes in /.

Also, while "/etc/protocols" is quite small, nowadays (with glibc)
removing it allows the 35k libnss_files.so module to be skipped as well.
For rootdisk packing purposes, that saves more space than ping's entire
executable.

> Anyway, I don't believe getprotobyname hurts performance in any way,
> given that it is executed only once, at startup.

It's more of a size and code complexity optimization.  And while the
performance difference is negligible (and irrelevant since ping's job is
mostly waiting), it's in my favor.

---- Michael Deutschmann <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]