public override void Parse(byte[] data, uint offset) { offset *= 8; version = BitHelper.Extract4(data, offset + 0); ihl = BitHelper.Extract4(data, offset + 4); diffserv = BitHelper.Extract8(data, offset + 8); totalLen = BitHelper.Extract16(data, offset + 16); identification = BitHelper.Extract16(data, offset + 32); flags = BitHelper.ExtractN(data, offset + 48, 3); fragOffset = BitHelper.ExtractN(data, offset + 51, 13); ttl = BitHelper.Extract8(data, offset + 64); protocol = BitHelper.Extract8(data, offset + 72); hdrChecksum = BitHelper.Extract16(data, offset + 80); srcAddr = BitHelper.Extract32(data, offset + 96); dstAddr = BitHelper.Extract32(data, offset + 128); length = 160; setValid(); }