Lines Matching full:port

26  * A hub broadcasts incoming packets to all its ports except the source port.
51 NetHubPort *port; in net_hub_receive() local
53 QLIST_FOREACH(port, &hub->ports, next) { in net_hub_receive()
54 if (port == source_port) { in net_hub_receive()
58 qemu_send_packet(&port->nc, buf, len); in net_hub_receive()
66 NetHubPort *port; in net_hub_receive_iov() local
69 QLIST_FOREACH(port, &hub->ports, next) { in net_hub_receive_iov()
70 if (port == source_port) { in net_hub_receive_iov()
74 qemu_sendv_packet(&port->nc, iov, iovcnt); in net_hub_receive_iov()
95 NetHubPort *port; in net_hub_port_can_receive() local
99 QLIST_FOREACH(port, &hub->ports, next) { in net_hub_port_can_receive()
100 if (port == src_port) { in net_hub_port_can_receive()
104 if (qemu_can_send_packet(&port->nc)) { in net_hub_port_can_receive()
115 NetHubPort *port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_port_receive() local
117 return net_hub_receive(port->hub, port, buf, len); in net_hub_port_receive()
123 NetHubPort *port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_port_receive_iov() local
125 return net_hub_receive_iov(port->hub, port, iov, iovcnt); in net_hub_port_receive_iov()
130 NetHubPort *port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_port_cleanup() local
132 QLIST_REMOVE(port, next); in net_hub_port_cleanup()
148 NetHubPort *port; in net_hub_port_new() local
159 port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_port_new()
160 port->id = id; in net_hub_port_new()
161 port->hub = hub; in net_hub_port_new()
163 QLIST_INSERT_HEAD(&hub->ports, port, next); in net_hub_port_new()
165 return port; in net_hub_port_new()
169 * Create a port on a given hub
180 NetHubPort *port; in net_hub_add_port() local
192 port = net_hub_port_new(hub, name, hubpeer); in net_hub_add_port()
193 return &port->nc; in net_hub_add_port()
202 NetHubPort *port; in net_hub_info() local
206 QLIST_FOREACH(port, &hub->ports, next) { in net_hub_info()
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()
225 NetHubPort *port; in net_hub_id_for_client() local
228 port = DO_UPCAST(NetHubPort, nc, nc); in net_hub_id_for_client()
231 port = DO_UPCAST(NetHubPort, nc, nc->peer); in net_hub_id_for_client()
237 *id = port->hub->id; in net_hub_id_for_client()
271 NetHubPort *port; in net_hub_check_clients() local
277 QLIST_FOREACH(port, &hub->ports, next) { in net_hub_check_clients()
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()
312 NetHubPort *port; in net_hub_flush() local
316 QLIST_FOREACH(port, &source_port->hub->ports, next) { in net_hub_flush()
317 if (port != source_port) { in net_hub_flush()
318 ret += qemu_net_queue_flush(port->nc.incoming_queue); in net_hub_flush()