This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sizeof return in a structure

Hi:

I defined the following structure:

struct ethernet_hdr {
  char destination[6];
  char source[6];
  unsigned short protocol;
};

consisting on 14 bytes. When I use
sizeof(struct ethernet_hdr) I get 16 bytes and not 14.
This would be a memory alignment problem?

Thanks;
Gus

0