From 62f3fc6838bf0e59bb490b0da229649bf86d847c Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 24 Oct 2008 21:05:12 +0200 Subject: Implement getting current speed from network interfaces The network interface must be supported by ethtool, as its syscall is used for this. This is at least the case for e1000 cards. Unfortunately, getting the speed needs root privileges. Therefore, you have to enable it in configuration separately. --- config.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index e8c95dc..1b6fbec 100644 --- a/config.c +++ b/config.c @@ -19,6 +19,7 @@ const char *wmii_path; const char *time_format; const char *battery_path; bool use_colors; +bool get_ethspeed; const char *wmii_normcolors = "#222222 #333333"; char order[MAX_ORDER][2]; const char **run_watches; @@ -161,6 +162,10 @@ int load_configuration(const char *configfile) { { use_colors = true; } + OPT("get_ethspeed") + { + get_ethspeed = true; + } OPT("normcolors") { wmii_normcolors = strdup(dest_value); -- cgit v1.2.3