From: Doug M. <dma...@vm...> - 2011-04-08 16:24:33
|
Hey Guys, Apologies for the long delay.. On Mar 9, 2011, at 1:41 AM, Andrew Beekhof wrote: > 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" :-) I think your change is the right way to go for the long term. I just had current users in mind where this change may have an unexpected impact. In Hyperic HQ for example, ethX is used a the service name, so I believe this change would end up creating a new set of services there and the old ethX ones would just be stale. But, that's something that can be worked out.. we can leave the 1.6 branch as is and apply your changes to master/1.7. I'm just now trying out your patches, but it doesn't compile for me using VC 2005. I haven't looked into it yet, does it build for you with VC? Thanks, -Doug > >> >> 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 >>> >>> >> >> |