sflow / host-sflow

host-sflow agent
http://sflow.net
Other
146 stars 55 forks source link

Reorganize ethtool command to get link speed and add support for new ethtool command #9

Closed gospo closed 7 years ago

sflow commented 7 years ago

I get this error when I try to compile with these changes on Red Hat 5.10 or Ubuntu 14.04:

readInterfaces.c:268:32: error: field ‘base’ has incomplete type struct ethtool_link_settings base;

gospo commented 7 years ago

Gah! I needed to wrap the new definitions for ethtool_link_usettings and friends around ETHTOOL_GLINKSETTINGS since it was included in the same upstream commit. I'll rebase.

gospo commented 7 years ago

I updated the last commit and pushed a new repo, so this pull request should still be valid, but have updated code. This should resolve the issue you are seeing when compiling on older kernels.

sflow commented 7 years ago

This was still failing to compile with "make OPTICAL_STATS=yes", however I included your ETHTOOL_GLINKSETTINGS code in the latest commit on "master", where the ethtool commands in readInterfaces.c are broken out more. Please try it there. The 1.0 code is still accessible in branch "hsflowd-1".

gospo commented 7 years ago

Ok, I'll check it out.

On Jul 29, 2016 9:14 PM, "sflow" notifications@github.com wrote:

This was still failing to compile with "make OPTICAL_STATS=yes", however I included your ETHTOOL_GLINKSETTINGS code in the latest commit on "master", where the ethtool commands in readInterfaces.c are broken out more. Please try it there. The 1.0 code is still accessible in branch "hsflowd-1".

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sflow/host-sflow/pull/9#issuecomment-236329912, or mute the thread https://github.com/notifications/unsubscribe-auth/AEnSVIpXpypStFxTZL7ELjudOtaPAr5Qks5qaqWIgaJpZM4JKoha .