Ethereal-dev: Re: [Ethereal-dev] Help with COL_PROTOCOL and COL_INFO

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

From: Dominique bastien <ip6helper@xxxxxxxxx>
Date: Tue, 21 Jun 2005 13:31:40 -0400 (EDT)
make sure that your code for the columns are outside the "if (tree)".

Sahil Kumar <Sahil.Kumar@xxxxxxxxxxx> wrote:
Hi There!
I am writing again for the same problem regarding col_protocol and col_info.
I have written 2 dissectors, one on top of the other. Proto-2 is on top of proto-2 and below is the code that shows how I am calling the second dissector as well as the way I want to fill the columns. The dissectors work perfectly fine, its just the columns that are not being filled by the proto-2.
 
.
.
.
(check_col(pinfo->cinfo,COL_PROTOCOL))
       col_set_str(pinfo->cinfo, COL_PROTOCOL, "Proto-1");
 
 if(check_col(pinfo->cinfo, COL_INFO))
  col_set_str(pinfo->cinfo, COL_INFO, "Proto-1 - Info");
.
.
.
.
.
 switch (pkttype) {
 
  case 3:
 
           next_tvb = tvb_new_subset(tvb, 30, pkt_length-30, pkt_length-30);
           call_dissector(proto-2_handle, next_tvb, pinfo, tree);
           break;
  case 17:
            
           next_tvb = tvb_new_subset(tvb, 30, pkt_length-30, pkt_length-30);
           call_dissector(proto-3_handle, next_tvb, pinfo, tree);
           break;
 
  case 18:
  
           next_tvb = tvb_new_subset(tvb, 30, pkt_length-30, pkt_length-30);
           call_dissector(proto-4_handle, next_tvb, pinfo, tree);
           break;
 
  default:
           break;
  }
 
.
.
.
/* This is the code for Proto - 2, Proto-3 and Proto-4 which does not work! :-(
.
.

if(check_col(pinfo->cinfo, COL_PROTOCOL))
       col_set_str(pinfo->cinfo, COL_PROTOCOL, "Proto-2");
    if(check_col(pinfo->cinfo, COL_INFO))
  col_set_str(pinfo->cinfo, COL_INFO, "Error Packet");
.
.
( if (tree) {
.
.
 
 
Someone, please let me know what am I missing in my dissectors. I would truly appreciate the help.
Thanks!
Best Regards,
Sahil


---------------------------------------------------------- ------
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.
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com