make send_packet encode packet
suppress a warning