break out packet parsing and generation