NAME
Protocol::Sys::Virt::UNIXSocket - Helper routines for parsing LibVirt Unix sockets
VERSION
v11.8.0
SYNOPSIS
use Protocol::Sys::Virt::UNIXSocket; # imports 'socket_path'
my $path = socket_path();
DESCRIPTION
Helper functions for LibVirt Unix sockets.
FUNCTIONS
socket_path
my $path = socket_path(type => 'system', mode => 'direct', readonly => 1);
Returns the path name of the socket with the given parameters. The following parameters may be given:
type
system(default)user
mode
legacy(default)directIn case the
hypervisorvalue is missing, the function falls back tolegacymode.
readonly
When passed with a non-zero value, returns the name of the read-only socket.
prefix
Path to prepend to state directory name holding the sockets.
Eg.,
prefix => '/var'causes sockets paths to be rooted at/var/run/libvirtinstead of/run/libvirt.hypervisor
Specifies the name of the hypervisor to connect to; uses the same naming scheme as the protocol part of the URI.
Example values are
qemuandvbox.driver
Alternative name for
hypervisor.
SEE ALSO
LICENSE AND COPYRIGHT
See the LICENSE file in this distribution.