xref: /kvmtool/include/kvm/virtio-net.h (revision 1dfc7c243d6a16913a70f252480a249e8d033498)
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 *trans;
13 	const char *tapif;
14 	char guest_mac[6];
15 	char host_mac[6];
16 	struct kvm *kvm;
17 	int mode;
18 	int vhost;
19 	int fd;
20 	int mq;
21 };
22 
23 int virtio_net__init(struct kvm *kvm);
24 int virtio_net__exit(struct kvm *kvm);
25 int netdev_parser(const struct option *opt, const char *arg, int unset);
26 
27 enum {
28 	NET_MODE_USER,
29 	NET_MODE_TAP
30 };
31 
32 #endif /* KVM__VIRTIO_NET_H */
33