qemu_monitor_text.h 9.4 KB
Newer Older
1 2 3
/*
 * qemu_monitor_text.h: interaction with QEMU monitor console
 *
E
Eric Blake 已提交
4
 * Copyright (C) 2006-2009, 2011-2012 Red Hat, Inc.
5 6 7 8 9 10 11 12 13 14 15 16 17
 * 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
18
 * License along with this library.  If not, see
O
Osier Yang 已提交
19
 * <http://www.gnu.org/licenses/>.
20 21 22 23 24 25
 *
 * Author: Daniel P. Berrange <berrange@redhat.com>
 */


#ifndef QEMU_MONITOR_TEXT_H
26
# define QEMU_MONITOR_TEXT_H
27

28
# include "internal.h"
29

30
# include "qemu_monitor.h"
31

32 33 34 35 36
int qemuMonitorTextIOProcess(qemuMonitorPtr mon,
                             const char *data,
                             size_t len,
                             qemuMonitorMessagePtr msg);

37 38 39 40 41
int qemuMonitorTextCommandWithFd(qemuMonitorPtr mon,
                                 const char *cmd,
                                 int scm_fd,
                                 char **reply);

42 43 44
int qemuMonitorTextStartCPUs(qemuMonitorPtr mon,
                             virConnectPtr conn);
int qemuMonitorTextStopCPUs(qemuMonitorPtr mon);
45 46 47
int qemuMonitorTextGetStatus(qemuMonitorPtr mon,
                             bool *running,
                             virDomainPausedReason *reason);
48 49

int qemuMonitorTextSystemPowerdown(qemuMonitorPtr mon);
50
int qemuMonitorTextSystemReset(qemuMonitorPtr mon);
51 52 53

int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
                              int **pids);
54 55
int qemuMonitorTextGetVirtType(qemuMonitorPtr mon,
                               int *virtType);
56
int qemuMonitorTextGetBalloonInfo(qemuMonitorPtr mon,
57
                                  unsigned long long *currmem);
58 59 60
int qemuMonitorTextGetMemoryStats(qemuMonitorPtr mon,
                                  virDomainMemoryStatPtr stats,
                                  unsigned int nr_stats);
61
int qemuMonitorTextGetBlockInfo(qemuMonitorPtr mon,
62
                                virHashTablePtr table);
63 64 65

int qemuMonitorTextGetAllBlockStatsInfo(qemuMonitorPtr mon,
                                        virHashTablePtr hash);
66 67 68
int qemuMonitorTextBlockResize(qemuMonitorPtr mon,
                               const char *device,
                               unsigned long long size);
69 70
int qemuMonitorTextSetVNCPassword(qemuMonitorPtr mon,
                                  const char *password);
71 72 73 74 75 76 77
int qemuMonitorTextSetPassword(qemuMonitorPtr mon,
                               const char *protocol,
                               const char *password,
                               const char *action_if_connected);
int qemuMonitorTextExpirePassword(qemuMonitorPtr mon,
                                  const char *protocol,
                                  const char *expire_time);
78
int qemuMonitorTextSetBalloon(qemuMonitorPtr mon,
79
                              unsigned long long newmem);
80
int qemuMonitorTextSetCPU(qemuMonitorPtr mon, int cpu, bool online);
81 82

int qemuMonitorTextEjectMedia(qemuMonitorPtr mon,
83
                              const char *dev_name,
84
                              bool force);
85
int qemuMonitorTextChangeMedia(qemuMonitorPtr mon,
86
                               const char *dev_name,
87 88
                               const char *newmedia,
                               const char *format);
89 90 91 92 93 94 95 96 97 98 99 100 101 102


int qemuMonitorTextSaveVirtualMemory(qemuMonitorPtr mon,
                                     unsigned long long offset,
                                     size_t length,
                                     const char *path);
int qemuMonitorTextSavePhysicalMemory(qemuMonitorPtr mon,
                                      unsigned long long offset,
                                      size_t length,
                                      const char *path);

int qemuMonitorTextSetMigrationSpeed(qemuMonitorPtr mon,
                                     unsigned long bandwidth);

103 104 105
int qemuMonitorTextSetMigrationDowntime(qemuMonitorPtr mon,
                                        unsigned long long downtime);

106
int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon,
107
                                      qemuMonitorMigrationStatusPtr status);
108

109 110 111
int qemuMonitorTextMigrate(qemuMonitorPtr mon,
                           unsigned int flags,
                           const char *uri);
112 113 114

int qemuMonitorTextMigrateCancel(qemuMonitorPtr mon);

115 116 117 118 119 120 121
int qemuMonitorTextGraphicsRelocate(qemuMonitorPtr mon,
                                    int type,
                                    const char *hostname,
                                    int port,
                                    int tlsPort,
                                    const char *tlsSubject);

