qmpv7alpha2

package
v0.8.6-20-g3bb03769 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVENT_ACPI_DEVICE_OST           = EventType("ACPI_DEVICE_OST")
	EVENT_BALLOON_CHANGE            = EventType("BALLOON_CHANGE")
	EVENT_BLOCK_IMAGE_CORRUPTED     = EventType("BLOCK_IMAGE_CORRUPTED")
	EVENT_BLOCK_IO_ERROR            = EventType("BLOCK_IO_ERROR")
	EVENT_BLOCK_JOB_CANCELLED       = EventType("BLOCK_JOB_CANCELLED")
	EVENT_BLOCK_JOB_COMPLETED       = EventType("BLOCK_JOB_COMPLETED")
	EVENT_BLOCK_JOB_ERROR           = EventType("BLOCK_JOB_ERROR")
	EVENT_BLOCK_JOB_PENDING         = EventType("BLOCK_JOB_PENDING")
	EVENT_BLOCK_JOB_READY           = EventType("BLOCK_JOB_READY")
	EVENT_DEVICE_DELETED            = EventType("DEVICE_DELETED")
	EVENT_DEVICE_TRAY_MOVED         = EventType("DEVICE_TRAY_MOVED")
	EVENT_DEVICE_UNPLUG_GUEST_ERROR = EventType("DEVICE_UNPLUG_GUEST_ERROR")
	EVENT_DUMP_COMPLETED            = EventType("DUMP_COMPLETED")
	EVENT_FAILOVER_NEGOTIATED       = EventType("FAILOVER_NEGOTIATED")
	EVENT_GUEST_CRASHLOADED         = EventType("GUEST_CRASHLOADED")
	EVENT_GUEST_PANICKED            = EventType("GUEST_PANICKED")
	EVENT_MEM_UNPLUG_ERRO           = EventType("MEM_UNPLUG_ERRO")
	EVENT_MEMORY_DEVICE_SIZE_CHANGE = EventType("MEMORY_DEVICE_SIZE_CHANGE")
	EVENT_MEMORY_FAILURE            = EventType("MEMORY_FAILURE")
	EVENT_NIC_RX_FILTER_CHANGED     = EventType("NIC_RX_FILTER_CHANGED")
	EVENT_POWERDOWN                 = EventType("POWERDOWN")
	EVENT_PR_MANAGER_STATUS_CHANGED = EventType("PR_MANAGER_STATUS_CHANGED")
	EVENT_QUORUM_FAILURE            = EventType("QUORUM_FAILURE")
	EVENT_RESET                     = EventType("RESET")
	EVENT_RESUME                    = EventType("RESUME")
	EVENT_SHUTDOWN                  = EventType("SHUTDOWN")
	EVENT_STOP                      = EventType("STOP")
	EVENT_SUSPEND                   = EventType("SUSPEND")
	EVENT_UNPLUG_PRIMARY            = EventType("UNPLUG_PRIMARY")
	EVENT_VFU_CLIENT_HANGUP         = EventType("VFU_CLIENT_HANGUP")
	EVENT_VNC_CONNECTED             = EventType("VNC_CONNECTED")
	EVENT_VNC_DISCONNECTED          = EventType("VNC_DISCONNECTED")
	EVENT_VSERPORT_CHANGE           = EventType("VSERPORT_CHANGE")
	EVENT_WAKEUP                    = EventType("WAKEUP")
	EVENT_WATCHDOG                  = EventType("WATCHDOG")
)
View Source
const (
	NET_CLIENT_DRIVER_NONE       = NetClientDriver("none")
	NET_CLIENT_DRIVER_NIC        = NetClientDriver("nic")
	NET_CLIENT_DRIVER_USER       = NetClientDriver("user")
	NET_CLIENT_DRIVER_TAP        = NetClientDriver("tap")
	NET_CLIENT_DRIVER_L2TPV3     = NetClientDriver("l2tpv3")
	NET_CLIENT_DRIVER_SOCKET     = NetClientDriver("socket")
	NET_CLIENT_DRIVER_STREAM     = NetClientDriver("stream")
	NET_CLIENT_DRIVER_DGRAM      = NetClientDriver("dgram")
	NET_CLIENT_DRIVER_VDE        = NetClientDriver("vde")
	NET_CLIENT_DRIVER_BRIDGE     = NetClientDriver("bridge")
	NET_CLIENT_DRIVER_HUBPORT    = NetClientDriver("hubport")
	NET_CLIENT_DRIVER_NETMAP     = NetClientDriver("netmap")
	NET_CLIENT_DRIVER_VHOST_USER = NetClientDriver("vhost-user")
	NET_CLIENT_DRIVER_VHOST_VDPA = NetClientDriver("vhost-vdpa")
)
View Source
const (
	// filter assigned packets according to the mac-table
	RX_STATE_NORMAL = RxState("normal")
	// don't receive any assigned packet
	RX_STATE_NONE = RxState("none")
	// receive all assigned packets
	RX_STATE_ALL = RxState("all")
)
View Source
const (
	SHUTDOWN_NONE                  = ShutdownCause("none")
	SHUTDOWN_HOST_ERROR            = ShutdownCause("host-error")
	SHUTDOWN_HOST_QMP_QUIT         = ShutdownCause("host-qmp-quit")
	SHUTDOWN_HOST_QMP_SYSTEM_RESET = ShutdownCause("host-qmp-system-reset")
	SHUTDOWN_HOST_SIGNAL           = ShutdownCause("host-signal")
	SHUTDOWN_HOST_UI               = ShutdownCause("host-ui")
	SHUTDOWN_GUEST_SHUTDOWN        = ShutdownCause("guest-shutdown")
	SHUTDOWN_GUEST_RESET           = ShutdownCause("guest-reset")
	SHUTDOWN_GUEST_PANIC           = ShutdownCause("guest-panic")
	SHUTDOWN_SUBSYSTEM_RESET       = ShutdownCause("subsystem-reset")
)
View Source
const (
	RUN_STATE_COLO           = RunState("colo")
	RUN_STATE_DEBUG          = RunState("debug")
	RUN_STATE_FINISH_MIGRATE = RunState("finish-migrate")
	RUN_STATE_GUEST_PANICKED = RunState("guest-panicked")
	RUN_STATE_INMIGRATE      = RunState("inmigrate")
	RUN_STATE_INTERNAL_ERROR = RunState("internal-error")
	RUN_STATE_IO_ERROR       = RunState("io-error")
	RUN_STATE_PAUSED         = RunState("paused")
	RUN_STATE_POSTMIGRATE    = RunState("postmigrate")
	RUN_STATE_PRELAUNCH      = RunState("prelaunch")
	RUN_STATE_RESTORE_VM     = RunState("restore-vm")
	RUN_STATE_RUNNING        = RunState("running")
	RUN_STATE_SAVE_VM        = RunState("save-vm")
	RUN_STATE_SHUTDOWN       = RunState("shutdown")
	RUN_STATE_SUSPENDED      = RunState("suspended")
	RUN_STATE_WATCHDOG       = RunState("watchdog")
)
View Source
const (
	// Internet address
	SOCKET_ADDRESS_TYPE_INET = SocketAddressType("inet")
	// Unix domain socket
	SOCKET_ADDRESS_TYPE_UNIX = SocketAddressType("unix")
	// VMCI address
	SOCKET_ADDRESS_TYPE_VSOCK = SocketAddressType("vsock")
	// decimal is for file descriptor number, otherwise a file descriptor name.
	// Named file descriptors are permitted in monitor commands, in combination
	// with the 'getfd' command. Decimal file descriptors are permitted at startup
	// or other contexts where no monitor context is active.
	SOCKET_ADDRESS_TYPE_FD = SocketAddressType("fd")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CapabilitiesRequest

type CapabilitiesRequest struct {
	Execute string `json:"execute" default:"qmp_capabilities"`

	Arguments CapabilitiesRequestArguments `json:"arguments,omitempty"`
}

type CapabilitiesRequestArguments

type CapabilitiesRequestArguments struct {
	Enable []Capability `json:"enable"`
}

type Capability

type Capability string

func Capabilitys

func Capabilitys() []Capability

func (Capability) String

func (e Capability) String() string

type ContRequest

type ContRequest struct {
	Execute string `json:"execute" default:"cont"`
}

type ContResponse

type ContResponse struct {
}

type ErrorResponse

type ErrorResponse struct {
	Class       string `json:"class"`
	Cescription string `json:"desc"`
}

type EventType

type EventType string

func EventTypes

func EventTypes() []EventType

func (EventType) String

func (e EventType) String() string

type Greeting

type Greeting struct {
	Version      GreetingVersion `json:"version"`
	Capabilities []Capability    `json:"capabilities"`
}

type GreetingRequest

type GreetingRequest struct {
}

type GreetingResponse

type GreetingResponse struct {
	Qmp Greeting `json:"QMP"`
}

type GreetingVersion

type GreetingVersion struct {
	Qemu    GreetingVersionTriple `json:"qemu"`
	Package string                `json:"package"`
}

type GreetingVersionTriple

type GreetingVersionTriple struct {
	Major uint32 `json:"major"`
	Minor uint32 `json:"minor"`
	Micro uint32 `json:"micro"`
}

type InetSocketAddress

type InetSocketAddress struct {
	// host part of the address
	Host string `json:"host"`
	// port part of the address
	Port string `json:"port"`
	// true if the host/port are guaranteed to be numeric, false if name
	// resolution should be attempted.  Defaults to false. (Since 2.9)
	Numeric bool `json:"numeric"`
	// If present, this is range of possible addresses, with port between `port`
	// and `to`.
	To int32 `json:"to"`
	// whether to accept IPv4 addresses, default try both IPv4 and IPv6
	Ipv4 bool `json:"ipv4"`
	// whether to accept IPv6 addresses, default try both IPv4 and IPv6
	Ipv6 bool `json:"ipv6"`
	// enable keep-alive when connecting to this socket.  Not supported for
	// passive sockets.  (Since 4.2)
	KeepAlive bool `json:"keep-alive"`
	// enable multi-path TCP. (Since 6.1)
	Mptcp bool `json:"mptcp"`
}

Captures a socket address or address range in the Internet namespace.

Since: 1.3

type KvmInfo

type KvmInfo struct {
	Enabled bool `json:"enabled"`
	Present bool `json:"present"`
}

type NetClientDriver

type NetClientDriver string

Available netdev drivers.

func NetClientDrivers

func NetClientDrivers() []NetClientDriver

func (NetClientDriver) String

func (e NetClientDriver) String() string

type NetLegacyNicOptions

type NetLegacyNicOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// id of -netdev to connect to
	Netdev string `json:"netdev"`
	// MAC address
	Macaddr string `json:"macaddr"`
	// device model (e1000, rtl8139, virtio etc.)
	Model string `json:"model"`
	// PCI device address
	Addr string `json:"addr"`
	// number of MSI-x vectors, 0 to disable MSI-X
	Vectors uint32 `json:"vectors"`
}

