c: Avoid non-portable usage of bit fields

Don't use bit fields to access specific bits in the packet header. The
bit order in bit fields depends on the compiler and platform. Therefore,
bit fields cannot be used for portable bit access.

Use shifting and masking instead to access bits in the packet header.