Ethereal-dev: [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: Sahil Kumar <Sahil.Kumar@xxxxxxxxxxx>
Date: Tue, 21 Jun 2005 10:44:58 -0500
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.