Create a new Network Interface Card.

Since: 1.2

type NetdevAddDevBridgeRequest

type NetdevAddDevBridgeRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevBridgeOptions `json:"arguments"`
}

type NetdevAddDevDgramRequest

type NetdevAddDevDgramRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevDgramOptions `json:"arguments"`
}

type NetdevAddDevHubPortRequest

type NetdevAddDevHubPortRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevHubPortOptions `json:"arguments"`
}

type NetdevAddDevL2TPv3Request

type NetdevAddDevL2TPv3Request struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevL2TPv3Options `json:"arguments"`
}

type NetdevAddDevNetmapRequest

type NetdevAddDevNetmapRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevNetmapOptions `json:"arguments"`
}

type NetdevAddDevSocketRequest

type NetdevAddDevSocketRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevSocketOptions `json:"arguments"`
}

type NetdevAddDevStreamRequest

type NetdevAddDevStreamRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevStreamOptions `json:"arguments"`
}

type NetdevAddDevTapRequest

type NetdevAddDevTapRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevTapOptions `json:"arguments"`
}

type NetdevAddDevUserRequest

type NetdevAddDevUserRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevUserOptions `json:"arguments"`
}

type NetdevAddDevVdeRequest

type NetdevAddDevVdeRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevVdeOptions `json:"arguments"`
}

