qemu_interface.h 2.1 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 22 23 24 25 26 27 28
 * 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/>.
 *
 * Authors:
 *     Matthew J. Rosato <mjrosato@linux.vnet.ibm.com>
 */

#ifndef __QEMU_INTERFACE_H__
# define __QEMU_INTERFACE_H__

# include "domain_conf.h"
29
# include "qemu_conf.h"
30
# include "qemu_domain.h"
31 32 33

int qemuInterfaceStartDevice(virDomainNetDefPtr net);
int qemuInterfaceStartDevices(virDomainDefPtr def);
34 35
int qemuInterfaceStopDevice(virDomainNetDefPtr net);
int qemuInterfaceStopDevices(virDomainDefPtr def);
36

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

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

int qemuInterfaceOpenVhostNet(virDomainDefPtr def,
                              virDomainNetDefPtr net,
                              virQEMUCapsPtr qemuCaps,
                              int *vhostfd,
                              size_t *vhostfdSize);
56
#endif /* __QEMU_INTERFACE_H__ */