factorize QSnifferPacket code