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

Eric Blake eblake at redhat.com
Thu May 12 11:53:35 UTC 2011


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 at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110512/c436bd39/attachment-0001.sig>


More information about the libvir-list mailing list