Wireshark-dev: Re: [Wireshark-dev] Help with dissector_add and h248 protocol
From: "Anders Broman" <a.broman@xxxxxxxxx>
Date: Wed, 8 Jul 2009 20:07:41 +0200

Hi,

Take a look at packet-h248-annex_c.c(and friends) (It’s binary H248 right?), you need to do

h248_register_package(&h248_annexc_package); where h248_annexc_package is a h248_package_t

It’s been a while so I don’t quite remember all the pitfalls J

Regards

Anders

 


Från: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Alex Lindberg
Skickat: den 8 juli 2009 18:26
Till: wireshark-dev@xxxxxxxxxxxxx
Ämne: [Wireshark-dev] Help with dissector_add and h248 protocol

 

I am creating a plugin that is intended to decode custom h248 packages.

I would like to register my protocol to h248.propertyName, but the "dissector_add" function continues abort with "assertion failed" messages in protocol.c, line 709.  My intent is register all of my custom package IDs to this field

I looking at the back trace, in packet.c, link 707 thefunction "find_dissector_table(name)" where name==h248.propertyName, returns Zero.  Hence the error is created on packet.c, line 709 where the sanity check is called.

I have listed the registered fields (tshark -G) looking for a field name that would work but I have and no success.

Here is the code in my plugin that fails:

for ( i = 0; package_name_ext_vals[i].strptr!=NULL; i++ )
{
  dissector_add("h248.<Field>", \ /* tried many field values */
    package_name_ext_vals[i].value,\
    h248ext_handle);
}


The value_string array "package_name_ext_vals[]" lists all of the custom packageIDs and their names that I would like to decode.

I would prefer to create a plugin and not modify the current h248 code base.

Thanks as always for your help.

Alex Lindberg