aboutsummaryrefslogtreecommitdiff
path: root/net/tap.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-03-17 13:08:38 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-04-01 13:56:43 -0500
commitb202554cf791f7182eccd70c7685827abded3907 (patch)
tree30c27dbd0c2e3baa18f320080caef2abbae0aa79 /net/tap.c
parent82b0d80ef6a37b46bac1311c31935dc130a5a703 (diff)
tap: add API to retrieve vhost net header
will be used by virtio-net for vhost net support Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net/tap.c')
-rw-r--r--net/tap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/tap.c b/net/tap.c
index 740665f5b6..303d69f5ab 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -488,3 +488,10 @@ int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan
return 0;
}
+
+VHostNetState *tap_get_vhost_net(VLANClientState *nc)
+{
+ TAPState *s = DO_UPCAST(TAPState, nc, nc);
+ assert(nc->info->type == NET_CLIENT_TYPE_TAP);
+ return s->vhost_net;
+}