From 764a4d1deb9304918f3b09b5da6f63fa3a6b4d86 Mon Sep 17 00:00:00 2001 From: aliguori Date: Tue, 21 Apr 2009 19:56:41 +0000 Subject: net: Untangle nested qemu_send_packet (Jan Kiszka) Queue packets that are send during an ongoing packet delivery. This ensures that packets will always arrive in their logical order at each client of a VLAN. Currently, slirp generates such immediate relies, and e.g. packet-sniffing clients on the same VLAN may get confused. Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7203 c046a42c-6fe2-441c-8c8c-71466251a162 --- net.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'net.h') diff --git a/net.h b/net.h index 413f7054b2..fe5ece7c0e 100644 --- a/net.h +++ b/net.h @@ -29,11 +29,22 @@ struct VLANClientState { char info_str[256]; }; +typedef struct VLANPacket VLANPacket; + +struct VLANPacket { + struct VLANPacket *next; + VLANClientState *sender; + int size; + uint8_t data[0]; +}; + struct VLANState { int id; VLANClientState *first_client; struct VLANState *next; unsigned int nb_guest_devs, nb_host_devs; + VLANPacket *send_queue; + int delivering; }; VLANState *qemu_find_vlan(int id); -- cgit v1.2.3