packet: packet parsing stuff unified