Lines Matching full:nc
33 NetClientState nc; member
58 qemu_send_packet(&port->nc, buf, len); in net_hub_receive()
74 qemu_sendv_packet(&port->nc, iov, iovcnt); in net_hub_receive_iov()
93 static bool net_hub_port_can_receive(NetClientState *nc) in net_hub_port_can_receive() argument
96 NetHubPort *src_port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_port_can_receive()
104 if (qemu_can_send_packet(&port->nc)) { in net_hub_port_can_receive()
112 static ssize_t net_hub_port_receive(NetClientState *nc, in net_hub_port_receive() argument
115 NetHubPort *port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_port_receive()
120 static ssize_t net_hub_port_receive_iov(NetClientState *nc, in net_hub_port_receive_iov() argument
123 NetHubPort *port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_port_receive_iov()
128 static void net_hub_port_cleanup(NetClientState *nc) in net_hub_port_cleanup() argument
130 NetHubPort *port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_port_cleanup()
147 NetClientState *nc; in net_hub_port_new() local
158 nc = qemu_new_net_client(&net_hub_port_info, hubpeer, "hub", name); in net_hub_port_new()
159 port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_port_new()
193 return &port->nc; in net_hub_add_port()
207 monitor_printf(mon, " \\ %s", port->nc.name); in net_hub_info()
208 if (port->nc.peer) { in net_hub_info()
210 print_net_client(mon, port->nc.peer); in net_hub_info()
223 int net_hub_id_for_client(NetClientState *nc, int *id) in net_hub_id_for_client() argument
227 if (nc->info->type == NET_CLIENT_DRIVER_HUBPORT) { in net_hub_id_for_client()
228 port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_id_for_client()
229 } else if (nc->peer != NULL && nc->peer->info->type == in net_hub_id_for_client()
231 port = DO_UPCAST(NetHubPort, nc, nc->peer); in net_hub_id_for_client()
278 peer = port->nc.peer; in net_hub_check_clients()
280 warn_report("hub port %s has no peer", port->nc.name); in net_hub_check_clients()
310 bool net_hub_flush(NetClientState *nc) in net_hub_flush() argument
313 NetHubPort *source_port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_flush()
318 ret += qemu_net_queue_flush(port->nc.incoming_queue); in net_hub_flush()