Ethereal-dev: [ethereal-dev] Extra info in the tcp dissect detail/tree display

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Wed, 24 Nov 1999 22:53:39 +1000
In keeping with my request for more info based on the pedagogic value of
it, I went and figured it out for my self.

Here is a patch, which I may try applying when I get home tonight.

Btw, I have a talk on Ethereal that I have given a couple of times now, and
it seems to be well received. 

The title is:

   Software Development in Qantas Club Lounges.

The abstract goes something like this.

Much of my contribution to Ethereal was developed in Qantas Club lounges as
I travelled around Australia between courses.  Indeed, much of my
motivation for working on Ethereal was to develop a replacement for NetMon:
A package that could do a better job than the version of NetMon I was used
to, but ran on Linux so I could use it in courses.

This presentation looks at what Ethereal is, how it is developed and where
it is going.  Along the way, it attempts to answer the question: Has any of
that alcohol affected the code?

---------------------------------------------------

Perhaps someone would like to arrange for me to present it outside Australia?


--- packet-tcp.c.orig	Wed Nov 24 19:15:36 1999
+++ packet-tcp.c	Wed Nov 24 19:33:46 1999
@@ -422,7 +422,7 @@
   }
   
   if (tree) {
-    ti = proto_tree_add_item(tree, proto_tcp, offset, hlen, NULL);
+    ti = proto_tree_add_item_format(tree, proto_tcp, offset, hlen, NULL, "Transmission Control Protocol, Src Port: %s (%u), Dst Port: %s (%u), Seq: %u, Ack: %u", get_tcp_port(th.th_sport), th.th_sport, get_tcp_port(th.th_dport), th.th_dport, th.th_seq, th.th_ack);
     tcp_tree = proto_item_add_subtree(ti, ett_tcp);
     proto_tree_add_item_format(tcp_tree, hf_tcp_srcport, offset, 2, th.th_sport,
 	"Source port: %s (%u)", get_tcp_port(th.th_sport), th.th_sport);

Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx, Master Linux Administrator :-),
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course