patches/gnome-netstatus-01-kstat-solaris.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 16660 bf94a2c88b7c
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16660
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
     1
--- gnome-netstatus-2.26.0/configure.in.orig	2009-03-08 05:44:58.000000000 +0000
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
     2
+++ gnome-netstatus-2.26.0/configure.in	2009-03-18 10:17:17.098639534 +0000
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
     3
@@ -79,6 +79,24 @@ else
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
     4
 fi
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
     5
 AC_SUBST(NETSTATUS_DEBUG_CFLAGS)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
     6
 
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
     7
+case $host in
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
     8
+*-*-solaris*)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
     9
+       ostype=solaris
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    10
+       AC_CHECK_LIB(kstat, kstat_open, [
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    11
+              AC_CHECK_HEADER(kstat.h, [
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    12
+                      AC_DEFINE(HAVE_KSTAT, 1, [Define to 1 if you have the <kstat.h> header file.])
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    13
+                      KSTAT_LIBS=-lkstat
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    14
+                      AC_SUBST(KSTAT_LIBS)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    15
+              ])
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    16
+       ], AC_MSG_ERROR([*** libkstat is required]))
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    17
+       AC_DEFINE_UNQUOTED(HAVE_SOLARIS, 1, Define to 1)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    18
+       ;;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    19
+*-*-linux*)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    20
+       ostype=linux
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    21
+       AC_DEFINE_UNQUOTED(HAVE_LINUX, 1, Define to 1)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    22
+       ;;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    23
+esac
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    24
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    25
 dnl
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    26
 dnl     whether or not to run glib-mkenums etc.
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    27
 dnl
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    28
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    29
--- gnome-netstatus-2.7.1/src/Makefile.am	2004-07-22 17:02:37.778210000 +0600
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    30
+++ gnome-netstatus-2.7.1-new/src/Makefile.am	2004-07-22 17:01:38.429334000 +0600
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    31
@@ -14,7 +14,7 @@ INCLUDES = \
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    32
 
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    33
 libexec_PROGRAMS = gnome-netstatus-applet
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    34
 
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    35
-gnome_netstatus_applet_LDADD = $(NETSTATUS_LIBS)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    36
+gnome_netstatus_applet_LDADD = $(NETSTATUS_LIBS) $(KSTAT_LIBS)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    37
 
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    38
 gnome_netstatus_applet_SOURCES = \
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    39
 	netstatus-applet.c \
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    40
--- gnome-netstatus-2.26.0/src/netstatus-sysdeps.c.ori	2009-03-13 11:52:01.363555674 +0000
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    41
+++ gnome-netstatus-2.26.0/src/netstatus-sysdeps.c	2009-03-13 11:53:18.108631785 +0000
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    42
@@ -1,5 +1,5 @@
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    43
 /*
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    44
- * Copyright (C) 2003 Sun Microsystems, Inc.
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    45
+ * Copyright (C) 2003-2009 Sun Microsystems, Inc.
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    46
  * Copyright (C) 2004 Red Hat Inc.
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    47
  *
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    48
  * This program is free software; you can redistribute it and/or
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    49
@@ -35,6 +35,11 @@
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    50
 #include <glib.h>
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    51
 #include <glib/gi18n.h>
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    52
 
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    53
+#ifdef HAVE_SOLARIS
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    54
+#include <kstat.h>
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    55
+#include <stdlib.h>
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    56
+#endif
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    57
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    58
 #ifdef __FreeBSD__
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    59
 #include <sys/types.h>
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    60
 #include <sys/socket.h>
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    61
@@ -78,7 +82,7 @@
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    62
   return TRUE;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    63
 }
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    64
 
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    65
-#if !defined (__FreeBSD__)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    66
+#if !defined (__FreeBSD__) && !defined (__sun)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    67
 
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    68
 static inline char *
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    69
 parse_iface_name (const char *buf)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    70
@@ -357,6 +361,103 @@
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    71
   return error_message;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    72
 }
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    73
 
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    74
+#elif defined (__sun)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    75
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    76
+char *
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    77
+netstatus_sysdeps_read_iface_statistics (const char  *iface,
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    78
+					  gulong      *in_packets,
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    79
+					  gulong      *out_packets,
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    80
+					  gulong      *in_bytes,
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    81
+					  gulong      *out_bytes)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    82
+{
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    83
+  char *error_message = NULL;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    84
+  static kstat_ctl_t *kc = NULL;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    85
+  kstat_t *ksp;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    86
+  kstat_named_t *kn;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    87
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    88
+  /*
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    89
+   * The linux-specific code uses -1 as the default value.  But if we return -1
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    90
+   * (see comment below), then it gets interpreted as (unsigned long)-1, which
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    91
+   * looks stupid and is definitely more wrong than just showing 0.
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    92
+   */
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    93
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    94
+  *in_packets = 0;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    95
+  *out_packets = 0;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    96
+  *in_bytes = 0;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    97
+  *out_bytes = 0;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    98
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
    99
