change packet type from int to enum