When checking the subtypes, make sure you use the function jpacket_subtype() instead of accessing ->subtype directly, the function actually does the parsing to determine the subtype beforehand.