Thread (2 messages) 2 messages, 2 authors, 2003-10-30

Re: [Ethereal-dev] Re: [Bluez-devel] bluetooth ethereal dissector

flat view

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2003-10-30 12:49:23

Hi Guy,
quoted
Attached is another patch against CVS, which re-introduces the byte
swapping,
I've checked in a change to replace g_ntohs with GUINT16_FROM_LE and to
replace g_ntohl with GUINT32_FROM_LE.
works fine now on my x86 machine.
quoted
I also use the macro _U_ for __attribute((packed))__
The macro _U_ is defined as __attribute__((unused)), not
__attribute((packed))__.
I am feeling so stupid :(
If __attribute((packed))__ is *required* in order to make it work, then
you need to find some *other* way to make it work - conditionally using
__attribute((packed))__ or not depending on whether GCC is being used or
not won't help.  For example, define the structure as an array of bytes,
or as a sequence of arrays of bytes, and use the "pletoh" macros to
extract values from them.
It works for me now and until anyone shows us otherwise, lets leave it
out.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help