Lines Matching refs:device
136 /* network device redirectors */
1249 * Allocate TAP device, returns opened fd.
1273 /* Check if IP device was opened */
1314 /* Assign ppa according to the unit number returned by tun device */
1344 syslog(LOG_ERR, "Can't link TAP device to IP");
1349 syslog (LOG_ERR, "Can't link TAP device to ARP");
1374 fprintf(stderr, "Cannot allocate TAP device\n");
2047 static int net_dump_init(Monitor *mon, VLANState *vlan, const char *device,
2078 s->pcap_vc = qemu_new_vlan_client(vlan, device, name, NULL, dump_receive, NULL,
2147 int net_client_init(Monitor *mon, const char *device, const char *p)
2166 if (!strcmp(device, "nic")) {
2211 if (!strcmp(device, "none")) {
2222 if (!strcmp(device, "user")) {
2244 ret = net_slirp_init(vlan, device, name, restricted, ip);
2246 } else if (!strcmp(device, "channel")) {
2262 config_error(mon, "could not open vmchannel device '%s'\n",
2275 if (!strcmp(device, "tap")) {
2292 ret = tap_win32_init(vlan, device, name, ifname);
2296 if (!strcmp(device, "tap")) {
2309 net_tap_fd_init(vlan, device, name, fd);
2329 ret = net_tap_init(vlan, device, name, ifname, setup_script, down_script);
2333 if (!strcmp(device, "socket")) {
2344 if (net_socket_fd_init(vlan, device, name, fd, 1))
2355 ret = net_socket_listen_init(vlan, device, name, buf);
2365 ret = net_socket_connect_init(vlan, device, name, buf);
2375 ret = net_socket_mcast_init(vlan, device, name, buf);
2384 if (!strcmp(device, "vde")) {
2413 ret = net_vde_init(vlan, device, name, vde_sock, vde_port, vde_group, vde_mode);
2416 if (!strcmp(device, "dump")) {
2425 ret = net_dump_init(mon, vlan, device, name, buf, len);
2427 config_error(mon, "Unknown network device: %s\n", device);
2432 config_error(mon, "Could not initialize device '%s'\n", device);
2447 static int net_host_check_device(const char *device)
2459 if (!strncmp(valid_param_list[i], device,
2467 void net_host_device_add(Monitor *mon, const char *device, const char *opts)
2469 if (!net_host_check_device(device)) {
2470 monitor_printf(mon, "invalid host network device %s\n", device);
2473 if (net_client_init(mon, device, opts ? opts : "") < 0) {
2474 monitor_printf(mon, "adding host network device %s failed\n", device);
2478 void net_host_device_remove(Monitor *mon, int vlan_id, const char *device)
2486 if (!strcmp(vc->name, device)) {
2492 monitor_printf(mon, "can't find device %s\n", device);
2496 monitor_printf(mon, "invalid host network device %s\n", device);
2506 char device[64];
2509 q = device;
2511 if ((q - device) < sizeof(device) - 1)
2519 return net_client_init(NULL, device, p);
2546 monitor_printf(mon, "could not find network device '%s'", name);