read packet type