aboutsummaryrefslogtreecommitdiffstats
path: root/packages/miniupnpd/status_upnp.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-08-19 23:47:05 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-08-19 23:47:05 +0000
commit59c55a355129fa1bd426d4443c042f9cae942cbf (patch)
treeb692201dabf9e20478ea8b70567d793728b28758 /packages/miniupnpd/status_upnp.php
parenta0865e6e3e13d009de513aa5994b44e370807d4d (diff)
downloadpfsense-packages-59c55a355129fa1bd426d4443c042f9cae942cbf.tar.gz
pfsense-packages-59c55a355129fa1bd426d4443c042f9cae942cbf.tar.bz2
pfsense-packages-59c55a355129fa1bd426d4443c042f9cae942cbf.zip
Add experimental upnp package
Diffstat (limited to 'packages/miniupnpd/status_upnp.php')
-rw-r--r--packages/miniupnpd/status_upnp.php88
1 files changed, 88 insertions, 0 deletions
diff --git a/packages/miniupnpd/status_upnp.php b/packages/miniupnpd/status_upnp.php
new file mode 100644
index 00000000..dae86878
--- /dev/null
+++ b/packages/miniupnpd/status_upnp.php
@@ -0,0 +1,88 @@
+<?php
+/* $Id$ */
+/*
+ status_upnp.php
+ part of pfSense (http://www.pfsense.com/)
+
+ Copyright (C) 2006 Seth Mos <seth.mos@xs4all.nl>.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+require("guiconfig.inc");
+
+$rdr_entries = array();
+exec("/sbin/pfctl -aminiupnpd -sn", $rdr_entries, $pf_ret);
+
+$now = time();
+$year = date("Y");
+
+$pgtitle = array(gettext("Status"),gettext("UPnP Status"));
+include("head.inc");
+/* put your custom HTML head content here */
+/* using some of the $pfSenseHead function calls */
+$pfSenseHead->addMeta("<meta http-equiv=\"refresh\" content=\"120;url={$_SERVER['SCRIPT_NAME']}\" />");
+echo $pfSenseHead->getHTML();
+
+?>
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<?php include("fbegin.inc"); ?>
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ <div id="mainarea">
+ <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="10%" class="listhdrr"><?=gettext("Port")?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Protocol")?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Internal IP")?></td>
+ <td width="60%" class="listhdr"><?=gettext("Description")?></td>
+ </tr>
+ <?php $i = 0; foreach ($rdr_entries as $rdr_entry) {
+ $rdr_label = split("\"", $rdr_entry);
+ $rdr_ip = split(" ", $rdr_label[2]);
+ $rdr_port = split(" ", $rdr_label[2]);
+ $rdr_proto = split(" ", $rdr_label[0]);
+ ?>
+ <tr>
+ <td class="listlr">
+ <?php print $rdr_port[4];?>
+ </td>
+ <td class="listlr">
+ <?php print $rdr_proto[5];?>
+ </td>
+ <td class="listlr">
+ <?php print $rdr_ip[2];?>
+ </td>
+ <td class="listlr">
+ <?php print $rdr_label[1];?>
+ </td>
+ </tr>
+ <?php $i++; }?>
+ </table>
+ </div>
+ </table>
+
+<?php include("fend.inc"); ?>
+</body>
+</html>