[comp.protocols.tcp-ip] Packet Tracing

brady@MACOM4.ARPA (Sean Brady) (04/13/87)

Greetings all:

    On several occasions, I have seen messages which included packet traces
for packets sent around the internet. I would like to use this to perform
some tests here, but I am unable to find specific references on how to do
this options setting on my machines. I'm using SUN 3's with Unix 3.2 (I think).
Any ideas out there?

					Sean

jas@MONK.PROTEON.COM (John A. Shriver) (04/14/87)

In the 4.2BSD/4.3BSD world, the program is /etc/trpt, which stands for
TRansliterate Protocol Trace.  It's documented in section 8 of the
UNIX manuals.

By setting SO_DEBUG with a setsockopt() call, you can cause TCP
protocol traces to be accumulated in the kernel.  This is done by
routine tcp_debug() in the file ~sys/netinet/tcp_debug.c.  It keeps
the data in a compacted format in a circular buffer, that /etc/trpt
reads out and formats.

Unfortunately, at least in SunOS Version 3.0, Sun has removed the
actual code for tcp_debug() in the kernel.  It only contains a return.
Of course, they still provide /etc/trpt, but it cusses that it can't
find the symbol for the buffer in the kernel.  I can't understand WHY
they did this, but they did.  I have in the past been able to get Sun
software support to send me a binary tcp_debug.o that has not been
lobotomized.  Alternatively you probably would have no problem
dropping the 4.2BSD code into the hole, you might also have to fix the
header file.

Other 4.2BSD vendors are more reasonable.  The code is all there in
Ultrix-32 Version 1.2.

The other frustrating problem is that some of the TCP applications
have no way to request them to set the debug option.

netnews@orstcs.UUCP (04/15/87)

/* Written  7:39 am  Apr 14, 1987 by jas@MONK.PROTEON.COM in orstcs:comp.protocols.tcp-ip */
/* ---------- "Packet Tracing" ---------- */
In the 4.2BSD/4.3BSD world, the program is /etc/trpt, which stands for
TRansliterate Protocol Trace.  It's documented in section 8 of the
UNIX manuals.

By setting SO_DEBUG with a setsockopt() call, you can cause TCP
protocol traces to be accumulated in the kernel.  This is done by
routine tcp_debug() in the file ~sys/netinet/tcp_debug.c.  It keeps
the data in a compacted format in a circular buffer, that /etc/trpt
reads out and formats.

Unfortunately, at least in SunOS Version 3.0, Sun has removed the
actual code for tcp_debug() in the kernel.  It only contains a return.
Of course, they still provide /etc/trpt, but it cusses that it can't
find the symbol for the buffer in the kernel.  I can't understand WHY
they did this, but they did.  I have in the past been able to get Sun
software support to send me a binary tcp_debug.o that has not been
lobotomized.  Alternatively you probably would have no problem
dropping the 4.2BSD code into the hole, you might also have to fix the
header file.

Other 4.2BSD vendors are more reasonable.  The code is all there in
Ultrix-32 Version 1.2.

The other frustrating problem is that some of the TCP applications
have no way to request them to set the debug option.
/* End of text from orstcs:comp.protocols.tcp-ip */