@@ -1095,66 +1095,6 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
return -1;
}
-static int net_host_check_device(const char *device)
-{
- int i;
- const char *valid_param_list[] = { "tap", "socket", "dump"
-#ifdef CONFIG_SLIRP
- ,"user"
-#endif
-#ifdef CONFIG_VDE
- ,"vde"
-#endif
- };
- for (i = 0; i < sizeof(valid_param_list) / sizeof(char *); i++) {
- if (!strncmp(valid_param_list[i], device,
- strlen(valid_param_list[i])))
- return 1;
- }
-
- return 0;
-}
-
-void net_host_device_add(Monitor *mon, const QDict *qdict)
-{
- const char *device = qdict_get_str(qdict, "device");
- const char *opts_str = qdict_get_try_str(qdict, "opts");
- QemuOpts *opts;
-
- if (!net_host_check_device(device)) {
- monitor_printf(mon, "invalid host network device %s\n", device);
- return;
- }
-
- opts = qemu_opts_parse(&qemu_net_opts, opts_str ? opts_str : "", 0);
- if (!opts) {
- return;
- }
-
- qemu_opt_set(opts, "type", device);
-
- if (net_client_init(mon, opts, 0) < 0) {
- monitor_printf(mon, "adding host network device %s failed\n", device);
- }
-}
-
-void net_host_device_remove(Monitor *mon, const QDict *qdict)
-{
- VLANClientState *vc;
- int vlan_id = qdict_get_int(qdict, "vlan_id");
- const char *device = qdict_get_str(qdict, "device");
-
- vc = qemu_find_vlan_client_by_name(mon, vlan_id, device);
- if (!vc) {
- return;
- }
- if (!net_host_check_device(vc->model)) {
- monitor_printf(mon, "invalid host network device %s\n", device);
- return;
- }
- qemu_del_vlan_client(vc);
-}
-
int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
QemuOpts *opts;
@@ -161,8 +161,6 @@ int net_client_parse(QemuOptsList *opts_list, const char *str);
int net_init_clients(void);
void net_check_clients(void);
void net_cleanup(void);
-void net_host_device_add(Monitor *mon, const QDict *qdict);
-void net_host_device_remove(Monitor *mon, const QDict *qdict);
int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data);
int do_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
@@ -1154,34 +1154,6 @@ Hot remove PCI device.
ETEXI
{
- .name = "host_net_add",
- .args_type = "device:s,opts:s?",
- .params = "tap|user|socket|vde|dump [options]",
- .help = "add host VLAN client",
- .mhandler.cmd = net_host_device_add,
- },
-
-STEXI
-@item host_net_add
-@findex host_net_add
-Add host VLAN client.
-ETEXI
-
- {
- .name = "host_net_remove",
- .args_type = "vlan_id:i,device:s",
- .params = "vlan_id name",
- .help = "remove host VLAN client",
- .mhandler.cmd = net_host_device_remove,
- },
-
-STEXI
-@item host_net_remove
-@findex host_net_remove
-Remove host VLAN client.
-ETEXI
-
- {
.name = "netdev_add",
.args_type = "netdev:O",
.params = "[user|tap|socket],id=str[,prop=value][,...]",