xref: /kvmtool/include/kvm/virtio-net.h (revision eef27ae368562bcce4f8a2b65822b307da0d4146)
1 #ifndef KVM__VIRTIO_NET_H
2 #define KVM__VIRTIO_NET_H
3 
4 #include "kvm/parse-options.h"
5 
6 struct kvm;
7 
8 struct virtio_net_params {
9 	const char *guest_ip;
10 	const char *host_ip;
11 	const char *script;
12 	const char *downscript;
13 	const char *trans;
14 	const char *tapif;
15 	char guest_mac[6];
16 	char host_mac[6];
17 	struct kvm *kvm;
18 	int mode;
19 	int vhost;
20 	int fd;
21 	int mq;
22 };
23 
24 int virtio_net__init(struct kvm *kvm);
25 int virtio_net__exit(struct kvm *kvm);
26 int netdev_parser(const struct option *opt, const char *arg, int unset);
27 
28 enum {
29 	NET_MODE_USER,
30 	NET_MODE_TAP
31 };
32 
33 #endif /* KVM__VIRTIO_NET_H */
34