Invalid type is used in combination with is_ushort, this can result in problems on big endian systems.
In newer version if port is not initialized this can cause port to contain garbage value.
Port is integer.
Port is unsigned short
Both places are unsigned short.