qemu_interface.h 2.2 KB
Newer Older
1 2 3
/*
 * qemu_interface.h: QEMU interface management
 *
4
 * Copyright (C) 2014, 2016 Red Hat, Inc.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 * Copyright IBM Corp. 2014
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see
 * <http://www.gnu.org/licenses/>.
 */

22 23
#ifndef LIBVIRT_QEMU_INTERFACE_H
# define LIBVIRT_QEMU_INTERFACE_H
24 25

# include "domain_conf.h"
26
# include "qemu_conf.h"
27
# include "qemu_domain.h"
28 29 30

int qemuInterfaceStartDevice(virDomainNetDefPtr net);
int qemuInterfaceStartDevices(virDomainDefPtr def);
31 32
int qemuInterfaceStopDevice(virDomainNetDefPtr net);
int qemuInterfaceStopDevices(virDomainDefPtr def);
33

34
int qemuInterfaceDirectConnect(virDomainDefPtr def,
35 36 37
                               virQEMUDriverPtr driver,
                               virDomainNetDefPtr net,
                               int *tapfd,
38 39 40 41 42 43 44 45
                               size_t tapfdSize,
                               virNetDevVPortProfileOp vmop);

int qemuInterfaceEthernetConnect(virDomainDefPtr def,
                                 virQEMUDriverPtr driver,
                                 virDomainNetDefPtr net,
                                 int *tapfd,
                                 size_t tapfdSize);
46

47 48 49 50
int qemuInterfaceBridgeConnect(virDomainDefPtr def,
                               virQEMUDriverPtr driver,
                               virDomainNetDefPtr net,
                               int *tapfd,
51
                               size_t *tapfdSize)
52
    ATTRIBUTE_NONNULL(2);
53 54 55 56 57

int qemuInterfaceOpenVhostNet(virDomainDefPtr def,
                              virDomainNetDefPtr net,
                              int *vhostfd,
                              size_t *vhostfdSize);
58
#endif /* LIBVIRT_QEMU_INTERFACE_H */