[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Follow up on adding iwconfig to net-utils.el

From: Yoni Rabkin
Subject: Follow up on adding iwconfig to net-utils.el
Date: Fri, 22 Feb 2008 11:34:48 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Hello, I am using GNU Emacs (i686-pc-linux-gnu, X toolkit,
Xaw3d scroll bars) of 2008-02-22

Two weeks ago, I asked about including in net-utils.el a command which
will call the external program "iwconfig". I think that this makes sense
as "iwconfig" is the wireless networking counterpart to "ifconfig",
which is already provided by net-utils.el. I don't recall anyone saying
yes or no to the idea, so I'm presenting it again now.

For those with Web access, the thread is:

P.S. I'm using two weeks as my minimum-time-before-bugging-emacs-devel
     interval because I understand that it is the etiquette on
     emacs-devel for low priority requests. Feel free to correct me if
     I'm wrong.

Index: net-utils.el
RCS file: /sources/emacs/emacs/lisp/net/net-utils.el,v
retrieving revision 1.27
diff -u -r1.27 net-utils.el
--- net-utils.el        8 Jan 2008 20:45:56 -0000       1.27
+++ net-utils.el        22 Feb 2008 09:13:35 -0000
@@ -109,6 +109,23 @@
   :group 'net-utils
   :type  '(repeat string))
+(defcustom iwconfig-program
+  (if (eq system-type 'gnu/linux)
+      "iwconfig"
+    "")
+  "Program to print wireless network configuration information."
+  :group 'wireless
+  :type  'string)
+;; In order to make iwconfig display diagnostic information on
+;; GNU/Linux, you pass it no command-line options, but this should
+;; still be here for the sake of portability.
+(defcustom iwconfig-program-options
+  nil
+  "Options for iwconfig-program."
+  :group 'wireless
+  :type  '(repeat string))
 (defcustom netstat-program  "netstat"
   "Program to print network statistics."
   :group 'net-utils
@@ -366,6 +383,16 @@
 (defalias 'ifconfig 'ipconfig)
+(defun iwconfig ()
+  "Run iwconfig program."
+  (interactive)
+  (net-utils-run-program
+   "iwconfig"
+   (concat "** Iwconfig ** " iwconfig-program " ** ")
+   iwconfig-program
+   iwconfig-program-options))
 (defun netstat ()
   "Run netstat program."
   "Cut your own wood and it will warm you twice"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]