Home | History | Annotate | Download | only in qemu

Lines Matching defs:vlan

348     VLANState *vlan;
352 for (vlan = first_vlan; vlan; vlan = vlan->next) {
355 for (vc = vlan->first_client; vc; vc = vc->next)
365 VLANClientState *qemu_new_vlan_client(VLANState *vlan,
386 vc->vlan = vlan;
389 pvc = &vlan->first_client;
398 VLANClientState **pvc = &vc->vlan->first_client;
414 VLANClientState *qemu_find_vlan_client(VLANState *vlan, void *opaque)
416 VLANClientState **pvc = &vlan->first_client;
429 VLANState *vlan = sender->vlan;
432 for (vc = vlan->first_client; vc != NULL; vc = vc->next) {
451 sender->vlan->delivering = 1;
453 for (vc = sender->vlan->first_client; vc != NULL; vc = vc->next) {
470 sender->vlan->delivering = 0;
479 while ((packet = vc->vlan->send_queue) != NULL) {
482 vc->vlan->send_queue = packet->next;
486 packet->next = vc->vlan->send_queue;
487 vc->vlan->send_queue = packet;
505 packet->next = sender->vlan->send_queue;
510 sender->vlan->send_queue = packet;
524 printf("vlan %d send:\n", sender->vlan->id);
528 if (sender->vlan->delivering) {
583 sender->vlan->delivering = 1;
585 for (vc = sender->vlan->first_client; vc != NULL; vc = vc->next) {
606 sender->vlan->delivering = 0;
622 packet->next = sender->vlan->send_queue;
634 sender->vlan->send_queue = packet;
649 if (sender->vlan->delivering) {
838 static int net_slirp_init(VLANState *vlan, const char *model, const char *name,
864 slirp_vc = qemu_new_vlan_client(vlan, model, name, NULL, slirp_receive,
1253 static TAPState *net_tap_fd_init(VLANState *vlan,
1262 s->vc = qemu_new_vlan_client(vlan, model, name, NULL, tap_receive,
1503 static int net_tap_init(VLANState *vlan, const char *model,
1525 s = net_tap_fd_init(vlan, model, name, fd);
1576 static int net_vde_init(VLANState *vlan, const char *model,
1596 s->vc = qemu_new_vlan_client(vlan, model, name, NULL, vde_receive,
1617 VLANState *vlan;
1781 static NetSocketState *net_socket_fd_init_dgram(VLANState *vlan,
1824 s->vc = qemu_new_vlan_client(vlan, model, name, NULL, net_socket_receive_dgram,
1844 static NetSocketState *net_socket_fd_init_stream(VLANState *vlan,
1852 s->vc = qemu_new_vlan_client(vlan, model, name, NULL, net_socket_receive,
1864 static NetSocketState *net_socket_fd_init(VLANState *vlan,
1872 return net_socket_fd_init_dgram(vlan, model, name, fd, is_connected);
1874 return net_socket_fd_init_stream(vlan, model, name, fd, is_connected);
1878 return net_socket_fd_init_stream(vlan, model, name, fd, is_connected);
1898 s1 = net_socket_fd_init(s->vlan, s->model, s->name, fd, 1);
1907 static int net_socket_listen_init(VLANState *vlan,
1941 s->vlan = vlan;
1949 static int net_socket_connect_init(VLANState *vlan,
1986 s = net_socket_fd_init(vlan, model, name, fd, connected);
1995 static int net_socket_mcast_init(VLANState *vlan,
2012 s = net_socket_fd_init(vlan, model, name, fd, 0);
2089 static int net_dump_init(Monitor *mon, VLANState *vlan, const char *device,
2120 s->pcap_vc = qemu_new_vlan_client(vlan, device, name, NULL, dump_receive, NULL,
2127 /* find or alloc a new VLAN */
2130 VLANState **pvlan, *vlan;
2131 for(vlan = first_vlan; vlan != NULL; vlan = vlan->next) {
2132 if (vlan->id == id)
2133 return vlan;
2135 vlan = qemu_mallocz(sizeof(VLANState));
2136 vlan->id = id;
2137 vlan->next = NULL;
2141 *pvlan = vlan;
2142 return vlan;
2192 "vlan", "name", "fd", NULL
2196 VLANState *vlan;
2200 if (get_param_value(buf, sizeof(buf), "vlan", p)) {
2203 vlan = qemu_find_vlan(vlan_id);
2210 "vlan", "name", "macaddr", "model", NULL
2245 nd->vlan = vlan;
2250 vlan->nb_guest_devs++;
2266 "vlan", "name", "hostname", "restrict", "ip", NULL
2285 vlan->nb_host_devs++;
2286 ret = net_slirp_init(vlan, device, name, restricted, ip);
2319 "vlan", "name", "ifname", NULL
2333 vlan->nb_host_devs++;
2334 ret = tap_win32_init(vlan, device, name, ifname);
2342 vlan->nb_host_devs++;
2351 net_tap_fd_init(vlan, device, name, fd);
2355 "vlan", "name", "ifname", "script", "downscript", NULL
2371 ret = net_tap_init(vlan, device, name, ifname, setup_script, down_script);
2386 if (net_socket_fd_init(vlan, device, name, fd, 1))
2390 "vlan", "name", "listen", NULL
2397 ret = net_socket_listen_init(vlan, device, name, buf);
2400 "vlan", "name", "connect", NULL
2407 ret = net_socket_connect_init(vlan, device, name, buf);
2410 "vlan", "name", "mcast", NULL
2417 ret = net_socket_mcast_init(vlan, device, name, buf);
2423 vlan->nb_host_devs++;
2428 "vlan", "name", "sock", "port", "group", "mode", NULL
2438 vlan->nb_host_devs++;
2455 ret = net_vde_init(vlan, device, name, vde_sock, vde_port, vde_group, vde_mode);
2465 snprintf(buf, sizeof(buf), "qemu-vlan%d.pcap", vlan_id);
2467 ret = net_dump_init(mon, vlan, device, name, buf, len);
2483 nd->vlan->nb_guest_devs--;
2522 VLANState *vlan;
2525 vlan = qemu_find_vlan(vlan_id);
2527 for (vc = vlan->first_client; vc != NULL; vc = vc->next) {
2566 VLANState *vlan;
2569 for(vlan = first_vlan; vlan != NULL; vlan = vlan->next) {
2570 monitor_printf(mon, "VLAN %d devices:\n", vlan->id);
2571 for(vc = vlan->first_client; vc != NULL; vc = vc->next)
2578 VLANState *vlan;
2581 for (vlan = first_vlan; vlan != NULL; vlan = vlan->next)
2582 for (vc = vlan->first_client; vc != NULL; vc = vc->next)
2608 VLANState *vlan;
2611 for(vlan = first_vlan; vlan != NULL; vlan = vlan->next) {
2612 VLANClientState *vc = vlan->first_client;
2626 VLANState *vlan;
2628 for(vlan = first_vlan; vlan != NULL; vlan = vlan->next) {
2629 if (vlan->nb_guest_devs == 0 && vlan->nb_host_devs == 0)
2631 if (vlan->nb_guest_devs == 0)
2632 fprintf(stderr, "Warning: vlan %d with no nics\n", vlan->id);
2633 if (vlan->nb_host_devs == 0)
2635 "Warning: vlan %d is not connected to host network\n",
2636 vlan->id);