by passing the packet type as an argument rather than having a different request for each type. (from a suggestion by mrg)