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

Wireshark-dev: Re: [Wireshark-dev] Problems to fill COL_INFO in a new dissector

From: "Anders Broman" <anders.broman@xxxxxxxxxxxx>
Date: Fri, 13 Feb 2009 14:11:30 +0100
Hi,
I'm still not sure what you are trying to do but here's a code snippet
from the GSM MAP dissector:

This is the genertaed code:
--------- Snip ------
static int
dissect_gsm_old_GSMMAPOperationLocalvalue(gboolean implicit_tag _U_,
tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree
*tree _U_, int hf_index _U_) {
#line 151 "gsmmap.cnf"

  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset,
hf_index,
                                                &opcode);
 
  if (check_col(actx->pinfo->cinfo, COL_INFO)){
    col_append_str(actx->pinfo->cinfo, COL_INFO,
gsm_map_opr_code(opcode));
    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " ");
  }



  return offset;
}
--------- Snip ------
And the corresponding stuff in .cnf
#.FN_PARS  GSMMAPOperationLocalvalue

  VAL_PTR = &opcode

#.FN_BODY  GSMMAPOperationLocalvalue

%(DEFAULT_BODY)s 
  if (check_col(actx->pinfo->cinfo, COL_INFO)){
    col_append_str(actx->pinfo->cinfo, COL_INFO,
gsm_map_opr_code(opcode));
    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " ");
  }

Regards
Anders
 

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of
xourciere.ext@xxxxxxxxxxxxxxxxxx
Sent: den 13 februari 2009 11:27
To: wireshark-dev@xxxxxxxxxxxxx
Subject: [Wireshark-dev] Problems to fill COL_INFO in a new dissector

Hi Anders,

I am not familiar with the CNF file, I used an almost empty one during
my tests but I will try to have a deeper look at the advanced conf.

In the meantime I think that I can get the info I need directly from the
generated "tree" filled by the dissector.

So is there some predefined funcs to read the tree items ?

Regards,
Xavier.
________________________________________________________________________
___
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe