tap: add interface to get device fd
Will be used by vhost to attach/detach to backend. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
087431d1d1
commit
95d528a2fe
@ -270,6 +270,13 @@ static void tap_poll(VLANClientState *nc, bool enable)
|
||||
tap_write_poll(s, enable);
|
||||
}
|
||||
|
||||
int tap_get_fd(VLANClientState *nc)
|
||||
{
|
||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||
assert(nc->info->type == NET_CLIENT_TYPE_TAP);
|
||||
return s->fd;
|
||||
}
|
||||
|
||||
/* fd support */
|
||||
|
||||
static NetClientInfo net_tap_info = {
|
||||
|
Loading…
Reference in New Issue
Block a user