[Goodies-dev] [Bug 9101] [PATCH] Add network device combobox
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Wed Jul 11 11:50:12 CEST 2012
https://bugzilla.xfce.org/show_bug.cgi?id=9101
Mike Massonnet <mmassonnet at xfce.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmassonnet at xfce.org
Assignee|frivoal at xfce.org |mmassonnet at xfce.org
QA Contact|goodies-dev at xfce.org |
--- Comment #1 from Mike Massonnet <mmassonnet at xfce.org> ---
(In reply to comment #0)
> * Get list of detected network interfaces
> * Platform specific code can be easily added; so far only Linux implemented
It's possible to look into libgtop:
http://git.gnome.org/browse/libgtop/tree/sysdeps (/*/netlist.c)
- Linux: http://git.gnome.org/browse/libgtop/tree/sysdeps/linux/netlist.c
- FreeBSD: http://git.gnome.org/browse/libgtop/tree/sysdeps/freebsd/netlist.c
Under Linux the list of devices is available through different means. Libgtop
looks into /proc/net/dev, but it doesn't tell if the devices are up or not.
(It's possible to look into /sys/class/net/<DEVICE>/operstate for that (the
sysfs is officially available since Linux 2.6).)
Under FreeBSD the devices are fetched with builtin functionnality <net/if.h>.
This is POSIX and therefore works cross-platform.
http://pwet.fr/man/linux/conventions/posix/if_h
Code can be copied from the libgtop project, there is netlist (list of devices)
and netload (state of devices, up or down, bytes exchanged, etc).
(In reply to comment #0)
> * Replace network device entry box with combobox
> * Populate new combobox with list of detected network interfaces
> * Allow for a network device to still be entered manually, so old
> functionality retained
The GtkComboBoxEntry widget is done for that.
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the Goodies-dev
mailing list