Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: RE: [Ethereal-dev] Help With Columns!

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

From: Sahil Kumar <Sahil.Kumar@xxxxxxxxxxx>
Date: Fri, 17 Jun 2005 10:26:36 -0500
Hi Gilbert, 

Thanks for helping me out on my last problem. It was solved, thanks to
you!
Well, today I bumped into another problem, which I am sure is really a
small one.

I am trying to print out the PROTOCOL & INFO column for the two
protocols I have. I am able to do so with Proto1 (which is on top of
ethernetII) , but I am not able to do so for Proto2(which is on top of
Proto1).

I have tried almost everything, even pasting the same code in Proto2,
but it just doesn't work. Please help me out! 

Here is what I am doing:

if(check_col(pinfo->cinfo, COL_PROTOCOL))
 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PROTO2");

Also, I have tried col_clear, col_add_str and col_append_str and none of
these work for PROTO2, while they all work perfectly for proto1! 

Thanks and Best Regards,
Sahil




 

-----Original Message-----
From: Gilbert Ramirez [mailto:gilbertr@xxxxxxxxx] 
Sent: Wednesday, June 15, 2005 11:03 AM
To: Sahil Kumar
Subject: Re: [Ethereal-dev] Help With Plug-in Dissector

Does the PROTO1 dissector call dissector_try_port()? That's needed for
the next registered protocol dissector to be called.

--gilbert

On 6/15/05, Sahil Kumar <Sahil.Kumar@xxxxxxxxxxx> wrote:
> Hi Gilbert,
> 
> I had another quick question. I am trying to register one of my 
> protocols over a protocol that I had built. I am not sure how to do 
> this. I have tried to do it the same way as
> 
>     PROTO2_handle = find_dissector("PROTO2");
>     dissector_add("PROTO1", PROTO1_PROTO2, PROTO1_handle);
> 
> And I defined the value of PROTO1_PROTO2 as the required hex. value, 
> but still it is not dissecting the second protocol.
> 
> I would appreciate if you could guide me on how to associate the 
> packet type field of PROTO1 with calling PROTO2.
> 
> Thanks!
> 
> Best Regards,
> Sahil
> 
> 
> 
> -----Original Message-----
> From: ethereal-dev-bounces@xxxxxxxxxxxx 
> [mailto:ethereal-dev-bounces@xxxxxxxxxxxx] On Behalf Of Gilbert 
> Ramirez
> Sent: Thursday, June 09, 2005 3:22 PM
> To: Ethereal development
> Subject: Re: [Ethereal-dev] Help With Plug-in Dissector
> 
> Your dissector needs to register itself to the "ethertype" dissector 
> call. Look at how packet-ipx.c does it:
> 
>     ipx_handle = find_dissector("ipx");
>     dissector_add("ethertype", ETHERTYPE_IPX, ipx_handle);
> 
> In this case, ETHERTYPE_IPX is defined as 0x8137 in etypes.h in the 
> top-level directory of the Ethereal source code.
> 
> --gilbert
> 
> On 6/9/05, Sahil Kumar <Sahil.Kumar@xxxxxxxxxxx> wrote:
> >
> > Hi,
> >
> > I really need some help here. I am building a protocol that is 
> > currently seen in ethereal as  "Type: unknown (0x0606)" . I am 
> > pretty sure my plug-in dissector is almost complete and correct. The

> > issue that I am unable to figure out is why is my protocol not being

> > identified by Ethernet II. I am sure I am missing something small 
> > here. I would truly appreciate it if you could let me know where am 
> > I
> missing something out.
> > More precisely, how do I make Ethernet II know that the Type 0x0606 
> > is
> 
> > my protocol!!
> > Thanks a ton.
> >
> > Best Regards,
> > Sahil
> >

> > Ethereal-dev mailing list
> > Ethereal-dev@xxxxxxxxxxxx
> > http://www.ethereal.com/mailman/listinfo/ethereal-dev
> >
> >
> >
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
> 
> 



---------------------------------------------------------- ------
        Visit our Internet site at http://www.reuters.com

To find out more about Reuters Products and Services visit http://www.reuters.com/productinfo 

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.