NAME

Protocol::Sys::Virt::Transport::XDR - Protocol header and error constants and (de)serializers

VERSION

v10.3.3

Based on LibVirt tag v10.3.0

SYNOPSYS

use Protocol::Sys::Virt::Transport::XDR;
my $transport = 'Protocol::Sys::Virt::Transport::XDR';

my $out = '';
my $idx = 0;
my $value = {
   code => 1,
   domain => 1,
   message => 'This is my error',
   level => 1,
   int1 => 0,
   int2 => 0,
};
$transport->serialize_Error($value, $idx, $out);

DESCRIPTION

This module contains the constants and (de)serializers defined by LibVirt to operate the lowest level of the protocol: the transmission frames, which consist of a header and the payload. The elements in this module are defined in libvirt's source code in the file libvirt/src/rpc/virnetprotocol.x.

Identifiers in this module have been transformed to strip their prefix for brevity. These prefixes have been stripped:

  • VIR_NET_MESSAGE_

  • VIR_NET_

  • virNetMessage

  • virNet

CONSTANTS

General

  • INITIAL

  • LEGACY_PAYLOAD_MAX

  • MAX

  • HEADER_MAX

  • PAYLOAD_MAX

  • LEN_MAX

  • STRING_MAX

  • NUM_FDS_MAX

  • HEADER_XDR_LEN

From enums

  • Type

    • CALL

    • REPLY

    • MESSAGE

    • STREAM

    • CALL_WITH_FDS

    • REPLY_WITH_FDS

    • STREAM_HOLE

  • Status

    • OK

    • ERROR

    • CONTINUE

(DE)SERIALIZERS

$transport->serialize_Error($value, $idx, $out);
$transport->deserialize_Error($value, $idx, $inp);

Serializers convert the input provided in $value to their corresponding XDR representation in $out, at index position $idx. Non-zero $idx values can be used to append to or overwrite parts of $out.

Deserializers convert the XDR representation input provided in $inp at index position $idx into their corresponding Perl representation.

  • Type

  • Status

  • Header

  • UUID

  • NonnullString

  • String

  • NonnullDomain

  • NonnullNetwork

  • Domain

  • Network

  • Error

  • StreamHole

LICENSE AND COPYRIGHT

See the LICENSE file in this distribution