Wireshark-dev: Re: [Wireshark-dev] Structure sizes change between Linux and Windowshelp
From: Jaap Keuter <[email protected]>
Date: Fri, 29 Jul 2011 13:17:25 +0200
Please note that this still doesn't get your dissector into the repository,
if that was ever the intention.


On Fri, 29 Jul 2011 11:27:05 +0200, news.gmane.com wrote:

Even if you shouldn't use structs as you can read in README.developer
provides the tools:

#ifndef GNUC
#pragma pack(push)
#pragma pack(1)

struct foo {
char x;
int y;
#ifdef GNUC

struct bar {
char a;
long b;
#ifdef GNUC

#ifndef GNUC
#pragma pack(pop)

It looks as it is: ugly.
Please note that the #ifdef GNU probably needs to be changed, I don't
the correct symbol to check for.

"Alex Lindberg" wrote in
news:[email protected]
I am creating a dissector that overlays a complicated struct (bit
unions, etc) on the the tvb. My Linux version works as designed, however
when I move it to Windows (win32) the size of the struct changes and
won't overlay the tvb properly.

I am not an expert with Windows, but is there a compiler flag that will
cause CC and/or LINK to work the same as GCC?

Thanks for your help.

Alex Lindberg