added callback function to packet_headergenerator