5a6654f07a
- Add a yacc-based parser and a hand-written lexer to read the remote_protocol.x file from libvirt's sources. - Use the new parser to generate the constants used to communicate with libvirt.
475 lines
15 KiB
Go
475 lines
15 KiB
Go
/*
|
|
* This file generated by internal/lvgen/generate.go. DO NOT EDIT BY HAND!
|
|
*
|
|
* To regenerate, run 'go generate' in internal/lvgen.
|
|
*/
|
|
package constants
|
|
|
|
// libvirt procedure identifiers and other enums
|
|
//
|
|
// These are libvirt procedure numbers which correspond to each respective
|
|
// API call between remote_internal driver and libvirtd. Each procedure is
|
|
// identified by a unique number which *may change in any future libvirt
|
|
// update*.
|
|
//
|
|
// Examples:
|
|
// REMOTE_PROC_CONNECT_OPEN = 1
|
|
// REMOTE_PROC_DOMAIN_DEFINE_XML = 11
|
|
// REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207,
|
|
const (
|
|
// From enums:
|
|
AuthNone = 0
|
|
AuthSasl = 1
|
|
AuthPolkit = 2
|
|
ProcConnectOpen = 1
|
|
ProcConnectClose = 2
|
|
ProcConnectGetType = 3
|
|
ProcConnectGetVersion = 4
|
|
ProcConnectGetMaxVcpus = 5
|
|
ProcNodeGetInfo = 6
|
|
ProcConnectGetCapabilities = 7
|
|
ProcDomainAttachDevice = 8
|
|
ProcDomainCreate = 9
|
|
ProcDomainCreateXML = 10
|
|
ProcDomainDefineXML = 11
|
|
ProcDomainDestroy = 12
|
|
ProcDomainDetachDevice = 13
|
|
ProcDomainGetXMLDesc = 14
|
|
ProcDomainGetAutostart = 15
|
|
ProcDomainGetInfo = 16
|
|
ProcDomainGetMaxMemory = 17
|
|
ProcDomainGetMaxVcpus = 18
|
|
ProcDomainGetOsType = 19
|
|
ProcDomainGetVcpus = 20
|
|
ProcConnectListDefinedDomains = 21
|
|
ProcDomainLookupByID = 22
|
|
ProcDomainLookupByName = 23
|
|
ProcDomainLookupByUUID = 24
|
|
ProcConnectNumOfDefinedDomains = 25
|
|
ProcDomainPinVcpu = 26
|
|
ProcDomainReboot = 27
|
|
ProcDomainResume = 28
|
|
ProcDomainSetAutostart = 29
|
|
ProcDomainSetMaxMemory = 30
|
|
ProcDomainSetMemory = 31
|
|
ProcDomainSetVcpus = 32
|
|
ProcDomainShutdown = 33
|
|
ProcDomainSuspend = 34
|
|
ProcDomainUndefine = 35
|
|
ProcConnectListDefinedNetworks = 36
|
|
ProcConnectListDomains = 37
|
|
ProcConnectListNetworks = 38
|
|
ProcNetworkCreate = 39
|
|
ProcNetworkCreateXML = 40
|
|
ProcNetworkDefineXML = 41
|
|
ProcNetworkDestroy = 42
|
|
ProcNetworkGetXMLDesc = 43
|
|
ProcNetworkGetAutostart = 44
|
|
ProcNetworkGetBridgeName = 45
|
|
ProcNetworkLookupByName = 46
|
|
ProcNetworkLookupByUUID = 47
|
|
ProcNetworkSetAutostart = 48
|
|
ProcNetworkUndefine = 49
|
|
ProcConnectNumOfDefinedNetworks = 50
|
|
ProcConnectNumOfDomains = 51
|
|
ProcConnectNumOfNetworks = 52
|
|
ProcDomainCoreDump = 53
|
|
ProcDomainRestore = 54
|
|
ProcDomainSave = 55
|
|
ProcDomainGetSchedulerType = 56
|
|
ProcDomainGetSchedulerParameters = 57
|
|
ProcDomainSetSchedulerParameters = 58
|
|
ProcConnectGetHostname = 59
|
|
ProcConnectSupportsFeature = 60
|
|
ProcDomainMigratePrepare = 61
|
|
ProcDomainMigratePerform = 62
|
|
ProcDomainMigrateFinish = 63
|
|
ProcDomainBlockStats = 64
|
|
ProcDomainInterfaceStats = 65
|
|
ProcAuthList = 66
|
|
ProcAuthSaslInit = 67
|
|
ProcAuthSaslStart = 68
|
|
ProcAuthSaslStep = 69
|
|
ProcAuthPolkit = 70
|
|
ProcConnectNumOfStoragePools = 71
|
|
ProcConnectListStoragePools = 72
|
|
ProcConnectNumOfDefinedStoragePools = 73
|
|
ProcConnectListDefinedStoragePools = 74
|
|
ProcConnectFindStoragePoolSources = 75
|
|
ProcStoragePoolCreateXML = 76
|
|
ProcStoragePoolDefineXML = 77
|
|
ProcStoragePoolCreate = 78
|
|
ProcStoragePoolBuild = 79
|
|
ProcStoragePoolDestroy = 80
|
|
ProcStoragePoolDelete = 81
|
|
ProcStoragePoolUndefine = 82
|
|
ProcStoragePoolRefresh = 83
|
|
ProcStoragePoolLookupByName = 84
|
|
ProcStoragePoolLookupByUUID = 85
|
|
ProcStoragePoolLookupByVolume = 86
|
|
ProcStoragePoolGetInfo = 87
|
|
ProcStoragePoolGetXMLDesc = 88
|
|
ProcStoragePoolGetAutostart = 89
|
|
ProcStoragePoolSetAutostart = 90
|
|
ProcStoragePoolNumOfVolumes = 91
|
|
ProcStoragePoolListVolumes = 92
|
|
ProcStorageVolCreateXML = 93
|
|
ProcStorageVolDelete = 94
|
|
ProcStorageVolLookupByName = 95
|
|
ProcStorageVolLookupByKey = 96
|
|
ProcStorageVolLookupByPath = 97
|
|
ProcStorageVolGetInfo = 98
|
|
ProcStorageVolGetXMLDesc = 99
|
|
ProcStorageVolGetPath = 100
|
|
ProcNodeGetCellsFreeMemory = 101
|
|
ProcNodeGetFreeMemory = 102
|
|
ProcDomainBlockPeek = 103
|
|
ProcDomainMemoryPeek = 104
|
|
ProcConnectDomainEventRegister = 105
|
|
ProcConnectDomainEventDeregister = 106
|
|
ProcDomainEventLifecycle = 107
|
|
ProcDomainMigratePrepare2 = 108
|
|
ProcDomainMigrateFinish2 = 109
|
|
ProcConnectGetUri = 110
|
|
ProcNodeNumOfDevices = 111
|
|
ProcNodeListDevices = 112
|
|
ProcNodeDeviceLookupByName = 113
|
|
ProcNodeDeviceGetXMLDesc = 114
|
|
ProcNodeDeviceGetParent = 115
|
|
ProcNodeDeviceNumOfCaps = 116
|
|
ProcNodeDeviceListCaps = 117
|
|
ProcNodeDeviceDettach = 118
|
|
ProcNodeDeviceReAttach = 119
|
|
ProcNodeDeviceReset = 120
|
|
ProcDomainGetSecurityLabel = 121
|
|
ProcNodeGetSecurityModel = 122
|
|
ProcNodeDeviceCreateXML = 123
|
|
ProcNodeDeviceDestroy = 124
|
|
ProcStorageVolCreateXMLFrom = 125
|
|
ProcConnectNumOfInterfaces = 126
|
|
ProcConnectListInterfaces = 127
|
|
ProcInterfaceLookupByName = 128
|
|
ProcInterfaceLookupByMacString = 129
|
|
ProcInterfaceGetXMLDesc = 130
|
|
ProcInterfaceDefineXML = 131
|
|
ProcInterfaceUndefine = 132
|
|
ProcInterfaceCreate = 133
|
|
ProcInterfaceDestroy = 134
|
|
ProcConnectDomainXMLFromNative = 135
|
|
ProcConnectDomainXMLToNative = 136
|
|
ProcConnectNumOfDefinedInterfaces = 137
|
|
ProcConnectListDefinedInterfaces = 138
|
|
ProcConnectNumOfSecrets = 139
|
|
ProcConnectListSecrets = 140
|
|
ProcSecretLookupByUUID = 141
|
|
ProcSecretDefineXML = 142
|
|
ProcSecretGetXMLDesc = 143
|
|
ProcSecretSetValue = 144
|
|
ProcSecretGetValue = 145
|
|
ProcSecretUndefine = 146
|
|
ProcSecretLookupByUsage = 147
|
|
ProcDomainMigratePrepareTunnel = 148
|
|
ProcConnectIsSecure = 149
|
|
ProcDomainIsActive = 150
|
|
ProcDomainIsPersistent = 151
|
|
ProcNetworkIsActive = 152
|
|
ProcNetworkIsPersistent = 153
|
|
ProcStoragePoolIsActive = 154
|
|
ProcStoragePoolIsPersistent = 155
|
|
ProcInterfaceIsActive = 156
|
|
ProcConnectGetLibVersion = 157
|
|
ProcConnectCompareCPU = 158
|
|
ProcDomainMemoryStats = 159
|
|
ProcDomainAttachDeviceFlags = 160
|
|
ProcDomainDetachDeviceFlags = 161
|
|
ProcConnectBaselineCPU = 162
|
|
ProcDomainGetJobInfo = 163
|
|
ProcDomainAbortJob = 164
|
|
ProcStorageVolWipe = 165
|
|
ProcDomainMigrateSetMaxDowntime = 166
|
|
ProcConnectDomainEventRegisterAny = 167
|
|
ProcConnectDomainEventDeregisterAny = 168
|
|
ProcDomainEventReboot = 169
|
|
ProcDomainEventRtcChange = 170
|
|
ProcDomainEventWatchdog = 171
|
|
ProcDomainEventIOError = 172
|
|
ProcDomainEventGraphics = 173
|
|
ProcDomainUpdateDeviceFlags = 174
|
|
ProcNwfilterLookupByName = 175
|
|
ProcNwfilterLookupByUUID = 176
|
|
ProcNwfilterGetXMLDesc = 177
|
|
ProcConnectNumOfNwfilters = 178
|
|
ProcConnectListNwfilters = 179
|
|
ProcNwfilterDefineXML = 180
|
|
ProcNwfilterUndefine = 181
|
|
ProcDomainManagedSave = 182
|
|
ProcDomainHasManagedSaveImage = 183
|
|
ProcDomainManagedSaveRemove = 184
|
|
ProcDomainSnapshotCreateXML = 185
|
|
ProcDomainSnapshotGetXMLDesc = 186
|
|
ProcDomainSnapshotNum = 187
|
|
ProcDomainSnapshotListNames = 188
|
|
ProcDomainSnapshotLookupByName = 189
|
|
ProcDomainHasCurrentSnapshot = 190
|
|
ProcDomainSnapshotCurrent = 191
|
|
ProcDomainRevertToSnapshot = 192
|
|
ProcDomainSnapshotDelete = 193
|
|
ProcDomainGetBlockInfo = 194
|
|
ProcDomainEventIOErrorReason = 195
|
|
ProcDomainCreateWithFlags = 196
|
|
ProcDomainSetMemoryParameters = 197
|
|
ProcDomainGetMemoryParameters = 198
|
|
ProcDomainSetVcpusFlags = 199
|
|
ProcDomainGetVcpusFlags = 200
|
|
ProcDomainOpenConsole = 201
|
|
ProcDomainIsUpdated = 202
|
|
ProcConnectGetSysinfo = 203
|
|
ProcDomainSetMemoryFlags = 204
|
|
ProcDomainSetBlkioParameters = 205
|
|
ProcDomainGetBlkioParameters = 206
|
|
ProcDomainMigrateSetMaxSpeed = 207
|
|
ProcStorageVolUpload = 208
|
|
ProcStorageVolDownload = 209
|
|
ProcDomainInjectNmi = 210
|
|
ProcDomainScreenshot = 211
|
|
ProcDomainGetState = 212
|
|
ProcDomainMigrateBegin3 = 213
|
|
ProcDomainMigratePrepare3 = 214
|
|
ProcDomainMigratePrepareTunnel3 = 215
|
|
ProcDomainMigratePerform3 = 216
|
|
ProcDomainMigrateFinish3 = 217
|
|
ProcDomainMigrateConfirm3 = 218
|
|
ProcDomainSetSchedulerParametersFlags = 219
|
|
ProcInterfaceChangeBegin = 220
|
|
ProcInterfaceChangeCommit = 221
|
|
ProcInterfaceChangeRollback = 222
|
|
ProcDomainGetSchedulerParametersFlags = 223
|
|
ProcDomainEventControlError = 224
|
|
ProcDomainPinVcpuFlags = 225
|
|
ProcDomainSendKey = 226
|
|
ProcNodeGetCPUStats = 227
|
|
ProcNodeGetMemoryStats = 228
|
|
ProcDomainGetControlInfo = 229
|
|
ProcDomainGetVcpuPinInfo = 230
|
|
ProcDomainUndefineFlags = 231
|
|
ProcDomainSaveFlags = 232
|
|
ProcDomainRestoreFlags = 233
|
|
ProcDomainDestroyFlags = 234
|
|
ProcDomainSaveImageGetXMLDesc = 235
|
|
ProcDomainSaveImageDefineXML = 236
|
|
ProcDomainBlockJobAbort = 237
|
|
ProcDomainGetBlockJobInfo = 238
|
|
ProcDomainBlockJobSetSpeed = 239
|
|
ProcDomainBlockPull = 240
|
|
ProcDomainEventBlockJob = 241
|
|
ProcDomainMigrateGetMaxSpeed = 242
|
|
ProcDomainBlockStatsFlags = 243
|
|
ProcDomainSnapshotGetParent = 244
|
|
ProcDomainReset = 245
|
|
ProcDomainSnapshotNumChildren = 246
|
|
ProcDomainSnapshotListChildrenNames = 247
|
|
ProcDomainEventDiskChange = 248
|
|
ProcDomainOpenGraphics = 249
|
|
ProcNodeSuspendForDuration = 250
|
|
ProcDomainBlockResize = 251
|
|
ProcDomainSetBlockIOTune = 252
|
|
ProcDomainGetBlockIOTune = 253
|
|
ProcDomainSetNumaParameters = 254
|
|
ProcDomainGetNumaParameters = 255
|
|
ProcDomainSetInterfaceParameters = 256
|
|
ProcDomainGetInterfaceParameters = 257
|
|
ProcDomainShutdownFlags = 258
|
|
ProcStorageVolWipePattern = 259
|
|
ProcStorageVolResize = 260
|
|
ProcDomainPmSuspendForDuration = 261
|
|
ProcDomainGetCPUStats = 262
|
|
ProcDomainGetDiskErrors = 263
|
|
ProcDomainSetMetadata = 264
|
|
ProcDomainGetMetadata = 265
|
|
ProcDomainBlockRebase = 266
|
|
ProcDomainPmWakeup = 267
|
|
ProcDomainEventTrayChange = 268
|
|
ProcDomainEventPmwakeup = 269
|
|
ProcDomainEventPmsuspend = 270
|
|
ProcDomainSnapshotIsCurrent = 271
|
|
ProcDomainSnapshotHasMetadata = 272
|
|
ProcConnectListAllDomains = 273
|
|
ProcDomainListAllSnapshots = 274
|
|
ProcDomainSnapshotListAllChildren = 275
|
|
ProcDomainEventBalloonChange = 276
|
|
ProcDomainGetHostname = 277
|
|
ProcDomainGetSecurityLabelList = 278
|
|
ProcDomainPinEmulator = 279
|
|
ProcDomainGetEmulatorPinInfo = 280
|
|
ProcConnectListAllStoragePools = 281
|
|
ProcStoragePoolListAllVolumes = 282
|
|
ProcConnectListAllNetworks = 283
|
|
ProcConnectListAllInterfaces = 284
|
|
ProcConnectListAllNodeDevices = 285
|
|
ProcConnectListAllNwfilters = 286
|
|
ProcConnectListAllSecrets = 287
|
|
ProcNodeSetMemoryParameters = 288
|
|
ProcNodeGetMemoryParameters = 289
|
|
ProcDomainBlockCommit = 290
|
|
ProcNetworkUpdate = 291
|
|
ProcDomainEventPmsuspendDisk = 292
|
|
ProcNodeGetCPUMap = 293
|
|
ProcDomainFstrim = 294
|
|
ProcDomainSendProcessSignal = 295
|
|
ProcDomainOpenChannel = 296
|
|
ProcNodeDeviceLookupScsiHostByWwn = 297
|
|
ProcDomainGetJobStats = 298
|
|
ProcDomainMigrateGetCompressionCache = 299
|
|
ProcDomainMigrateSetCompressionCache = 300
|
|
ProcNodeDeviceDetachFlags = 301
|
|
ProcDomainMigrateBegin3Params = 302
|
|
ProcDomainMigratePrepare3Params = 303
|
|
ProcDomainMigratePrepareTunnel3Params = 304
|
|
ProcDomainMigratePerform3Params = 305
|
|
ProcDomainMigrateFinish3Params = 306
|
|
ProcDomainMigrateConfirm3Params = 307
|
|
ProcDomainSetMemoryStatsPeriod = 308
|
|
ProcDomainCreateXMLWithFiles = 309
|
|
ProcDomainCreateWithFiles = 310
|
|
ProcDomainEventDeviceRemoved = 311
|
|
ProcConnectGetCPUModelNames = 312
|
|
ProcConnectNetworkEventRegisterAny = 313
|
|
ProcConnectNetworkEventDeregisterAny = 314
|
|
ProcNetworkEventLifecycle = 315
|
|
ProcConnectDomainEventCallbackRegisterAny = 316
|
|
ProcConnectDomainEventCallbackDeregisterAny = 317
|
|
ProcDomainEventCallbackLifecycle = 318
|
|
ProcDomainEventCallbackReboot = 319
|
|
ProcDomainEventCallbackRtcChange = 320
|
|
ProcDomainEventCallbackWatchdog = 321
|
|
ProcDomainEventCallbackIOError = 322
|
|
ProcDomainEventCallbackGraphics = 323
|
|
ProcDomainEventCallbackIOErrorReason = 324
|
|
ProcDomainEventCallbackControlError = 325
|
|
ProcDomainEventCallbackBlockJob = 326
|
|
ProcDomainEventCallbackDiskChange = 327
|
|
ProcDomainEventCallbackTrayChange = 328
|
|
ProcDomainEventCallbackPmwakeup = 329
|
|
ProcDomainEventCallbackPmsuspend = 330
|
|
ProcDomainEventCallbackBalloonChange = 331
|
|
ProcDomainEventCallbackPmsuspendDisk = 332
|
|
ProcDomainEventCallbackDeviceRemoved = 333
|
|
ProcDomainCoreDumpWithFormat = 334
|
|
ProcDomainFsfreeze = 335
|
|
ProcDomainFsthaw = 336
|
|
ProcDomainGetTime = 337
|
|
ProcDomainSetTime = 338
|
|
ProcDomainEventBlockJob2 = 339
|
|
ProcNodeGetFreePages = 340
|
|
ProcNetworkGetDhcpLeases = 341
|
|
ProcConnectGetDomainCapabilities = 342
|
|
ProcDomainOpenGraphicsFd = 343
|
|
ProcConnectGetAllDomainStats = 344
|
|
ProcDomainBlockCopy = 345
|
|
ProcDomainEventCallbackTunable = 346
|
|
ProcNodeAllocPages = 347
|
|
ProcDomainEventCallbackAgentLifecycle = 348
|
|
ProcDomainGetFsinfo = 349
|
|
ProcDomainDefineXMLFlags = 350
|
|
ProcDomainGetIothreadInfo = 351
|
|
ProcDomainPinIothread = 352
|
|
ProcDomainInterfaceAddresses = 353
|
|
ProcDomainEventCallbackDeviceAdded = 354
|
|
ProcDomainAddIothread = 355
|
|
ProcDomainDelIothread = 356
|
|
ProcDomainSetUserPassword = 357
|
|
ProcDomainRename = 358
|
|
ProcDomainEventCallbackMigrationIteration = 359
|
|
ProcConnectRegisterCloseCallback = 360
|
|
ProcConnectUnregisterCloseCallback = 361
|
|
ProcConnectEventConnectionClosed = 362
|
|
ProcDomainEventCallbackJobCompleted = 363
|
|
ProcDomainMigrateStartPostCopy = 364
|
|
ProcDomainGetPerfEvents = 365
|
|
ProcDomainSetPerfEvents = 366
|
|
ProcDomainEventCallbackDeviceRemovalFailed = 367
|
|
ProcConnectStoragePoolEventRegisterAny = 368
|
|
ProcConnectStoragePoolEventDeregisterAny = 369
|
|
ProcStoragePoolEventLifecycle = 370
|
|
ProcDomainGetGuestVcpus = 371
|
|
ProcDomainSetGuestVcpus = 372
|
|
ProcStoragePoolEventRefresh = 373
|
|
ProcConnectNodeDeviceEventRegisterAny = 374
|
|
ProcConnectNodeDeviceEventDeregisterAny = 375
|
|
ProcNodeDeviceEventLifecycle = 376
|
|
ProcNodeDeviceEventUpdate = 377
|
|
ProcStorageVolGetInfoFlags = 378
|
|
ProcDomainEventCallbackMetadataChange = 379
|
|
ProcConnectSecretEventRegisterAny = 380
|
|
ProcConnectSecretEventDeregisterAny = 381
|
|
ProcSecretEventLifecycle = 382
|
|
ProcSecretEventValueChanged = 383
|
|
ProcDomainSetVcpu = 384
|
|
ProcDomainEventBlockThreshold = 385
|
|
ProcDomainSetBlockThreshold = 386
|
|
ProcDomainMigrateGetMaxDowntime = 387
|
|
ProcDomainManagedSaveGetXMLDesc = 388
|
|
ProcDomainManagedSaveDefineXML = 389
|
|
ProcDomainSetLifecycleAction = 390
|
|
|
|
|
|
// From consts:
|
|
StringMax = 4194304
|
|
DomainListMax = 16384
|
|
CpumapMax = 2048
|
|
VcpuinfoMax = 16384
|
|
CpumapsMax = 8388608
|
|
IothreadInfoMax = 16384
|
|
MigrateCookieMax = 4194304
|
|
NetworkListMax = 16384
|
|
InterfaceListMax = 16384
|
|
StoragePoolListMax = 16384
|
|
StorageVolListMax = 16384
|
|
NodeDeviceListMax = 65536
|
|
NodeDeviceCapsListMax = 65536
|
|
NwfilterListMax = 16384
|
|
DomainSchedulerParametersMax = 16
|
|
DomainBlkioParametersMax = 16
|
|
DomainMemoryParametersMax = 16
|
|
DomainBlockIOTuneParametersMax = 32
|
|
DomainNumaParametersMax = 16
|
|
DomainPerfEventsMax = 64
|
|
DomainBlockCopyParametersMax = 16
|
|
NodeCPUStatsMax = 16
|
|
NodeMemoryStatsMax = 16
|
|
DomainBlockStatsParametersMax = 16
|
|
NodeMaxCells = 1024
|
|
AuthSaslDataMax = 65536
|
|
AuthTypeListMax = 20
|
|
DomainMemoryStatsMax = 1024
|
|
DomainSnapshotListMax = 16384
|
|
DomainBlockPeekBufferMax = 4194304
|
|
DomainMemoryPeekBufferMax = 4194304
|
|
SecurityLabelListMax = 64
|
|
SecretValueMax = 65536
|
|
SecretListMax = 16384
|
|
CPUBaselineMax = 256
|
|
DomainSendKeyMax = 16
|
|
DomainInterfaceParametersMax = 16
|
|
DomainGetCPUStatsNcpusMax = 128
|
|
DomainGetCPUStatsMax = 2048
|
|
DomainDiskErrorsMax = 256
|
|
NodeMemoryParametersMax = 64
|
|
DomainMigrateParamListMax = 64
|
|
DomainJobStatsMax = 64
|
|
ConnectCPUModelsMax = 8192
|
|
DomainFsfreezeMountpointsMax = 256
|
|
NetworkDhcpLeasesMax = 65536
|
|
ConnectGetAllDomainStatsMax = 262144
|
|
DomainEventTunableMax = 2048
|
|
DomainFsinfoMax = 256
|
|
DomainFsinfoDisksMax = 256
|
|
DomainInterfaceMax = 2048
|
|
DomainIPAddrMax = 2048
|
|
DomainGuestVcpuParamsMax = 64
|
|
DomainEventGraphicsIdentityMax = 20
|
|
Program = 0x20008086
|
|
ProtocolVersion = 1
|
|
|
|
)
|