Ethereal-dev: [ethereal-dev] tvbuff + dissector_try_port

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Frank Singleton <frank.singleton@xxxxxxxxxxxx>
Date: Mon, 12 Jun 2000 15:00:20 -0500
Hi,

What do I pass to dissector_try_port() if I am using tvbuffs.
Can I create a new sub tvbuff with sub_new_subset, and somehow
pass a ptr to that ?

<snip from dissector>
      octet1 = tvb_get_guint8(tvb,offset); /* grab next octet, new code
*/
      proto_tree_add_uint(clcoip_tree,
hf_clcoip_clmsg_li,offset,1,octet1); /* cl msg li */
      offset++;

      /* do lookup with the subdissector table, old code */

      if (dissector_try_port(clcoip_dissector_table, pi.srcport, pd,
offset, fd, tree) ||
	  dissector_try_port(clcoip_dissector_table, pi.destport, pd, offset,
fd, tree)) {
	return;			/* found one */
      }
      
      /* Oh, well, we don't know this; dissect it as data. */
      dissect_data(pd, offset, fd, tree);

<end snip>

Cheers / Frank..
-- 
EUS/GN/V/Z Frank Singleton    ASO Americas BSS
Office : +1 972 583 3251      ECN 800 33251  
Pager  : +1 800 651 1184      Email : eusfrsi@xxxxxxxxxxxxxxx 
Amateur Radio: VK3FCS/KM5WS   Email : frank.singleton@xxxxxxxxxxxx

Hardware: HP Omnibook 4150 running Redhat Linux 6.2 (2.2.14 kernel).