mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
net: add qemu_purge_queued_packets()
If net client sends packets asynchronously, it needs to purge its queued packets in cleanup() so as to prevent sent callbacks being invoked with a freed client. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
08b9d66b96
commit
8cad55161c
2 changed files with 17 additions and 0 deletions
1
net.h
1
net.h
|
@ -70,6 +70,7 @@ ssize_t qemu_sendv_packet_async(VLANClientState *vc, const struct iovec *iov,
|
|||
void qemu_send_packet(VLANClientState *vc, const uint8_t *buf, int size);
|
||||
ssize_t qemu_send_packet_async(VLANClientState *vc, const uint8_t *buf,
|
||||
int size, NetPacketSent *sent_cb);
|
||||
void qemu_purge_queued_packets(VLANClientState *vc);
|
||||
void qemu_flush_queued_packets(VLANClientState *vc);
|
||||
void qemu_format_nic_info_str(VLANClientState *vc, uint8_t macaddr[6]);
|
||||
void qemu_check_nic_model(NICInfo *nd, const char *model);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue