これは Python での私の ctypes コードです:
class IP(Structure):
_fields_ = [
('ip_hl', c_ubyte, 4),
('ip_version', c_ubyte, 4),
('tos', c_ubyte),
('len', c_ushort),
('id', c_ushort),
('offset', c_ushort),
('ttl', c_ubyte),
('protocol_num', c_ubyte),
('sum', c_ushort),
('src', c_ulong),
('dst', c_ulong)
]
IPヘッダーで誰もが知っているように、0〜3ビットはバージョンであり、4〜7ビットはHeaderLengthですが、このコードではなぜHeaderLengthがバージョンよりも進んでいますか