Ethereal-dev: Re: [Ethereal-dev] COL_INFO for andX commands

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

From: "Ronnie Sahlberg" <sahlberg@xxxxxxxxxxxxxxxx>
Date: Tue, 23 Jul 2002 05:54:30 +1000
Hi,
Add a new bool parameter "first_pdu" to dissect_smb_command()
set this parameter to TRUE when calling dissect_smb_command() from
dissect_smb()
and set it to FALSE when it is called from anywhere else.

In dissect_smb_command, change col_add_fstr() into col_append_fstr()

also add to the beginning of dissect_smb_command() something like
if(first_pdu){
    col_add_fstr(pinfo->cinfo, COL_INFO, "");  /*clear any info stuff from
lower layers*/
} else {
    col_append_fstr(pinfo->cinfo, COL_INFO, "; ");
}


that should do it.


The same problem also exists in the ONC-RPC dissector. Could you look into
making a small patch to fix that
one as well?



----- Original Message -----
From: "Richard Sharpe"
Sent: Tuesday, July 23, 2002 6:17 AM
Subject: Re: [Ethereal-dev] COL_INFO for andX commands


> On Mon, 22 Jul 2002, Guy Harris wrote:
>
> > On Mon, Jul 22, 2002 at 02:19:24PM +0930, Richard Sharpe wrote:
> > > A quick way I can see to do it is to introduce an extra parameter to
> > > dissect_smb_command called first, set to true when dissect_smb_command
is
> > > called by dissect_smb, and False when called on an andX.
> > >
> > > Then we can choose whether to col_add_fstr or col_append_fstr.
> >
> > The SMB dissector clears the Info column very early in the dissection
> > process, so you can, presumably, always use "col_append_fstr()".
>
> Yes, but you need a way to decide if you should output the ';'. It is
> going to look ugly to see:
>
>   ; Session Setup & X MUMBLE\FROTZ; Tree Connect & X \\SERVER1\XYZSHARE
>
> Last thing I want is for Ethereal to look ugly :-)
>