Re: [PATCH] remote: remove special case for getting version

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

 



On 05/12/2011 02:31 AM, Daniel P. Berrange wrote:
> On Wed, May 11, 2011 at 04:50:28PM -0600, Eric Blake wrote:
>> * src/remote/remote_protocol.x (remote_get_version_ret)
>> (remote_get_lib_version_ret): Match public API.
>> * daemon/remote_generator.pl: Drop special case.
>> ---
>>
>> +++ b/src/remote/remote_protocol.x
>> @@ -391,11 +391,11 @@ struct remote_get_type_ret {
>>  };
>>
>>  struct remote_get_version_ret {
>> -    hyper hv_ver;
>> +    unsigned hyper hv_ver;
>>  };
>>
>>  struct remote_get_lib_version_ret {
>> -    hyper lib_ver;
>> +    unsigned hyper lib_ver;
>>  };
> 
> Is this signed/unsigned change definitely compatible on the wire ?

Absolutely.  In XDR, [unsigned] hyper is an 8-byte entity, regardless of
operating system, with the same endianness for both types.  All that
differs is the range, and the signed version is 2's complement, so
either way you are transferring 8 identical bytes over the wire.
http://tools.ietf.org/html/rfc4506.html#page-5

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]