+static int net_hub_port_can_receive(NetClientState *nc)
+{
+ NetHubPort *port;
+ NetHubPort *src_port = DO_UPCAST(NetHubPort, nc, nc);
+ NetHub *hub = src_port->hub;
+
+ QLIST_FOREACH(port, &hub->ports, next) {
+ if (port == src_port) {
+ continue;
+ }
+
+ if (qemu_can_send_packet(&port->nc)) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+static ssize_t net_hub_port_receive(NetClientState *nc,