1 #ifndef VHOST_NET_H 2 #define VHOST_NET_H 3 4 #include "net/net.h" 5 6 struct vhost_net; 7 typedef struct vhost_net VHostNetState; 8 9 VHostNetState *vhost_net_init(NetClientState *backend, int devfd, bool force); 10 11 bool vhost_net_query(VHostNetState *net, VirtIODevice *dev); 12 int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int total_queues); 13 void vhost_net_stop(VirtIODevice *dev, NetClientState *ncs, int total_queues); 14 15 void vhost_net_cleanup(VHostNetState *net); 16 17 unsigned vhost_net_get_features(VHostNetState *net, unsigned features); 18 void vhost_net_ack_features(VHostNetState *net, unsigned features); 19 20 bool vhost_net_virtqueue_pending(VHostNetState *net, int n); 21 void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev, 22 int idx, bool mask); 23 #endif 24