2016-05-20 05:56:27 +03:00
|
|
|
// Copyright 2016 The go-libvirt Authors.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
// Package constants provides shared data for the libvirt package.
|
|
|
|
package constants
|
|
|
|
|
2016-08-31 20:34:49 +03:00
|
|
|
// protocol procedure numbers
|
2016-05-20 05:56:27 +03:00
|
|
|
const (
|
|
|
|
ProgramVersion = 1
|
|
|
|
ProgramRemote = 0x20008086
|
|
|
|
ProgramQEMU = 0x20008087
|
|
|
|
ProgramKeepAlive = 0x6b656570
|
|
|
|
)
|
|
|
|
|
|
|
|
// libvirt procedure identifiers
|
2016-08-31 20:34:49 +03:00
|
|
|
// These are libvirt procedure numbers which correspond to each respective
|
|
|
|
// API call between remote_internal driver and libvirtd. Although stable.
|
|
|
|
// Each call is identified by a unique number which *may change at any time*.
|
|
|
|
//
|
|
|
|
// Examples:
|
|
|
|
// REMOTE_PROC_CONNECT_OPEN = 1
|
|
|
|
// REMOTE_PROC_DOMAIN_DEFINE_XML = 11
|
|
|
|
// REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207,
|
|
|
|
//
|
|
|
|
// See:
|
|
|
|
// https://libvirt.org/git/?p=libvirt.git;a=blob_plain;f=src/remote/remote_protocol.x;hb=HEAD
|
2016-05-20 05:56:27 +03:00
|
|
|
const (
|
2016-08-02 01:43:50 +03:00
|
|
|
ProcConnectOpen = 1
|
|
|
|
ProcConnectClose = 2
|
2016-09-30 18:54:47 +03:00
|
|
|
ProcConnectGetCapabilties = 7
|
2016-12-01 04:37:30 +03:00
|
|
|
ProcDomainGetXMLDesc = 14
|
2016-08-02 01:43:50 +03:00
|
|
|
ProcDomainLookupByName = 23
|
|
|
|
ProcAuthList = 66
|
|
|
|
ProcConnectGetLibVersion = 157
|
2016-08-19 21:31:59 +03:00
|
|
|
ProcDomainMigrateSetMaxSpeed = 207
|
2016-12-02 20:54:04 +03:00
|
|
|
ProcDomainGetState = 212
|
2016-09-29 00:29:46 +03:00
|
|
|
ProcDomainUndefineFlags = 231
|
2016-11-03 06:43:42 +03:00
|
|
|
ProcDomainDestroyFlags = 234
|
2016-08-02 01:43:50 +03:00
|
|
|
ProcConnectListAllDomains = 273
|
2016-08-19 21:31:59 +03:00
|
|
|
ProcMigratePerformParams = 305
|
2016-12-09 19:49:14 +03:00
|
|
|
ProcDomainDefineXMLFlags = 350
|
2016-05-20 05:56:27 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
// qemu procedure identifiers
|
|
|
|
const (
|
|
|
|
QEMUDomainMonitor = 1
|
|
|
|
QEMUConnectDomainMonitorEventRegister = 4
|
|
|
|
QEMUConnectDomainMonitorEventDeregister = 5
|
|
|
|
QEMUDomainMonitorEvent = 6
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
// PacketLengthSize is the packet length, in bytes.
|
|
|
|
PacketLengthSize = 4
|
|
|
|
|
|
|
|
// HeaderSize is the packet header size, in bytes.
|
|
|
|
HeaderSize = 24
|
|
|
|
|
|
|
|
// UUIDSize is the length of a UUID, in bytes.
|
|
|
|
UUIDSize = 16
|
|
|
|
)
|