Ethereal-dev: Re: [ethereal-dev] packet-icq.c ICQ dissector

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Sun, 24 Oct 1999 12:39:40 -0700
> Ok, I'll stick to this convention. I like overlaying structures better,

...although, as I noted, unless the structure contains no members whose
underlying data type is bigger than a byte (e.g., contains only
single-byte variables and arrays of same), the overlaying must be done
by "memcpy()"ing the data from the packet buffer to the structure, not
by casting a pointer into the packet buffer to a pointer to the
structure, as the code won't work on Alpha/SPARC/MIPS/most other non-x86
processors if it's done by pointer casting.