Hi: I defined the following structure:
struct ethernet_hdr { char destination[6]; char source[6]; unsigned short protocol; };
Sounds like it, yes. Compilers are allowed to pad structures for alignment. I don't use the Keil ARM tools, but typically an embedded compiler will support a pragma or option of some sort to declare a structure as "packed", without any padding. The GCC version is "-fpack-struct".
"typically an embedded compiler will support a pragma or option of some sort to declare a structure as 'packed'" In fact, I think just about any compiler will support this - Borland C++ Builder certainly does, and I think MSVC does too. There's no avoiding it, though - your're going to have to read the Manual to find out for sure!!