Re: creating stream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2017-04-21 17:34 GMT+03:00 Michal Privoznik <mprivozn@xxxxxxxxxx>:
> So the extra "byte" (in fact 4 bytes) are at 0x0084-0x0087. So this is how
> strings are encoded. There are basically two types of strings when it comes
> to XDR. The first one is nonnull_string, which are encoded [length][string].
> With just this it would be impossible to differentiate between NULL and an
> empty string "" as both would be encoded in the same way. Therefore, there
> is remote_string (libvirt terminology) or xdr_pointer (XDR terminology)
> which encodes a pointer as [bool][pointer] where bool is either 00 00 00 00
> meaning the pointer is NULL or something else (e.g. 00 00 00 01) meaning the
> pointer has a non-NULL value. So long story short, what you can see here is:
>
> 00 00 00 01 00 00 00 07 73 65 72 69 61 6c 30
>
> which is the same as (regroup)
>
> [00 00 00 01] [00 00 00 07] [73 65 72 69 61 6c 30]
>
> which means: the following pointer is a non-NULL pointer, and it is a string
> of the length 7 and the string is "serial0".


Ahh sorry. This is bug in xdr2 package, and i merge pr for it and now
works fine =).
Thanks again for help!

-- 
Vasiliy Tolstov,
e-mail: v.tolstov@xxxxxxxxx

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux