]> git.proxmox.com Git - qemu.git/blobdiff - net/hub.c
hw/i386/Makefile.obj: use $(PYTHON) to run .py scripts consistently
[qemu.git] / net / hub.c
index a24c9d17f779cc47a9cffc1118e02cfaada4f634..33a99c99ef1eac9baf5f0f6d65f62d62bcff5c5b 100644 (file)
--- a/net/hub.c
+++ b/net/hub.c
@@ -338,3 +338,17 @@ void net_hub_check_clients(void)
         }
     }
 }
+
+bool net_hub_flush(NetClientState *nc)
+{
+    NetHubPort *port;
+    NetHubPort *source_port = DO_UPCAST(NetHubPort, nc, nc);
+    int ret = 0;
+
+    QLIST_FOREACH(port, &source_port->hub->ports, next) {
+        if (port != source_port) {
+            ret += qemu_net_queue_flush(port->nc.incoming_queue);
+        }
+    }
+    return ret ? true : false;
+}