Ethereal-dev: Re: [Ethereal-dev] BACnet packet-bacapp corrections

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

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Sat, 15 Apr 2006 21:13:51 +0200 (CEST)
Hi,

Doesn't this snippet

-       switch (lvt) {
 .....
-               case 8:
-                       *val = tvb_get_ntoh64(tvb, offset);
-                       break;
+       if (lvt < 8) {

show that you no longer handle the lvt == 8 case?

Thanx,
Jaap

On Sat, 15 Apr 2006, Steve Karg wrote:

> Hi Developers!
>
> This patch corrects:
>
> 1) BACnet signed values were being decoded incorrectly for negative
> values since BACnet tries to be clever and minimizes the number of bytes
> sent on the wire and drops the leading FF on negative values.  For
> example, -200 is passed as FF 38 on the wire, but would display as 65336.
>
> 2) Since the BACnet unsigned values were decoded using a 64-bit entity,
> I changed the decoding such that allows all 8 bytes to be decoded.  The
> function can now decode 5, 6, and 7 byte values.
>
> 3) Corrected warning about signed/unsigned in a pointer parameter.
>
> Best Regards,
>
> Steve
>