
On 09/26/2013 02:08 AM, Nehal J Wani wrote:
+ +typedef struct _virNetworkDHCPLeases virNetworkDHCPLeases; +typedef virNetworkDHCPLeases *virNetworkDHCPLeasesPtr; +struct _virNetworkDHCPLeases { + long long expirytime; /* Seconds since epoch */ + union { + char *mac; /* MAC address */ + unsigned long iaid; /* Identity association identifier (IAID) */
'unsigned long' is wrong for any new API. It is platform dependent, and makes us have to worry about a 32-bit client talking to a 64-bit host, and reporting OVERFLOW errors if the host sends back an answer larger than 32 bits. If iaid is truly numeric (which I doubt), then use 'unsigned long long'. But more likely, iaid should be a char* and treated as an opaque string, rather than trying to treat it as always being parseable into an integer. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org