Added connection listing for webif :
authorFlorian Fainelli <florian@openwrt.org>
Wed, 11 Jan 2006 16:56:13 +0000 (16:56 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 11 Jan 2006 16:56:13 +0000 (16:56 +0000)
- lists switch/wireless connections from the arp table
- shows connections to the router

SVN-Revision: 2915

openwrt/package/webif/files/www/cgi-bin/webif/connection.sh [new file with mode: 0755]

diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/connection.sh b/openwrt/package/webif/files/www/cgi-bin/webif/connection.sh
new file mode 100755 (executable)
index 0000000..7ff790e
--- /dev/null
@@ -0,0 +1,35 @@
+#!/usr/bin/haserl
+<? 
+. /usr/lib/webif/webif.sh
+header "Status" "Connections" "Connection status"
+?>
+<table style="width: 90%; text-align: left;" border="0" cellpadding="2" cellspacing="2" align="center">
+<tbody>
+       <tr>
+               <td><b>Ethernet/Wireless physical connections</b></td>
+               <tbody>
+                       <tr>
+                               <td><pre><? cat /proc/net/arp | head -1 ?></pre></td>
+                       </tr>
+                       <tr>
+                               <td><pre><? cat /proc/net/arp | grep -v IP ?></pre></td>
+                       </tr>
+               </tbody>
+       </tr>
+       <tr>
+               <td><br /><br /></td>
+       </tr>
+       <tr>
+               <td><b>Connections to the router</b></td>
+               <tbody>
+                       <tr>
+                               <td><pre><? netstat -n ?></pre></td>
+                       </tr>
+               </tbody>
+       </tr>
+</tbody>
+
+<? footer ?>
+<!--
+##WEBIF:name:Status:1:Connections
+-->