type NetdevAddDevVhostUserRequest

type NetdevAddDevVhostUserRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevVhostUserOptions `json:"arguments"`
}

type NetdevAddDevVhostVDPARequest

type NetdevAddDevVhostVDPARequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevVhostVDPAOptions `json:"arguments"`
}

type NetdevAddDevVmnetBridgedRequest

type NetdevAddDevVmnetBridgedRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevVmnetBridgedOptions `json:"arguments"`
}

type NetdevAddDevVmnetHostRequest

type NetdevAddDevVmnetHostRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevVmnetHostOptions `json:"arguments"`
}

type NetdevAddDevVmnetSharedRequest

type NetdevAddDevVmnetSharedRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetdevVmnetSharedOptions `json:"arguments"`
}

type NetdevAddLegacyNicRequest

type NetdevAddLegacyNicRequest struct {
	Execute string `json:"execute" default:"netdev_add"`

	Arguments NetLegacyNicOptions `json:"arguments"`
}

type NetdevBridgeOptions

type NetdevBridgeOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// bridge name
	Br string `json:"br"`
	// command to execute to configure bridge
	Helper string `json:"helper"`
}

Connect a host TAP network interface to a host bridge device.

Since: 1.2

type NetdevDelRequest

type NetdevDelRequest struct {
	Execute string `json:"execute" default:"netdev_del"`

	Arguments NetdevDelRequestArguments `json:"arguments"`
}

