2016-02-16 15:24:35 +00:00
|
|
|
/*
|
|
|
|
* qemu_alias.h: QEMU alias manipulation
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006-2016 Red Hat, Inc.
|
|
|
|
* Copyright (C) 2006 Daniel P. Berrange
|
|
|
|
*
|
|
|
|
* 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
|
2016-02-16 15:24:35 +00:00
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#include "domain_conf.h"
|
2016-02-16 15:24:35 +00:00
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#include "qemu_capabilities.h"
|
|
|
|
#include "qemu_domain.h"
|
|
|
|
#include "qemu_domain_address.h"
|
2016-02-16 15:24:35 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceChrAlias(virDomainDef *def,
|
|
|
|
virDomainChrDef *chr,
|
2016-02-16 15:24:35 +00:00
|
|
|
ssize_t idx);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceControllerAlias(virDomainDef *domainDef,
|
|
|
|
virDomainControllerDef *controller);
|
2016-02-16 15:24:35 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceDiskAlias(virDomainDef *def,
|
|
|
|
virDomainDiskDef *disk,
|
|
|
|
virQEMUCaps *qemuCaps);
|
2016-02-16 15:24:35 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceHostdevAlias(virDomainDef *def,
|
2016-04-01 14:40:23 +00:00
|
|
|
char **alias,
|
2016-02-16 15:24:35 +00:00
|
|
|
int idx);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceNetAlias(virDomainDef *def,
|
|
|
|
virDomainNetDef *net,
|
2016-02-16 15:24:35 +00:00
|
|
|
int idx);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceRedirdevAlias(virDomainDef *def,
|
|
|
|
virDomainRedirdevDef *redirdev,
|
2016-02-16 15:24:35 +00:00
|
|
|
int idx);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceRNGAlias(virDomainDef *def,
|
|
|
|
virDomainRNGDef *rng);
|
2016-02-16 15:24:35 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceMemoryAlias(virDomainDef *def,
|
|
|
|
virDomainMemoryDef *mems,
|
2016-11-01 05:21:36 +00:00
|
|
|
bool oldAlias);
|
2016-04-06 15:32:12 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceShmemAlias(virDomainDef *def,
|
|
|
|
virDomainShmemDef *shmem,
|
2016-09-12 13:48:41 +00:00
|
|
|
int idx);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceWatchdogAlias(virDomainWatchdogDef *watchdog);
|
2017-09-01 11:39:15 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceInputAlias(virDomainDef *def,
|
|
|
|
virDomainInputDef *input,
|
2017-10-04 09:09:22 +00:00
|
|
|
int idx);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceVsockAlias(virDomainVsockDef *vsock);
|
2018-05-30 11:53:52 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
int qemuAssignDeviceAliases(virDomainDef *def, virQEMUCaps *qemuCaps);
|
2016-02-16 15:24:35 +00:00
|
|
|
|
|
|
|
int qemuDomainDeviceAliasIndex(const virDomainDeviceInfo *info,
|
|
|
|
const char *prefix);
|
2016-02-26 15:29:58 +00:00
|
|
|
|
2018-05-31 09:55:24 +00:00
|
|
|
char *qemuAliasDiskDriveFromDisk(const virDomainDiskDef *disk);
|
2016-03-29 22:23:02 +00:00
|
|
|
|
2016-06-29 17:34:00 +00:00
|
|
|
const char *qemuAliasDiskDriveSkipPrefix(const char *dev_name);
|
|
|
|
|
2016-07-18 17:19:02 +00:00
|
|
|
char *qemuAliasFromHostdev(const virDomainHostdevDef *hostdev);
|
|
|
|
|
2016-03-29 22:23:02 +00:00
|
|
|
char *qemuDomainGetMasterKeyAlias(void);
|
|
|
|
|
2020-03-06 14:36:42 +00:00
|
|
|
char *qemuAliasForSecret(const char *parentalias,
|
|
|
|
const char *obj);
|
|
|
|
|
2017-02-16 19:59:06 +00:00
|
|
|
char *qemuAliasTLSObjFromSrcAlias(const char *srcAlias)
|
2016-06-09 22:30:55 +00:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2016-10-18 14:37:23 +00:00
|
|
|
char *qemuAliasChardevFromDevAlias(const char *devAlias)
|
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
2018-04-18 14:55:14 +00:00
|
|
|
const char *qemuDomainGetManagedPRAlias(void);
|
|
|
|
|
2018-05-11 12:11:36 +00:00
|
|
|
char *qemuDomainGetUnmanagedPRAlias(const char *parentalias);
|
2020-02-25 09:55:11 +00:00
|
|
|
|
|
|
|
const char *qemuDomainGetDBusVMStateAlias(void);
|
2021-02-01 10:59:03 +00:00
|
|
|
|
|
|
|
char *qemuDomainGetVhostUserChrAlias(const char *devalias);
|