Data alignment is the simple answer.
A char is a single byte, so it can be aligned on an odd or an even byte boundary - the address of the character can be odd or even.
Generally speaking any datatype which is not byte long needs to be aligned on an even address (or longer depending on the compiler and options).
So when your structure contains:
unsigned short operation;
unsigned char Sender_MAC[6];
unsigned long int src_addr;
unsigned char Receiver_MAC[6];
unsigned long int dst_addr;
then at the very least extra bytes will be added to "pad" the addressing out to a suitable address for the
long
values - probably a 4 byte address, which will require 2 extra bytes for each (since the earlier data does not "end" in the right place.
If you need to exactly match an external structure, then use the
pack[
^] pragma to override the default behaviour.