mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-04 20:51:28 +00:00
kvm tools: Add MACRO for user and tap mode for virtio net
This patch prepares the user and tap mode for virtio net. Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
@@ -8,8 +8,12 @@ struct virtio_net_parameters {
|
||||
const char *host_ip;
|
||||
char guest_mac[6];
|
||||
const char *script;
|
||||
int mode;
|
||||
};
|
||||
|
||||
void virtio_net__init(const struct virtio_net_parameters *params);
|
||||
|
||||
#define NET_MODE_USER 0
|
||||
#define NET_MODE_TAP 1
|
||||
|
||||
#endif /* KVM__VIRTIO_NET_H */
|
||||
|
||||
@@ -63,6 +63,9 @@ struct net_device {
|
||||
|
||||
int tap_fd;
|
||||
char tap_name[IFNAMSIZ];
|
||||
|
||||
int mode;
|
||||
|
||||
};
|
||||
|
||||
static struct net_device ndev = {
|
||||
|
||||
Reference in New Issue
Block a user