GNOME Bugzilla – Bug 759064
Rewrite of glibtop_get_netload_p()
Last modified: 2018-01-10 19:52:18 UTC
Created attachment 316805 [details] [review] Rewrite of glibtop_get_netload_p() The attached patch is a rewrite of glibtop_get_netload_p() to use libc's getifaddrs(3) function rather than reading kernel's memory via the libkvm. The latter is deprecated and should be avoided. I'm trying to rid of the direct reads of the "struct ifnet" structure via this interface to facilitate kernel changes. Could it be possible to integrate this diff?
Created attachment 316807 [details] [review] Correct patch
That patch will land in OpenBSD ports soon and considering that it's in the OpenBSD-specific part of the code, I think we should commit it.
Do you get any regression when running something like examples/netload.c ?
Currently it prints wrong informations, 0 everywhere. My diff fixes that and I verified that the output of "netload" is coherent to "netstat -sI" for the same interface.
Why would you strip the GPL header ?
I'm not sure what you mean :) I rewrote the function completely, trying to respect the coding style and since I don't think it makes sense to create a new file I just sent a diff with the existing one. So I'm not stripping anything, it's a diff. Now if your question is why I did not put why work under GPLv2 it's just to allow other people to re-use it under ISC. But since this code is part of libgtop2 the GPLv2 applies to the library in the end. Does that answer your question or did I get it wrong?
Benoit, is there any news on this?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libgtop/issues/32.