Wireshark-dev: Re: [Wireshark-dev] Help adding detail to an ASN based dissector

From: "Anders Broman" <a.broman@xxxxxxxxx>
Date: Sat, 21 Feb 2009 17:50:54 +0100

Hi,

Try:

#.TYPE_ATTR

fooIndex  TYPE = FT_UINT8  DISPLAY = BASE_DEC  STRINGS = VALS(fooIndex)

 

Regards

Anders


Från: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Alex Lindberg
Skickat: den 21 februari 2009 17:06
Till: wireshark-dev@xxxxxxxxxxxxx
Ämne: [Wireshark-dev] Help adding detail to an ASN based dissector

 

I have created an ASN1 dissector that does not require any detail in the protocol.cnf file, however there are several nodes in the ASN file that report integer values that represent actions not detailed.

How do I modify the protocol.cnf file to include these arrays that would permit the dissector to report the action instead of the integer?

Perhaps an example would help:

Here is a snippet from the protocol.asn file:

FooInfo ::= SEQUENCE
{
    fooIndex    INTEGER (0..63)
}


A value_string array for fooIndex might be:


static const value_string fooIndex[] = {
 { 0x00, "First Value"},
 { 0x01, "Second Value"},
 etc ...
}


My question is how should the protocol.cnf file be modified to include the value_string array?

Thanks for your help.

Alex Lindberg
alindber@xxxxxxxxx