Ethereal-dev: Re: [ethereal-dev] col_append_fstr function not found during link stage
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Guy Harris <guy@xxxxxxxxxx>
Date: Wed, 13 Oct 1999 14:35:39 -0700 (PDT)
> While working on some code to handle truncated packet I discovered the
> col_append_fstr function in packet.h It was just what I was looking for; a
> method to add an ***SHORT PACKET** message to the information column. After
> I added the function the link stage failed because this new and wonderful
> function was unavailable.
>
> What gives ??
The declaration of "col_append_fstr()" was added to "packet.h" in
checkin 1.48:
revision 1.48
date: 1999/05/09 04:16:36; author: sharpe; state: Exp; lines: +11 -1
Added initial support for SMB plus most of negprot decode ..
The same goes for "col_append_str()".
There's no implementation of it in the CVS tree, though.
Richard's message of 12 Apr 1999 says:
Date: Mon, 12 Apr 1999 22:06:58 +0900
To: ethereal-dev@xxxxxxxx
From: Richard Sharpe <sharpe@xxxxxxxxxx>
Subject: [ethereal-dev] Added col_append_str
Hi,
With respect to my suggestions around dissect_telnet and
dissect_ftp, I added col_append_str and it seems to work. One
problem is that the rest of the line does not display unless you
expand the column and then scroll.
Is there any way to have that column as wide as the widest text
in it by default?
I would have added col_append_fstr, but could not come to grips
with how to have vsnprintf add additional items to its list,
like the current contents of the column :-)
Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx, NIC-Handle:RJS96
NS Computer Software and Services P/L,
Ph: +61-8-8281-0063, FAX: +61-8-8250-2080,
Samba (Team member), Linux, Apache, Digital UNIX, AIX, C, ...
and my followup said:
From: guy@xxxxxxxxxx (Guy Harris)
Subject: Re: [ethereal-dev] Added col_append_str
To: sharpe@xxxxxxxxxx (Richard Sharpe)
Date: Mon, 12 Apr 1999 19:36:01 -0700 (PDT)
Cc: ethereal-dev@xxxxxxxx
> With respect to my suggestions around dissect_telnet and
> dissect_ftp, I added col_append_str and it seems to work. One
> problem is that the rest of the line does not display unless
> you expand the column and then scroll.
>
> Is there any way to have that column as wide as the widest text
> in it by default?
If "gtk_clist_set_column_width()" causes columns to expand in width (and
causes the top-level window to expand as needed), then having
"col_add_str()", "col_append_str()", etc. keep track of the maximum
width of the column to which they're adding stuff, and using that to
change the column widths after all packets have been run through the
dissector to generate their summary lines,t hat might do it. (See the
"XXX" comment before "get_column_width()".)
> I would have added col_append_fstr, but could not come to grips
> with how to have vsnprintf add additional items to its list, like
> the current contents of the column :-)
One could, I guess, copy "fd->cinfo->col_data[i]" to a temporary buffer,
and append it after the "vsnprintf()" call.
The first problem should, I think, now be fixed - the COL_INFO column
should now automatically expand to be wide enough to display the longest
string. If Richard was waiting for that to be fixed before checking in
"col_append_str()", he can now check that in.
Phil Techau also said he'd implemented a routine with that name in later
mail:
Date: Wed, 07 Jul 1999 18:23:23 -0400
From: Phil Techau <phil@xxxxxxxxxxxxxxxx>
To: ethereal-dev@xxxxxxxx
Subject: [ethereal-dev] "Info" column
I've written some decoding routines for some proprietary network
messages. These messages are layered on TCP. Due to several
conditions, there can be many of these messages in one network frame.
One of the main developers of this software asked if I could put a short
summary of the contents of each message on the "Summary" (Info column)
line. I've shortened the name of each command that gets processed for
summary line display, but still come up with some very long lines.
The summary I'm putting out for requests is something along the line of
"command object1 object2", and for responses
"response object1 Error:object2" if there was an error commanding one of
the objects. The current size of 256 bytes is nowhere near big enough
to store the information for one frame of messages.
I initially just bumped COL_MAX_LEN from 256 up to 4096, but that seemed
rather wasteful and prevented me from running against large capture
files until I straightened out a rather marginal virtual memory
configuration on my workstation.
What I have at the present time is a second definition:
COL_MAX_INFO_LEN, which gets used when the column type is "info".
I've also written a "col_append_str" routine to append each message's
information to the data already stored in the desired ("info" in this
case) field. Right now this routine uses strlen and strncat, so isn't
as efficient as the method used internally in packet-tcp.c. However, we
should have a general purpose routine to do appending so that each
module that needs this functionality doesn't have to duplicate the
effort.
This seems to be something that others would want to do, so I'm hoping
to get this functionality built in, rather than having to make the
changes for each new release.
If you want the specific changes made to incorporate these changes, let
me know and I'll provide diffs of the affected routines.
In general, "post the diffs to the list" seems to be the strategy most
people use - it saves a protocol round-trip (i.e., instead of
From: developer
To: ethereal-dev@xxxxxxxx
Subject: added dissector for Internet Telepathy Protocol
I have some changes to add a dissector for the Internet
Telepathy Protocol; let me know if you're interested.
To: developer
From: another-developer
Cc: ethereal-dev@xxxxxxxx
Subject: Re: added dissector for Internet Telepathy Protocol
> I have some changes to add a dissector for the Internet
> Telepathy Protocol; let me know if you're interested.
Sure, send 'em out.
From: developer
To: another-developer
Cc: ethereal-dev@xxxxxxxx
Subject: Re: added dissector for Internet Telepathy Protocol
OK, I've attached the ITP decoder.
you get just
From: developer
To: ethereal-dev@xxxxxxxx
Subject: added dissector for Internet Telepathy Protocol
I have some changes to add a dissector for the Internet
Telepathy Protocol; the changes are attached.
).
- References:
- [ethereal-dev] col_append_fstr function not found during link stage
- From: Jeff Foster
- [ethereal-dev] col_append_fstr function not found during link stage
- Prev by Date: Re: [ethereal-dev] pim(protocol independent multicast)
- Next by Date: Re: [ethereal-dev] pim(protocol independent multicast)
- Previous by thread: [ethereal-dev] col_append_fstr function not found during link stage
- Next by thread: [ethereal-dev] patch including packet-yhoo.c - yahoo messenger/pager protocol
- Index(es):





