tcpdump mailing list archives

Re: Missing packet fields in big endian with ath9k


From: Guy Harris <guy () alum mit edu>
Date: Sun, 28 Apr 2013 17:46:53 -0700


On Apr 28, 2013, at 4:24 PM, Guy Harris <guy () alum mit edu> wrote:

      if (IS_PRESENT(RADIOTAP_ANTENNA_SIGNAL)) {
              /* 1-bit value */
              /*
               * This is a *SIGNED* value, so it could be positive or negative.
               * If you want a value guaranteed to be positive, add 128 to it.
               */
              rssi = *p;

Oops, that should be

                rssi = *(int8_t *)p;

so that the byte is sign-extended.
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: