<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>Thanks Matthias</div><div><br></div><div>works great : )</div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Matthias Bolte <matthias.bolte@googlemail.com><br><b><span style="font-weight: bold;">To:</span></b> Shahar Klein <shaharklein@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> libvir-list@redhat.com<br><b><span style="font-weight: bold;">Sent:</span></b> Monday, September 14, 2009 3:57:52 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [libvirt] Interface driver and ESX support<br></font><br>Okay, I finally got the patches cleaned
 up.<br><br>I just posted this 12 patches series to the mailing list. Apply them<br>all to an up to date git clone and apply the attached, updated ESX<br>interface driver stub patch in the end.<br><br>Patch 6 of 12 adds the binding for HostCpuIdInfo and contains the<br>functions to handle ArrayOf* types.<br><br>Matthias<br><br>2009/9/13 Shahar Klein <<a ymailto="mailto:shaharklein@yahoo.com" href="mailto:shaharklein@yahoo.com">shaharklein@yahoo.com</a>>:<br>> I see<br>> You are making my (coding) life easier : )<br>> thanks<br>> ________________________________<br>> From: Matthias Bolte <<a ymailto="mailto:matthias.bolte@googlemail.com" href="mailto:matthias.bolte@googlemail.com">matthias.bolte@googlemail.com</a>><br>> To: Shahar Klein <<a ymailto="mailto:shaharklein@yahoo.com" href="mailto:shaharklein@yahoo.com">shaharklein@yahoo.com</a>><br>> Cc: <a ymailto="mailto:libvir-list@redhat.com"
 href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><br>> Sent: Sunday, September 13, 2009 4:39:22 PM<br>> Subject: Re: [libvirt] Interface driver and ESX support<br>><br>> No, as I said before you should wait until you can use the unpublished<br>> binding of HostCpuIdInfo as an example. This also includes the code to<br>> handle ArrayOf* types. I'm currently cleaning up this patches (didn't<br>> have time on thursday for that) and will post them today, just wait<br>> for this patches, because they will help you.<br>><br>> Matthias<br>><br>> 2009/9/13 Shahar Klein <<a ymailto="mailto:shaharklein@yahoo.com" href="mailto:shaharklein@yahoo.com">shaharklein@yahoo.com</a>>:<br>>> I've defined (among others):<br>>> int esxVI_PhysicalNic_CastListFromAnyType(virConnectPtr conn,<br>>> esxVI_AnyType<br>>> *anyType, esxVI_PhysicalNic **pNicList);<br>>> but runing it returns somthing
 like:<br>>> Expecting type 'PhysicalNic' but found 'ArrayOfPhysicalNic'<br>>> Does it mean I should also implement:<br>>> esxVI_ArrayOfPhysicalNic_CastListFromAnyType()<br>>> and all the funcs/type definition coming with it?<br>>> thanks<br>>> Shahar<br>>> ________________________________<br>>> From: Matthias Bolte <<a ymailto="mailto:matthias.bolte@googlemail.com" href="mailto:matthias.bolte@googlemail.com">matthias.bolte@googlemail.com</a>><br>>> To: Shahar Klein <<a ymailto="mailto:shaharklein@yahoo.com" href="mailto:shaharklein@yahoo.com">shaharklein@yahoo.com</a>><br>>> Cc: <a ymailto="mailto:libvir-list@redhat.com" href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><br>>> Sent: Thursday, September 10, 2009 6:24:25 PM<br>>> Subject: Re: [libvirt] Interface driver and ESX support<br>>><br>>> 2009/9/10 Shahar Klein <<a
 ymailto="mailto:shaharklein@yahoo.com" href="mailto:shaharklein@yahoo.com">shaharklein@yahoo.com</a>>:<br>>>> I'm not sure what you mean about mapping<br>>>> lets take the pnics as a study case for me<br>>>> do I need to define a structure similar to this:<br>>>><br>>>><br>>>> <a href="http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.PhysicalNic.html" target="_blank">http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.PhysicalNic.html</a><br>>>> and also take care for it's allocation?<br>>>><br>>><br>>> Yes, you need to implement the mapping (a better word may be<br>>> 'binding') of this VI API type to a C type, that also includes to care<br>>> about its allocation. You'll need to implement at least this set of<br>>> function in esx_vi_types.[ch]:<br>>><br>>>
 esxVI_PhysicalNic_Alloc()<br>>> esxVI_PhysicalNic_Free()<br>>> esxVI_PhysicalNic_CastFromAnyType()<br>>> esxVI_PhysicalNic_CastListFromAnyType()<br>>> esxVI_PhysicalNic_Deserialize()<br>>> esxVI_PhysicalNic_DeserializeList()<br>>><br>>> You could use the binding for the HostCpuIdInfo type, but<br>>> unfortunately I haven't published the code for it yet. This code also<br>>> includes some essential helper functions for<br>>> esxVI_PhysicalNic_CastListFromAnyType().<br>>><br>>> Beside the PhysicalNic type, you may also have to bind the types of<br>>> its members like PhysicalNicLinkInfo, PhysicalNicSpec and<br>>> HostIpConfig, if you need or care about the information provided by<br>>> them.<br>>><br>>> The binding for HostCpuIdInfo is part of a larger set of patches that<br>>> add some new features to ESX driver, but the patches needs
 some<br>>> cleanup first. I may have some time later this evening to clean them<br>>> up and post them.<br>>><br>>> PS: You should refer to version 2.5 of the VI API [1] and not 4.0,<br>>> because the complete VI API mapping is currently based on version 2.5.<br>>> At some point I'll have to properly distinguish between version 2.5<br>>> and 4.0, but currently I would like to stick to version 2.5 only.<br>>><br>>> [1]<br>>> <a href="http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/" target="_blank">http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/</a><br>>><br>>> Matthias<br>>><br>>><br>><br>><br></div></div><div style="position:fixed"></div></div><br>

      </body></html>