type NetdevDelRequestArguments

type NetdevDelRequestArguments struct {
	Id string `json:"id"`
}

type NetdevDgramOptions

type NetdevDgramOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// local address
	Local SocketAddress `json:"local"`
	// remote address
	Remote SocketAddress `json:"remote"`
}

Configuration info for datagram socket netdev.

Only SocketAddress types 'unix', 'inet' and 'fd' are supported.

If remote address is present and it's a multicast address, local address is optional. Otherwise local address is required and remote address is optional.

.. table:: Valid parameters combination table

:widths: auto

=============  ========  =====
remote         local     okay?
=============  ========  =====
absent         absent    no
absent         not fd    no
absent         fd        yes
multicast      absent    yes
multicast      present   yes
not multicast  absent    no
not multicast  present   yes
=============  ========  =====

Since: 7.2

type NetdevHubPortOptions

type NetdevHubPortOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// hub identifier number
	Hubid int32 `json:"hubid"`
	// used to connect hub to a netdev instead of a device (since 2.12)
	Netdev string `json:"netdev"`
}

Connect two or more net clients through a software hub.

Since: 1.2

type NetdevL2TPv3Options

type NetdevL2TPv3Options struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// source address
	Src string `json:"src"`
	// destination address
	Dst string `json:"dst"`
	// source port - mandatory for udp, optional for ip
	Srcport string `json:"srcport"`
	// destination port - mandatory for udp, optional for ip
	Dstport string `json:"dstport"`
	// force the use of ipv6
	Ipv6 bool `json:"ipv6"`
	// use the udp version of l2tpv3 encapsulation
	Udp bool `json:"udp"`
	// use 64 bit cookies
	Cookie64 bool `json:"cookie64"`
	// have sequence counter
	Counter bool `json:"counter"`
	// pin sequence counter to zero - workaround for buggy implementations or
	// networks with packet reorder
	Pincounter bool `json:"pincounter"`
	// 32 or 64 bit transmit cookie
	Txcookie uint64 `json:"txcookie"`
	// 32 or 64 bit receive cookie
	Rxcookie uint64 `json:"rxcookie"`
	// 32 bit transmit session
	Txsession uint32 `json:"txsession"`
	// 32 bit receive session - if not specified set to the same value as transmit
	Rxsession uint32 `json:"rxsession"`
	// additional offset - allows the insertion of additional application-specific
	// data before the packet payload
	Offset uint32 `json:"offset"`
}

Configure an Ethernet over L2TPv3 tunnel.

Since: 2.1

type NetdevNetmapOptions

type NetdevNetmapOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// Either the name of an existing network interface supported by netmap, or
	// the name of a VALE port (created on the fly). A VALE port name is in the
	// form 'valeXXX:YYY', where XXX and YYY are non-negative integers. XXX
	// identifies a switch and YYY identifies a port of the switch. VALE ports
	// having the same XXX are therefore connected to the same switch.
	Ifname string `json:"ifname"`
	// path of the netmap device (default: '/dev/netmap').
	Devname string `json:"devname"`
}

Connect a client to a netmap-enabled NIC or to a VALE switch port

Since: 2.0

type NetdevSocketOptions

type NetdevSocketOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// file descriptor of an already opened socket
	Fd string `json:"fd"`
	// port number, and optional hostname, to listen on
	Listen string `json:"listen"`
	// port number, and optional hostname, to connect to
	Connect string `json:"connect"`
	// UDP multicast address and port number
	Mcast string `json:"mcast"`
	// source address and port for multicast and udp packets
	Localaddr string `json:"localaddr"`
	// UDP unicast address and port number
	Udp string `json:"udp"`
}

Socket netdevs are used to establish a network connection to another QEMU virtual machine via a TCP socket.

Since: 1.2

type NetdevStreamOptions

type NetdevStreamOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// socket address to listen on (server=true) or connect to (server=false)
	Addr SocketAddress `json:"addr"`
	// create server socket (default: false)
	Server bool `json:"server"`
}

Configuration info for stream socket netdev

Only SocketAddress types 'unix', 'inet' and 'fd' are supported.

Since: 7.2

type NetdevTapOptions

type NetdevTapOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// interface name
	Ifname string `json:"ifname"`
	// file descriptor of an already opened tap
	Fd string `json:"fd"`
	// multiple file descriptors of already opened multiqueue capable tap
	Fds string `json:"fds"`
	// script to initialize the interface
	Script string `json:"script"`
	// script to shut down the interface
	Downscript string `json:"downscript"`
	// bridge name (since 2.8)
	Br string `json:"br"`
	// command to execute to configure bridge
	Helper string `json:"helper"`
	// send buffer limit. Understands [TGMKkb] suffixes.
	Sndbuf uint64 `json:"sndbuf"`
	// enable the IFF_VNET_HDR flag on the tap interface
	VnetHdr bool `json:"vnet_hdr"`
	// enable vhost-net network accelerator
	Vhost bool `json:"vhost"`
	// file descriptor of an already opened vhost net device
	Vhostfd string `json:"vhostfd"`
	// file descriptors of multiple already opened vhost net devices
	Vhostfds string `json:"vhostfds"`
	// vhost on for non-MSIX virtio guests
	Vhostforce bool `json:"vhostforce"`
	// number of queues to be created for multiqueue capable tap
	Queues uint32 `json:"queues"`
	// maximum number of microseconds that could be spent on busy polling for tap
	// (since 2.7)
	PollUs uint32 `json:"poll-us"`
}

Used to configure a host TAP network interface backend.

Since: 1.2

type NetdevUserOptions

type NetdevUserOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// client hostname reported by the builtin DHCP server
	Hostname string `json:"hostname"`
	// isolate the guest from the host
	Restrict bool `json:"restrict"`
	// whether to support IPv4, default true for enabled (since 2.6)
	Ipv4 bool `json:"ipv4"`
	// whether to support IPv6, default true for enabled (since 2.6)
	Ipv6 bool `json:"ipv6"`
	// legacy parameter, use net= instead
	Ip string `json:"ip"`
	// IP network address that the guest will see, in the form addr[/netmask] The
	// netmask is optional, and can be either in the form a.b.c.d or as a number
	// of valid top-most bits. Default is 10.0.2.0/24.
	Net string `json:"net"`
	// guest-visible address of the host
	Host string `json:"host"`
	// root directory of the built-in TFTP server
	Tftp string `json:"tftp"`
	// BOOTP filename, for use with tftp=
	Bootfile string `json:"bootfile"`
	// the first of the 16 IPs the built-in DHCP server can assign
	Dhcpstart string `json:"dhcpstart"`
	// guest-visible address of the virtual nameserver
	Dns string `json:"dns"`
	// list of DNS suffixes to search, passed as DHCP option to the guest
	Dnssearch string `json:"dnssearch"`
	// guest-visible domain name of the virtual nameserver (since 3.0)
	Domainname string `json:"domainname"`
	// IPv6 network prefix (default is fec0::) (since 2.6). The network prefix is
	// given in the usual hexadecimal IPv6 address notation.
	Ipv6Prefix string `json:"ipv6-prefix"`
	// IPv6 network prefix length (default is 64) (since 2.6)
	Ipv6Prefixlen int64 `json:"ipv6-prefixlen"`
	// guest-visible IPv6 address of the host (since 2.6)
	Ipv6Host string `json:"ipv6-host"`
	// guest-visible IPv6 address of the virtual nameserver (since 2.6)
	Ipv6Dns string `json:"ipv6-dns"`
	// root directory of the built-in SMB server
	Smb string `json:"smb"`
	// IP address of the built-in SMB server
	Smbserver string `json:"smbserver"`
	// redirect incoming TCP or UDP host connections to guest endpoints
	Hostfwd string `json:"hostfwd"`
	// forward guest TCP connections
	Guestfwd string `json:"guestfwd"`
	// RFC2132 "TFTP server name" string (Since 3.1)
	TftpServerName string `json:"tftp-server-name"`
}

Use the user mode network stack which requires no administrator privilege to run.

Since: 1.2

type NetdevVdeOptions

type NetdevVdeOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// socket path
	Sock string `json:"sock"`
	// port number
	Port int32 `json:"port"`
	// group owner of socket
	Group string `json:"group"`
	// permissions for socket
	Mode int32 `json:"mode"`
}

Connect to a vde switch running on the host.

Since: 1.2

type NetdevVhostUserOptions

type NetdevVhostUserOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// name of a unix socket chardev
	Chardev string `json:"chardev"`
	// vhost on for non-MSIX virtio guests (default: false).
	Vhostforce bool `json:"vhostforce"`
	// number of queues to be created for multiqueue vhost-user (default: 1)
	// (Since 2.5)
	Queues int32 `json:"queues"`
}

