Re: ntping Errors

Erik Schoenfelder (schoenfr@gaertner.de)
Tue, 25 Feb 97 12:11:00 +0100

Hi!

Cheng> I am trying to use ntping like this
Cheng> ntping -trace 1 mm04
Cheng> anyway, the result come as follow:

Cheng> traceroute result:
Cheng> ntping: dlpi: cannot set ttl - ouch...
Cheng> 1: 163.221.74.131 2 ms

Cheng> why the ntping cannot set ttl?

Well, if a header defines IP_TTL while compiling ntping.c
(eg. <sys/socket.h>), the code is activated, which sets the TTL via
setsockopt(). After setting the TTL a check via getsockopt() is made
to sanity check the value. if it does not match, the ouch messages
occurs.

If the hop 163.221.74.131 is the first hop to mm04 and not mm04
itself, it means the getsockopt() call on your platform is broken.

If 163.221.74.131 is mm04 and not the first hop, the setsockopt() call
is broken.

If IP_TTL is defined in the header, but not implemented in
{get,set}sockopt(), your networking code is poor and ntping is broken.

You may try to make ntping use the second way to set the TTL by
buildung a complete udp-packet by hand and sending via a raw socket.

You don't told us what operating system you are running, so please
check about a compilation define yourself and substitute the
YOUR_PLATFORM_DEFINE below:

--- ntping.c Thu Sep 19 10:59:13 1996
+++ ntping-x.c Tue Feb 25 12:01:56 1997
@@ -73,7 +73,7 @@


/* aix failes to use IP_TTL correct: */
-#ifndef _AIX
+#if !defined(_AIX) && !defined(YOUR_PLATFORM_DEFINE)
# if defined(IP_TTL) && ! defined(USE_DLPI)
/*
* with USE_DLPI we will not send our own handmade ip (udp) packets.

Then run make and make sinstall and check again.

Good luck,
Erik

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.