Do you have your minimum ramdisk image which can provide basic network services ?

Daris Nevil Daris.Nevil at
Thu Jun 1 01:35:32 EST 2000


I'm not sure what the Resolver Error 0 zero is either. I don't
remember seeing that one.

However, I do know that you don't need inetd for ping.  If you
want to use ping the way it is then you will need the nss
libraries in addition to your /etc/protocols file.  I cheated and
hacked ping.c and hard-coded the icmp protocol number.  The
patch for the hack is included below.

Daris Nevil


Patch for ping.c that removes the need for /etc/protocols and nss
By Daris Nevil (dnevil at
To patch:
        cd netkit-base-0.10/ping
        patch -Np1 < ping-no-protocols.patch

--- ping.old    Tue May 30 22:26:48 2000
+++ ping.c      Tue May 30 22:26:54 2000
@@ -87,6 +87,7 @@
 #ifdef __linux__
+#define NO_PROTOCOLS   // Elimnates the need for /etc/protocols and nss

 #if defined(__GLIBC__) && (__GLIBC__ >= 2)
@@ -223,13 +224,16 @@
         * Pull this stuff up front so we can drop root if desired.
        setprotoent(0);  // Leave the /etc/protocols file open

        if (!(proto = getprotobyname("icmp"))) {
                (void)fprintf(stderr, "ping: unknown protocol icmp.\n");
+       proto->p_proto = 1; // ICMP, from /etc/protocols
        if ((s = socket(AF_INET, SOCK_RAW, proto->p_proto)) < 0) {
                if (errno==EPERM) {
                        fprintf(stderr, "ping: ping must run as root\n");

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list