Wireshark-dev: Re: [Wireshark-dev] packet-ieee802154.c compilation error
From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Wed, 03 Sep 2008 07:58:19 +0200
Hi Chris,

That is what ended up working. So, thank you.
Took the opportunity to fix the fcs_ok hiding as well, which was a problem in itself.

Thanx,
Jaap

Maynard, Chris wrote:
I suppose as a last resort you could also try:

else {
    guint16 tmp = ieee802154_crc_tvb(tvb, tvb_reported_length(tvb)-IEEE802154_FCS_LEN);
            fcs_ok = (fcs == tmp);
}

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-
bounces@xxxxxxxxxxxxx] On Behalf Of Maynard, Chris
Sent: Tuesday, September 02, 2008 7:01 PM
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] packet-ieee802154.c compilation error

Hmm, how about
#define IEEE802154_CRC_XOROUT   0x0000FFFFUL

Then cast away any warnings you might get.  That *should* prevent the
compiler from turning the xor operation into a 1's complement operation,
and hopefully get rid of the warning.

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-
bounces@xxxxxxxxxxxxx] On Behalf Of Jaap Keuter
Sent: Tuesday, September 02, 2008 6:35 PM
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] packet-ieee802154.c compilation error

Hi Didier,

Tried it just now, but sorry, still the same error.

Thanx,
Jaap

didier wrote:
Le mardi 02 septembre 2008 à 17:28 -0400, Maynard, Chris a écrit :
What about modifying the macro itself?

#define ieee802154_crc_tvb(tvb, offset)
((guint16)(crc16_ccitt_tvb_seed(tvb, offset, IEEE802154_CRC_SEED) ^
IEEE802154_CRC_XOROUT))
Maybe
#define IEEE802154_CRC_XOROUT   0xFFFFU

Didier