+  if (kc == NULL)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   100
+    {
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   101
+      if ((kc = kstat_open ()) == NULL)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   102
+	return g_strdup_printf (_("Cannot open /dev/kstat: %s"),
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   103
+		g_strerror (errno));
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   104
+    }
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   105
+  else
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   106
+    {
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   107
+      if (kstat_chain_update (kc) < 0)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   108
+	{
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   109
+	  int e = errno;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   110
+	  kstat_close (kc);
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   111
+	  kc = NULL;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   112
+	  return g_strdup_printf (_("Cannot update kstats: %s"),
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   113
+		  g_strerror (e));
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   114
+	}
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   115
+    }
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   116
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   117
+  if ((ksp = kstat_lookup (kc, NULL, -1, iface)) == NULL)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   118
+    {
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   119
+      kstat_close (kc);
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   120
+      kc = NULL;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   121
+      return g_strdup_printf (_("Cannot find information on interface '%s'"),
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   122
+	iface);
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   123
+    }
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   124
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   125
+  if (kstat_read (kc, ksp, NULL) < 0)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   126
+    {
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   127
+      kstat_close (kc);
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   128
+      kc = NULL;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   129
+      return g_strdup_printf (_("Cannot read kstat"));
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   130
+    }
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   131
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   132
+  if ((kn = kstat_data_lookup (ksp, "ipackets")) != NULL)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   133
+    *in_packets = kn->value.ui32;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   134
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   135
+  if ((kn = kstat_data_lookup (ksp, "opackets")) != NULL)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   136
+    *out_packets = kn->value.ui32;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   137
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   138
+  if ((kn = kstat_data_lookup (ksp, "rbytes")) != NULL)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   139
+    *in_bytes = kn->value.ui32;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   140
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   141
+  if ((kn = kstat_data_lookup (ksp, "obytes")) != NULL)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   142
+    *out_bytes = kn->value.ui32;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   143
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   144
+  /*
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   145
+   * On Solaris, loopback doesn't report bytes, just packets.  The behavior of
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   146
+   * the linux-specific code reports an error if all the data is not present,
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   147
+   * and that shuts the applet down.  So perhaps it's best to simply return
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   148
+   * success if we can access the data at all.
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   149
+   */
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   150
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   151
+  return NULL;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   152
+}
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   153
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   154
+char *
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   155
+netstatus_sysdeps_read_iface_wireless_details (const char *iface,
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   156
+					       gboolean   *is_wireless,
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   157
+					       int        *signal_strength)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   158
+{
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   159
+  g_return_val_if_fail (iface != NULL, NULL);
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   160
+  g_return_val_if_fail (is_wireless != NULL, NULL);
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   161
+  g_return_val_if_fail (signal_strength != NULL, NULL);
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   162
+                                                                                
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   163
+  if (is_wireless)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   164
+    *is_wireless = FALSE;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   165
+  if (signal_strength)
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   166
+    *signal_strength = 0;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   167
+                                                                                
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   168
+  return NULL;
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   169
+}
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   170
+
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   171
 #else /* defined(__FreeBSD__) */
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   172
 
bf94a2c88b7c 2009-09-25 Michal Pryc <[email protected]>
migi
parents:
diff changeset
   173
 static inline void