Ethereal-dev: Re: [Ethereal-dev] Patch to packet-pim.c

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Sun, 25 Feb 2001 21:21:14 -0800
On Mon, Feb 26, 2001 at 05:22:28PM +1200, Simeon Pilgrim wrote:
> He is a patch so the pim bootstrap massage is displayed correctly.
> The old code should byte 3(reserved 0) instead of byte 2 for the 
> priority. 
> 
> the patch is to packet-pim.c
> 486,487c486,487
> < 		    proto_tree_add_text(grouptree, NullTVB, offset + 3, 1,
> < 			"Priority: %u", pd[offset + 3]);
> ---
> > 		    proto_tree_add_text(grouptree, NullTVB, offset + 2, 1,
> > 			"Priority: %u", pd[offset + 2]);

That's fixed in the current CVS version, as a side-effect of the way in
which I tvbuffified that dissector - the code now does:

		    holdtime = tvb_get_ntohs(tvb, offset);
		    proto_tree_add_text(grouptree, tvb, offset, 2,
			"Holdtime: %u%s", holdtime,
			holdtime == 0xffff ? " (infty)" : "");
		    offset += 2;
		    proto_tree_add_text(grouptree, tvb, offset, 1,
			"Priority: %u", tvb_get_guint8(tvb, offset));
		    offset += 2;	/* also skips reserved field */