aboutsummaryrefslogtreecommitdiffstats
path: root/net.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-21 19:56:41 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-21 19:56:41 +0000
commit764a4d1deb9304918f3b09b5da6f63fa3a6b4d86 (patch)
tree49ae329805a4441b2b13dbdc1a1319137fd302f7 /net.h
parenta66b11bfcd1b04c1c8420c6afc4b63f32ef27127 (diff)
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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7203 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'net.h')
-rw-r--r--net.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/net.h b/net.h
index 413f7054b..fe5ece7c0 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);