aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/openospfd/openospfd.xml25
-rw-r--r--config/openospfd/status_ospfd.php65
2 files changed, 82 insertions, 8 deletions
diff --git a/config/openospfd/openospfd.xml b/config/openospfd/openospfd.xml
index 5aca00c2..add96bb7 100644
--- a/config/openospfd/openospfd.xml
+++ b/config/openospfd/openospfd.xml
@@ -5,15 +5,20 @@
<include_file>/usr/local/pkg/openospfd.inc</include_file>
<aftersaveredirect>pkg_edit.php?xml=openospfd.xml&amp;id=0</aftersaveredirect>
<additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>077</chmod>
- <item>http://www.pfsense.com/packages/config/openospfd/openospfd.inc</item>
- </additional_files_needed>
+ <prefix>/usr/local/pkg/</prefix>
+ <chmod>077</chmod>
+ <item>http://www.pfsense.com/packages/config/openospfd/openospfd.inc</item>
+ </additional_files_needed>
<additional_files_needed>
- <prefix>/usr/local/pkg/</prefix>
- <chmod>077</chmod>
- <item>http://www.pfsense.com/packages/config/openospfd/openospfd_interfaces.xml</item>
- </additional_files_needed>
+ <prefix>/usr/local/pkg/</prefix>
+ <chmod>077</chmod>
+ <item>http://www.pfsense.com/packages/config/openospfd/openospfd_interfaces.xml</item>
+ </additional_files_needed>
+ <additional_files_needed>
+ <prefix>/usr/local/www/</prefix>
+ <chmod>077</chmod>
+ <item>http://www.pfsense.com/packages/config/openospfd/status_ospfd.php</item>
+ </additional_files_needed>
<menu>
<name>OSPFd</name>
<tooltiptext>Modify ospfd settings.</tooltiptext>
@@ -31,6 +36,10 @@
<text>Interface Settings</text>
<url>pkg.php?xml=openospfd_interfaces.xml</url>
</tab>
+ <tab>
+ <text>Status</text>
+ <url>/status_ospfd.php</url>
+ </tab>
</tabs>
<service>
<name>ospfd</name>
diff --git a/config/openospfd/status_ospfd.php b/config/openospfd/status_ospfd.php
new file mode 100644
index 00000000..d2c1e1a4
--- /dev/null
+++ b/config/openospfd/status_ospfd.php
@@ -0,0 +1,65 @@
+<?php
+
+/*
+ status_ospfd.php
+ Copyright (C) 2010 Nick Buraglio; nick@buraglio.com
+ 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.
+*/
+
+
+echo "<h2>Basic OSPFd statistics </h2><br>";
+
+echo "<h3> OSPF Summary </h3>";
+echo '<pre>';
+
+$summary = system('/usr/local/sbin/ospfctl show summary', $summary);
+
+echo "<h3> OSPF Neighbors </h3>";
+echo '<pre>';
+
+$neighbor = system('/usr/local/sbin/ospfctl show neighbor', $neighbor);
+
+echo "<h3> FIB </h3>";
+echo '<pre>';
+
+$rib = system('/usr/local/sbin/ospfctl show fib', $rib);
+
+echo "<h3> RIB </h3>";
+echo '<pre>';
+
+$fib = system('/usr/local/sbin/ospfctl show rib', $fib);
+
+echo "<h3> OSPF Interfaces </h3>";
+echo '<pre>';
+
+$interfaces = system('/usr/local/sbin/ospfctl show interfaces', $interfaces);
+
+echo "<h3> OSPF Database </h3>";
+echo '<pre>';
+
+$database = system('/usr/local/sbin/ospfctl show database', $database);
+
+
+?>
+