Finished parsePacket function of PacketHeader class