summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-13 03:51:36 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-13 03:51:36 +0000
commit1aecf8a341541259100fd8e953933028f53ec88b (patch)
tree618afb204111cd866332e3574c2133f4eb4da2ff /perl-install/network
parentbea81cf1e33daca67dc01afcdf1956b445ae47c1 (diff)
downloaddrakx-backup-do-not-use-1aecf8a341541259100fd8e953933028f53ec88b.tar
drakx-backup-do-not-use-1aecf8a341541259100fd8e953933028f53ec88b.tar.gz
drakx-backup-do-not-use-1aecf8a341541259100fd8e953933028f53ec88b.tar.bz2
drakx-backup-do-not-use-1aecf8a341541259100fd8e953933028f53ec88b.tar.xz
drakx-backup-do-not-use-1aecf8a341541259100fd8e953933028f53ec88b.zip
initial import
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/monitor.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/perl-install/network/monitor.pm b/perl-install/network/monitor.pm
new file mode 100644
index 000000000..91289e93a
--- /dev/null
+++ b/perl-install/network/monitor.pm
@@ -0,0 +1,27 @@
+package network::monitor;
+
+use dbus_object;
+
+our @ISA = qw(dbus_object);
+
+sub new {
+ my ($type, $bus) = @_;
+ dbus_object::new($type,
+ $bus,
+ "com.mandriva.monitoring",
+ "/com/mandriva/monitoring/network",
+ "com.mandriva.monitoring.network");
+}
+
+sub list_wireless {
+ my ($o) = @_;
+ my $networks;
+ eval { $networks = $o->call_method('ListWireless') };
+ my %networks;
+ while ($networks =~ /^((?:[0-9a-f]{2}:){5}[0-9a-f]{2})\t(\d+)\t(\d+)\t(.*?)\t(.*)$/mg) {
+ $networks{$1} = { frequency => $2, signal_level => $3, flags => $4, ssid => $5 };
+ }
+ \%networks;
+}
+
+1;