Vhost-user network backend

Since: 2.1

type NetdevVhostVDPAOptions

type NetdevVhostVDPAOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// path of vhost-vdpa device (default:'/dev/vhost-vdpa-0')
	Vhostdev string `json:"vhostdev"`
	// file descriptor of an already opened vhost vdpa device
	Vhostfd string `json:"vhostfd"`
	// number of queues to be created for multiqueue vhost-vdpa (default: 1)
	Queues int32 `json:"queues"`
	// Start device with (experimental) shadow virtqueue. (Since 7.1) (default:
	// false). `x-svq` is experimental.
	XSvq bool `json:"x-svq"`
}

Vhost-vdpa network backend

vDPA device is a device that uses a datapath which complies with the virtio specifications with a vendor specific control path.

Since: 5.1

type NetdevVmnetBridgedOptions

type NetdevVmnetBridgedOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// The name of the physical interface to be bridged.
	Ifname string `json:"ifname"`
	// Enable isolation for this interface. Interface isolation ensures that vmnet
	// interface is not able to communicate with any other vmnet interfaces. Only
	// communication with host is allowed. Requires at least macOS Big Sur 11.0.
	Isolated bool `json:"isolated"`
}

vmnet (bridged mode) network backend.

Bridges the vmnet interface with a physical network interface.

Since: 7.1

type NetdevVmnetHostOptions

type NetdevVmnetHostOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// The starting IPv4 address to use for the interface. Must be in the private
	// IP range (RFC 1918). Must be specified along with @end-address and
	// @subnet-mask. This address is used as the gateway address. The subsequent
	// address up to and including end-address are placed in the DHCP pool.
	StartAddress string `json:"start-address"`
	// The DHCP IPv4 range end address to use for the interface. Must be in the
	// private IP range (RFC 1918). Must be specified along with @start-address
	// and @subnet-mask.
	EndAddress string `json:"end-address"`
	// The IPv4 subnet mask to use on the interface. Must be specified along with
	// @start-address and @subnet-mask.
	SubnetMask string `json:"subnet-mask"`
	// Enable isolation for this interface. Interface isolation ensures that vmnet
	// interface is not able to communicate with any other vmnet interfaces. Only
	// communication with host is allowed. Requires at least macOS Big Sur 11.0.
	Isolated bool `json:"isolated"`
	// The identifier (UUID) to uniquely identify the isolated network vmnet
	// interface should be added to. If set, no DHCP service is provided for this
	// interface and network communication is allowed only with other interfaces
	// added to this network identified by the UUID. Requires at least macOS Big
	// Sur 11.0.
	NetUuid string `json:"net-uuid"`
}

vmnet (host mode) network backend.

Allows the vmnet interface to communicate with other vmnet interfaces that are in host mode and also with the host.

Since: 7.1

type NetdevVmnetSharedOptions

type NetdevVmnetSharedOptions struct {
	// identifier for monitor commands.
	Id string `json:"id"`
	// Specify the driver used for interpreting remaining arguments.
	Type NetClientDriver `json:"type"`
	// The starting IPv4 address to use for the interface. Must be in the private
	// IP range (RFC 1918). Must be specified along with @end-address and
	// @subnet-mask. This address is used as the gateway address. The subsequent
	// address up to and including end-address are placed in the DHCP pool.
	StartAddress string `json:"start-address"`
	// The DHCP IPv4 range end address to use for the interface. Must be in the
	// private IP range (RFC 1918). Must be specified along with @start-address
	// and @subnet-mask.
	EndAddress string `json:"end-address"`
	// The IPv4 subnet mask to use on the interface. Must be specified along with
	// @start-address and @subnet-mask.
	SubnetMask string `json:"subnet-mask"`
	// Enable isolation for this interface. Interface isolation ensures that vmnet
	// interface is not able to communicate with any other vmnet interfaces. Only
	// communication with host is allowed. Requires at least macOS Big Sur 11.0.
	Isolated bool `json:"isolated"`
	// The IPv6 prefix to use into guest network. Must be a unique local address
	// i.e. start with fd00::/8 and have length of 64.
	Nat66Prefix string `json:"nat66-prefix"`
}

vmnet (shared mode) network backend.

Allows traffic originating from the vmnet interface to reach the Internet through a network address translator (NAT). The vmnet interface can communicate with the host and with other shared mode interfaces on the same subnet. If no DHCP settings, subnet mask and IPv6 prefix specified, the interface can communicate with any of other interfaces in shared mode.

Since: 7.1

