Files
Fan Du a6740cbebb kvmtool: Introduce downscript option for virtio-net
To detach tap device automatically from bridge when exiting,
just like what the reverse of "script" does.

Signed-off-by: Fan Du <fan.du@intel.com>
2015-09-04 16:09:46 +01:00

34 lines
582 B
C

#ifndef KVM__VIRTIO_NET_H
#define KVM__VIRTIO_NET_H
#include "kvm/parse-options.h"
struct kvm;
struct virtio_net_params {
const char *guest_ip;
const char *host_ip;
const char *script;
const char *downscript;
const char *trans;
const char *tapif;
char guest_mac[6];
char host_mac[6];
struct kvm *kvm;
int mode;
int vhost;
int fd;
int mq;
};
int virtio_net__init(struct kvm *kvm);
int virtio_net__exit(struct kvm *kvm);
int netdev_parser(const struct option *opt, const char *arg, int unset);
enum {
NET_MODE_USER,
NET_MODE_TAP
};
#endif /* KVM__VIRTIO_NET_H */