return fd;
}
-static int net_init_nic(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+static int net_init_nic(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
int idx;
NICInfo *nd;
static int (* const net_client_init_fun[NET_CLIENT_OPTIONS_KIND_MAX])(
- QemuOpts *old_opts,
- const NetClientOptions *new_opts,
+ const NetClientOptions *opts,
const char *name,
VLANState *vlan) = {
[NET_CLIENT_OPTIONS_KIND_NIC] = net_init_nic,
};
-static int net_client_init1(const void *object, int is_netdev,
- QemuOpts *old_opts, Error **errp)
+static int net_client_init1(const void *object, int is_netdev, Error **errp)
{
union {
const Netdev *netdev;
vlan = qemu_find_vlan(u.net->has_vlan ? u.net->vlan : 0, true);
}
- if (net_client_init_fun[opts->kind](old_opts, opts, name, vlan) < 0) {
+ if (net_client_init_fun[opts->kind](opts, name, vlan) < 0) {
/* TODO push error reporting into init() methods */
error_set(errp, QERR_DEVICE_INIT_FAILED,
NetClientOptionsKind_lookup[opts->kind]);
}
if (!err) {
- ret = net_client_init1(object, is_netdev, opts, &err);
+ ret = net_client_init1(object, is_netdev, &err);
}
if (object) {
return 0;
}
-int net_init_dump(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_dump(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
int len;
const char *file;
#define QEMU_NET_DUMP_H
#include "net.h"
-#include "qemu-common.h"
#include "qapi-types.h"
-int net_init_dump(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_dump(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
#endif /* QEMU_NET_DUMP_H */
}
}
-int net_init_slirp(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_slirp(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
struct slirp_config_str *config;
char *vnet;
#ifdef CONFIG_SLIRP
-int net_init_slirp(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_slirp(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
void net_slirp_hostfwd_add(Monitor *mon, const QDict *qdict);
void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict);
return 0;
}
-int net_init_socket(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_socket(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
const NetdevSocketOptions *sock;
#define QEMU_NET_SOCKET_H
#include "net.h"
-#include "qemu-common.h"
#include "qapi-types.h"
-int net_init_socket(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_socket(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
#endif /* QEMU_NET_SOCKET_H */
return 0;
}
-int net_init_tap(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_tap(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
const NetdevTapOptions *tap;
return -1;
}
-int net_init_bridge(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_bridge(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
const NetdevBridgeOptions *bridge;
const char *helper, *br;
return fd;
}
-int net_init_tap(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_tap(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
const NetdevTapOptions *tap;
#define QEMU_NET_TAP_H
#include "qemu-common.h"
-#include "qemu-option.h"
#include "qapi-types.h"
#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
-int net_init_tap(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_tap(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required);
struct vhost_net;
struct vhost_net *tap_get_vhost_net(VLANClientState *vc);
-int net_init_bridge(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_bridge(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
#endif /* QEMU_NET_TAP_H */
return 0;
}
-int net_init_vde(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_vde(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
const NetdevVdeOptions *vde;
#define QEMU_NET_VDE_H
#include "qemu-common.h"
-#include "qemu-option.h"
#include "qapi-types.h"
#ifdef CONFIG_VDE
-int net_init_vde(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_vde(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
#endif /* CONFIG_VDE */