ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Help with tree

From: Carlos G Mendioroz <tron@xxxxxxx>
Date: Thu, 22 Jan 2009 09:22:38 -0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I could use some help here :)
I'm using a couple of functions from rtp_analysis that seemed to be
protocol independent, but somehow are not working.

This is used in the selection of an RTP stream, the selected packet
is dissected and then:

/* check if it is RTP Version 2 */
if (!get_int_value_from_proto_tree(edt->tree, "rtp", "rtp.version",
&version_fwd) || version_fwd != 2) {
        simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
             "RTP Version != 2 isn't supported!");
        return;
}

I'm trying to use the same code to check the type of IAX2 packet (after
selecting and dissecting it) but it's not working.
I've changed it to:

/* check if it is Voice or MiniPacket */
if (!get_int_value_from_proto_tree(edt->tree, "iax2", 	
"iax2.packet_type", &ptype)) {
       simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
            "Please select a VOICE packet!");
       return;
}

And this returns false (I'm just testing that I can get the info, which
I can't). I've verified that proto name, hf name and tree references
are ok (not null references) but I'm lost at the process_node() function.

Would someone kindly help me debug this ?

- --
Carlos G Mendioroz  <tron@xxxxxxx>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl4Vv4ACgkQ7qM4U9dTH3+C3QCfeVTu9rC+Nnnbshc3S+Gwubfh
eY0AoKjqPTqG5k2dwqpLNbvn+XS3G9fl
=UbGL
-----END PGP SIGNATURE-----