122 123 124 125 126 127 128 129 130 131 132 133
int qemuMonitorTextAddUSBDisk(qemuMonitorPtr mon,
                              const char *path);

int qemuMonitorTextAddUSBDeviceExact(qemuMonitorPtr mon,
                                     int bus,
                                     int dev);
int qemuMonitorTextAddUSBDeviceMatch(qemuMonitorPtr mon,
                                     int vendor,
                                     int product);


int qemuMonitorTextAddPCIHostDevice(qemuMonitorPtr mon,
134 135
                                    virDevicePCIAddress *hostAddr,
                                    virDevicePCIAddress *guestAddr);
136 137 138 139

int qemuMonitorTextAddPCIDisk(qemuMonitorPtr mon,
                              const char *path,
                              const char *bus,
140
                              virDevicePCIAddress *guestAddr);
141 142 143

int qemuMonitorTextAddPCINetwork(qemuMonitorPtr mon,
                                 const char *nicstr,
144
                                 virDevicePCIAddress *guestAddr);
145 146

int qemuMonitorTextRemovePCIDevice(qemuMonitorPtr mon,
147
                                   virDevicePCIAddress *guestAddr);
148 149 150 151 152 153 154 155 156 157 158 159 160 161

int qemuMonitorTextSendFileHandle(qemuMonitorPtr mon,
                                  const char *fdname,
                                  int fd);

int qemuMonitorTextCloseFileHandle(qemuMonitorPtr mon,
                                   const char *fdname);

int qemuMonitorTextAddHostNetwork(qemuMonitorPtr mon,
                                  const char *netstr);

int qemuMonitorTextRemoveHostNetwork(qemuMonitorPtr mon,
                                     int vlan,
                                     const char *netname);
162

163 164 165 166 167 168
int qemuMonitorTextAddNetdev(qemuMonitorPtr mon,
                             const char *netdevstr);

int qemuMonitorTextRemoveNetdev(qemuMonitorPtr mon,
                                const char *alias);

169 170
int qemuMonitorTextGetChardevInfo(qemuMonitorPtr mon,
                                  virHashTablePtr info);
171

172 173
int qemuMonitorTextAttachPCIDiskController(qemuMonitorPtr mon,
                                           const char *bus,
174
                                           virDevicePCIAddress *guestAddr);
175

176 177
int qemuMonitorTextAttachDrive(qemuMonitorPtr mon,
                               const char *drivestr,
178
                               virDevicePCIAddress *controllerAddr,
179 180
                               virDomainDeviceDriveAddress *driveAddr);

181 182
int qemuMonitorTextGetAllPCIAddresses(qemuMonitorPtr mon,
                                      qemuMonitorPCIAddress **addrs);
183

184 185 186
int qemuMonitorTextAddDevice(qemuMonitorPtr mon,
                             const char *devicestr);

187
int qemuMonitorTextDelDevice(qemuMonitorPtr mon,
188
                             const char *devalias);
189

190 191 192
int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
                             const char *drivestr);

193
int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
194 195
                             const char *drivestr);

196 197 198 199
int qemuMonitorTextSetDrivePassphrase(qemuMonitorPtr mon,
                                      const char *alias,
                                      const char *passphrase);

C
Chris Lalancette 已提交
200 201 202 203
int qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon, const char *name);
int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name);
int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, const char *name);

204 205 206
int qemuMonitorTextArbitraryCommand(qemuMonitorPtr mon, const char *cmd,
                                    char **reply);

207
int qemuMonitorTextInjectNMI(qemuMonitorPtr mon);
208

209 210 211 212 213
int qemuMonitorTextSendKey(qemuMonitorPtr mon,
                           unsigned int holdtime,
                           unsigned int *keycodes,
                           unsigned int nkeycodes);

214 215
int qemuMonitorTextScreendump(qemuMonitorPtr mon, const char *file);

216 217
int qemuMonitorTextSetLink(qemuMonitorPtr mon,
                           const char *name,
218
                           virDomainNetInterfaceLinkState state);
219

220 221 222 223 224
int qemuMonitorTextOpenGraphics(qemuMonitorPtr mon,
                                const char *protocol,
                                const char *fdname,
                                bool skipauth);

225 226 227 228 229 230 231 232
int qemuMonitorTextSetBlockIoThrottle(qemuMonitorPtr mon,
                                      const char *device,
                                      virDomainBlockIoTuneInfoPtr info);

int qemuMonitorTextGetBlockIoThrottle(qemuMonitorPtr mon,
                                      const char *device,
                                      virDomainBlockIoTuneInfoPtr reply);

233
#endif /* QEMU_MONITOR_TEXT_H */