rename packet struct and add num_expected field