Lines Matching refs:peer

265                                   NetClientState *peer,  in qemu_net_client_setup()  argument
279 if (peer) { in qemu_net_client_setup()
280 assert(!peer->peer); in qemu_net_client_setup()
281 nc->peer = peer; in qemu_net_client_setup()
282 peer->peer = nc; in qemu_net_client_setup()
293 NetClientState *peer, in qemu_new_net_client() argument
302 qemu_net_client_setup(nc, info, peer, model, name, in qemu_new_net_client()
309 NetClientState *peer, in qemu_new_net_control_client() argument
318 qemu_net_client_setup(nc, info, peer, model, name, in qemu_new_net_control_client()
381 return ncs->peer; in qemu_get_peer()
398 if (nc->peer) { in qemu_free_net_client()
399 nc->peer->peer = NULL; in qemu_free_net_client()
429 if (nc->peer && nc->peer->info->type == NET_CLIENT_DRIVER_NIC) { in qemu_del_net_client()
430 NICState *nic = qemu_get_nic(nc->peer); in qemu_del_net_client()
437 ncs[i]->peer->link_down = true; in qemu_del_net_client()
440 if (nc->peer->info->link_status_changed) { in qemu_del_net_client()
441 nc->peer->info->link_status_changed(nc->peer); in qemu_del_net_client()
467 qemu_free_net_client(nc->peer); in qemu_del_nic()
468 } else if (nc->peer) { in qemu_del_nic()
470 qemu_purge_queued_packets(nc->peer); in qemu_del_nic()
607 if (!sender->peer) { in qemu_can_send_packet()
611 return qemu_can_receive_packet(sender->peer); in qemu_can_send_packet()
664 if (!nc->peer) { in qemu_purge_queued_packets()
668 qemu_net_queue_purge(nc->peer->incoming_queue, nc); in qemu_purge_queued_packets()
675 if (nc->peer && nc->peer->info->type == NET_CLIENT_DRIVER_HUBPORT) { in qemu_flush_or_purge_queued_packets()
676 if (net_hub_flush(nc->peer)) { in qemu_flush_or_purge_queued_packets()
687 qemu_net_queue_purge(nc->incoming_queue, nc->peer); in qemu_flush_or_purge_queued_packets()
709 if (sender->link_down || !sender->peer) { in qemu_send_packet_async_with_flags()
720 ret = filter_receive(sender->peer, NET_FILTER_DIRECTION_RX, in qemu_send_packet_async_with_flags()
726 queue = sender->peer->incoming_queue; in qemu_send_packet_async_with_flags()
862 if (sender->link_down || !sender->peer) { in qemu_sendv_packet_async()
873 ret = filter_receive_iov(sender->peer, NET_FILTER_DIRECTION_RX, sender, in qemu_sendv_packet_async()
879 queue = sender->peer->incoming_queue; in qemu_sendv_packet_async()
973 NetClientState *peer, Error **errp) in net_init_nic() argument
999 assert(peer); in net_init_nic()
1000 nd->netdev = peer; in net_init_nic()
1244 NetClientState *peer, Error **errp) = {
1285 NetClientState *peer = NULL; in net_client_init1() local
1314 peer = net_hub_add_port(0, NULL, NULL); in net_client_init1()
1324 if (net_client_init_fun[netdev->type](netdev, netdev->id, peer, errp) < 0) { in net_client_init1()
1624 if (nc->peer) { in qmp_set_link()
1633 if (nc->peer->info->type == NET_CLIENT_DRIVER_NIC) { in qmp_set_link()
1635 ncs[i]->peer->link_down = !up; in qmp_set_link()
1638 if (nc->peer->info->link_status_changed) { in qmp_set_link()
1639 nc->peer->info->link_status_changed(nc->peer); in qmp_set_link()
1653 if (nc->peer && qemu_can_send_packet(nc)) { in net_vm_change_state_handler()
1654 qemu_flush_queued_packets(nc->peer); in net_vm_change_state_handler()
1715 if (!nc->peer) { in net_check_clients()