You are looking at beatpots. These definitions must be inside the structure, and they mean that iph_ihl is a 5-bit field, and iph_ver is a 4-bit field.
Your example is a bit strange, since an unsigned char will be an 8-bit type on most machines, but 9 bits are declared there.
In general, bit fields are not quite portable, so I would recommend not using them, but you can read about them here .
source share