How to know packet-type when using perl script