type QEMUMachineProtocolClient

type QEMUMachineProtocolClient struct {
	// contains filtered or unexported fields
}

func NewQEMUMachineProtocolClient

func NewQEMUMachineProtocolClient(conn io.ReadWriteCloser) *QEMUMachineProtocolClient

func (*QEMUMachineProtocolClient) Capabilities

func (c *QEMUMachineProtocolClient) Capabilities(req CapabilitiesRequest) (*any, error)

func (*QEMUMachineProtocolClient) Close

func (c *QEMUMachineProtocolClient) Close() error

func (*QEMUMachineProtocolClient) Cont

func (*QEMUMachineProtocolClient) Greeting

func (*QEMUMachineProtocolClient) NetdevAddDevBridge

func (c *QEMUMachineProtocolClient) NetdevAddDevBridge(req NetdevAddDevBridgeRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevDgram

func (c *QEMUMachineProtocolClient) NetdevAddDevDgram(req NetdevAddDevDgramRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevHubPort

func (c *QEMUMachineProtocolClient) NetdevAddDevHubPort(req NetdevAddDevHubPortRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevL2TPv3

func (c *QEMUMachineProtocolClient) NetdevAddDevL2TPv3(req NetdevAddDevL2TPv3Request) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevNetmap

func (c *QEMUMachineProtocolClient) NetdevAddDevNetmap(req NetdevAddDevNetmapRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevSocket

func (c *QEMUMachineProtocolClient) NetdevAddDevSocket(req NetdevAddDevSocketRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevStream

func (c *QEMUMachineProtocolClient) NetdevAddDevStream(req NetdevAddDevStreamRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevTap

func (c *QEMUMachineProtocolClient) NetdevAddDevTap(req NetdevAddDevTapRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevUser

func (c *QEMUMachineProtocolClient) NetdevAddDevUser(req NetdevAddDevUserRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevVde

func (c *QEMUMachineProtocolClient) NetdevAddDevVde(req NetdevAddDevVdeRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevVhostUser

func (c *QEMUMachineProtocolClient) NetdevAddDevVhostUser(req NetdevAddDevVhostUserRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevVhostVDPA

func (c *QEMUMachineProtocolClient) NetdevAddDevVhostVDPA(req NetdevAddDevVhostVDPARequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevVmnetBridged

func (c *QEMUMachineProtocolClient) NetdevAddDevVmnetBridged(req NetdevAddDevVmnetBridgedRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevVmnetHost

func (c *QEMUMachineProtocolClient) NetdevAddDevVmnetHost(req NetdevAddDevVmnetHostRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddDevVmnetShared

func (c *QEMUMachineProtocolClient) NetdevAddDevVmnetShared(req NetdevAddDevVmnetSharedRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevAddLegacyNic

func (c *QEMUMachineProtocolClient) NetdevAddLegacyNic(req NetdevAddLegacyNicRequest) (*any, error)

func (*QEMUMachineProtocolClient) NetdevDel

func (c *QEMUMachineProtocolClient) NetdevDel(req NetdevDelRequest) (*any, error)

func (*QEMUMachineProtocolClient) QueryKvm

func (*QEMUMachineProtocolClient) QueryRxFilter

func (*QEMUMachineProtocolClient) QueryStatus

func (*QEMUMachineProtocolClient) Quit

func (c *QEMUMachineProtocolClient) SetLink(req SetLinkRequest) (*any, error)

func (*QEMUMachineProtocolClient) Stop

func (*QEMUMachineProtocolClient) SystemPowerdown

func (c *QEMUMachineProtocolClient) SystemPowerdown(req SystemPowerdownRequest) (*any, error)

func (*QEMUMachineProtocolClient) SystemReset

func (c *QEMUMachineProtocolClient) SystemReset(req SystemResetRequest) (*any, error)

func (*QEMUMachineProtocolClient) SystemWakeup

func (c *QEMUMachineProtocolClient) SystemWakeup(req SystemWakeupRequest) (*any, error)

type QueryKvmRequest

type QueryKvmRequest struct {
	Execute string `json:"execute" default:"query-kvm"`
}

type QueryKvmResponse

type QueryKvmResponse struct {
	Return KvmInfo `json:"return"`
}

type QueryRxFilterRequest

type QueryRxFilterRequest struct {
	Execute string `json:"execute" default:"query-rx-filter"`

	Arguments QueryRxFilterRequestArguments `json:"arguments"`
}

type QueryRxFilterRequestArguments

type QueryRxFilterRequestArguments struct {
	Name string `json:"name"`
}

type QueryRxFilterResponse

type QueryRxFilterResponse struct {
	// net client name
	Name string `json:"name"`
	// whether promiscuous mode is enabled
	Promiscuous bool `json:"promiscuous"`
	// multicast receive state
	Multicast RxState `json:"multicast"`
	// unicast receive state
	Unicast RxState `json:"unicast"`
	// vlan receive state (Since 2.0)
	Vlan RxState `json:"vlan"`
	// whether to receive broadcast
	BroadcastAllowed bool `json:"broadcast-allowed"`
	// multicast table is overflowed or not
	MulticastOverflow bool `json:"multicast-overflow"`
	// unicast table is overflowed or not
	UnicastOverflow bool `json:"unicast-overflow"`
	// the main macaddr string
	MainMac string `json:"main-mac"`
	// a list of active vlan id
	VlanTable []int32 `json:"vlan-table"`
	// a list of unicast macaddr string
	UnicastTable []string `json:"unicast-table"`
	// a list of multicast macaddr string
	MulticastTable []string `json:"multicast-table"`
}

Rx-filter information for a NIC.

type QueryStatusRequest

type QueryStatusRequest struct {
	Execute string `json:"execute" default:"query-status"`
}

type QueryStatusResponse

type QueryStatusResponse struct {
	Return StatusInfo `json:"return"`
}

type QuitRequest

type QuitRequest struct {
	Execute string `json:"execute" default:"quit"`
}

type QuitResponse

type QuitResponse struct {
}

type RunState

type RunState string

func RunStates

func RunStates() []RunState

func (RunState) String

func (e RunState) String() string

type RxState

type RxState string

Packets receiving state

Since: 1.6

func RxStates

func RxStates() []RxState

func (RxState) String

func (e RxState) String() string

type SetLinkRequest

type SetLinkRequest struct {
	Execute string `json:"execute" default:"set_link"`

	Arguments SetLinkRequestArguments `json:"arguments,omitempty"`
}

type SetLinkRequestArguments

type SetLinkRequestArguments struct {
	Name string `json:"name"`
	Up   bool   `json:"up"`
}

type ShutdownCause

type ShutdownCause string

func ShutdownCauses

func ShutdownCauses() []ShutdownCause

func (ShutdownCause) String

func (e ShutdownCause) String() string

type SocketAddress

type SocketAddress struct {
	Type  SocketAddressType  `json:"type"`
	Inet  InetSocketAddress  `json:"inet"`
	Unix  UnixSocketAddress  `json:"unix"`
	Vsock VsockSocketAddress `json:"vsock"`
	Fd    string             `json:"fd"`
}

Captures the address of a socket, which could also be a named file descriptor

Since: 2.9

type SocketAddressType

type SocketAddressType string

Available SocketAddress types

Since: 2.9

func SocketAddressTypes

func SocketAddressTypes() []SocketAddressType

func (SocketAddressType) String

func (e SocketAddressType) String() string

type StatusInfo

type StatusInfo struct {
	Running    bool     `json:"running"`
	SingleStep bool     `json:"singlestep"`
	Status     RunState `json:"status"`
}

type StopRequest

type StopRequest struct {
	Execute string `json:"execute" default:"stop"`
}

type StopResponse

type StopResponse struct {
}

type SystemPowerdownRequest

type SystemPowerdownRequest struct {
	Execute string `json:"execute" default:"system_powerdown"`
}

type SystemResetRequest

type SystemResetRequest struct {
	Execute string `json:"execute" default:"system_reset"`
}

type SystemWakeupRequest

type SystemWakeupRequest struct {
	Execute string `json:"execute" default:"system_Wakeup"`
}

type UnixSocketAddress

type UnixSocketAddress struct {
	// filesystem path to use
	Path string `json:"path"`
	// if true, this is a Linux abstract socket address.  `path` will be prefixed
	// by a null byte, and optionally padded with null bytes.  Defaults to false.
	// (Since 5.1)
	Abstract bool `json:"abstract"`
	// if false, pad an abstract socket address with enough null bytes to make it
	// fill struct sockaddr_un member sun_path. Defaults to true.  (Since 5.1)
	Tight bool `json:"tight"`
}

Captures a socket address in the local ("Unix socket") namespace.

Since: 1.3

type VsockSocketAddress

type VsockSocketAddress struct {
	// unique host identifier
	Cid string `json:"cid"`
	// port
	Port string `json:"port"`
}

Captures a socket address in the vsock namespace.

Note: string types are used to allow for possible future hostname or

service resolution support.

Since: 2.8

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL