From: Andrew B. <an...@be...> - 2011-03-09 09:41:25
|
On Wed, Mar 2, 2011 at 10:54 PM, Doug MacEachern <dma...@vm...> wrote: > Hi Adam, > > Thanks for the patches! > I need to take a closer look, but wondering if we could change sigar_net_interface_config_get rather than change the return values of sigar_net_interface_list: > sigar_net_interface_config_get("ethX", &config); Until recently I probably would have agreed with you, however given the recent shift away from ethX even on Linux, I'm not convinced that it makes sense to continue using it on Windows where it has no real meaning. Worse, the number of ethX entries does not even match the number of physical devices (there are two additional "pseudo devices" for every physical one). The other issue is that anything wanting to present network information to users must do the translation - again, since ethX is meaningless on Windows. So I guess my answer here is, "yes we could and if you insist we will, but I really don't think we should" :-) > > Then either change the value of config.description to use FriendlyName, or even add a new field to sigar_net_interface_config_t? > > Thanks, > -Doug > > On Feb 28, 2011, at 7:48 AM, Adam Stokes wrote: > >> Hi, >> >> I'm Adam, one of the developers for matahari project (http://github.com/matahari). We are attempting to provide some useful apis over a remote interface (qpid.apache.org) that is cross platform. >> >> The resources used for cross compilation is mingw32. The first patch is for allowing sigar to compile successfully under those requirements. >> >> Some of the routines in the api (specifically network) we expose the ability to start/stop network interfaces through Windows netsh application. With the current sigar implementation interfaces are listed as 'ethX' which is fine when doing read only within the realm of sigar. When attempting to branch out and use application such as netsh in conjunction with sigar this fails due to netsh requiring a Friendly Name of the network interface. The second patch allows us to capture the interfaces friendlyname and at worst its interface description. >> >> >> The pull request can be found here, >> >> https://github.com/hyperic/sigar/pull/5 >> >> Thank you >> Adam >> >> > > |