return hub;
}
-static int net_hub_port_can_receive(NetClientState *nc)
+static bool net_hub_port_can_receive(NetClientState *nc)
{
NetHubPort *port;
NetHubPort *src_port = DO_UPCAST(NetHubPort, nc, nc);
}
if (qemu_can_send_packet(&port->nc)) {
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
static ssize_t net_hub_port_receive(NetClientState *nc,
assert(!peer);
hubport = &netdev->u.hubport;
- if (hubport->has_netdev) {
+ if (hubport->netdev) {
hubpeer = qemu_find_netdev(hubport->netdev);
if (!hubpeer) {
error_setg(errp, "netdev '%s' not found", hubport->netdev);
case NET_CLIENT_DRIVER_USER:
case NET_CLIENT_DRIVER_TAP:
case NET_CLIENT_DRIVER_SOCKET:
+ case NET_CLIENT_DRIVER_STREAM:
+ case NET_CLIENT_DRIVER_DGRAM:
case NET_CLIENT_DRIVER_VDE:
case NET_CLIENT_DRIVER_VHOST_USER:
has_host_dev = 1;