2014-09-16 20:50:53 +00:00
|
|
|
/*
|
|
|
|
* qemu_interface.h: QEMU interface management
|
|
|
|
*
|
2016-02-15 15:26:40 +00:00
|
|
|
* Copyright (C) 2014, 2016 Red Hat, Inc.
|
2014-09-16 20:50:53 +00:00
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#pragma once
|
2014-09-16 20:50:53 +00:00
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#include "domain_conf.h"
|
|
|
|
#include "qemu_conf.h"
|
|
|
|
#include "qemu_domain.h"
|
2019-08-08 14:55:12 +00:00
|
|
|
#include "qemu_slirp.h"
|
2014-09-16 20:50:53 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuInterfaceStartDevice(virDomainNetDef *net);
|
|
|
|
int qemuInterfaceStartDevices(virDomainDef *def);
|
|
|
|
int qemuInterfaceStopDevice(virDomainNetDef *net);
|
|
|
|
int qemuInterfaceStopDevices(virDomainDef *def);
|
|
|
|
|
|
|
|
int qemuInterfaceDirectConnect(virDomainDef *def,
|
|
|
|
virQEMUDriver *driver,
|
|
|
|
virDomainNetDef *net,
|
2016-03-23 11:37:59 +00:00
|
|
|
int *tapfd,
|
2017-01-31 16:35:51 +00:00
|
|
|
size_t tapfdSize,
|
|
|
|
virNetDevVPortProfileOp vmop);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuInterfaceEthernetConnect(virDomainDef *def,
|
|
|
|
virQEMUDriver *driver,
|
|
|
|
virDomainNetDef *net,
|
2017-01-31 16:35:51 +00:00
|
|
|
int *tapfd,
|
|
|
|
size_t tapfdSize);
|
2016-02-15 15:26:40 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuInterfaceBridgeConnect(virDomainDef *def,
|
|
|
|
virQEMUDriver *driver,
|
|
|
|
virDomainNetDef *net,
|
2016-02-15 15:52:50 +00:00
|
|
|
int *tapfd,
|
2017-05-18 18:16:27 +00:00
|
|
|
size_t *tapfdSize)
|
2016-02-15 15:52:50 +00:00
|
|
|
ATTRIBUTE_NONNULL(2);
|
2016-02-15 16:51:48 +00:00
|
|
|
|
2022-05-09 15:42:08 +00:00
|
|
|
int qemuInterfaceOpenVhostNet(virDomainObj *def,
|
|
|
|
virDomainNetDef *net) G_GNUC_NO_INLINE;
|
2019-08-08 14:55:12 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuInterfacePrepareSlirp(virQEMUDriver *driver,
|
|
|
|
virDomainNetDef *net,
|
|
|
|
qemuSlirp **slirp);
|
2020-10-14 17:08:27 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuInterfaceVDPAConnect(virDomainNetDef *net) G_GNUC_NO_INLINE;
|