diff options
Diffstat (limited to 'config/openospfd')
-rw-r--r-- | config/openospfd/openospfd.inc | 249 | ||||
-rw-r--r-- | config/openospfd/openospfd.xml | 141 | ||||
-rw-r--r-- | config/openospfd/openospfd_interfaces.xml | 122 | ||||
-rw-r--r-- | config/openospfd/status_ospfd.php | 147 |
4 files changed, 0 insertions, 659 deletions
diff --git a/config/openospfd/openospfd.inc b/config/openospfd/openospfd.inc deleted file mode 100644 index 86e043d5..00000000 --- a/config/openospfd/openospfd.inc +++ /dev/null @@ -1,249 +0,0 @@ -<?php -/* - openospfd.inc - Copyright (C) 2010 Ermal Luçi - part of pfSense - 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_once("config.inc"); -require_once("functions.inc"); -require_once("service-utils.inc"); - -function ospfd_display_friendlyiface () { - global $evaledvar, $config, $g; - - if (intval($g['latest_config']) >= 6) - return; - - if ($evaledvar) { - foreach ($evaledvar as $idx => $field) { - if ($field['interface']) { - if (empty($config['interfaces'][$field['interface']]['descr'])) - $evaledvar[$idx]['interface'] = strtoupper($evaledvar[$idx]['interface']); - else - $evaledvar[$idx]['interface'] = $config['interfaces'][$field['interface']]['descr']; - } - } - } -} - -function ospfd_install_conf() { - global $config, $g, $input_errors; - - conf_mount_rw(); - - if ($config['installedpackages']['ospfd']['rawconfig'] && $config['installedpackages']['ospfd']['rawconfig']['item']) { - // if there is a raw config specifyed in tthe config.xml use that instead of the assisted config - $conffile = implode("\n",$config['installedpackages']['ospfd']['rawconfig']['item']); - //$conffile = $config['installedpackages']['ospfd']['rawconfig']; - } else { - // generate ospfd.conf based on the assistant - if($config['installedpackages']['ospfd']['config']) - $ospfd_conf = &$config['installedpackages']['ospfd']['config'][0]; - else { - log_error("OpenOSPFd: No config data found."); - return; - } - - $conffile = "# This file was created by the pfSense package manager. Do not edit!\n\n"; - - // Specify router id - if($ospfd_conf['routerid']) - $conffile .= "router-id {$ospfd_conf['routerid']}\n"; - - if ($ospfd_conf['updatefib']) - $conffile .= "fib-update no\n"; - - if (is_array($ospfd_conf['row'])) { - foreach ($ospfd_conf['row'] as $redistr) { - if (empty($redistr['routevalue'])) - continue; - if (isset($redistr['redistribute'])) - $conffile .= "no "; - $conffile .= "redistribute {$redistr['routevalue']}\n"; - } - } - - if ($ospfd_conf['redistributeconnectedsubnets']) - $conffile .= "redistribute connected\n"; - - if ($ospfd_conf['redistributedefaultroute']) - $conffile .= "redistribute default\n"; - - if ($ospfd_conf['redistributestatic']) - $conffile .= "redistribute static\n"; - - if ($ospfd_conf['spfholdtime']) - $conffile .= "spf-holdtime {$ospfd_conf['spfholdtime']}\n"; - - if ($ospfd_conf['spfdelay']) - $conffile .= "spf-delay {$ospfd_conf['spfdelay']}\n"; - - if ($ospfd_conf['rfc1583']) - $conffile .= "rfc1583compat yes\n"; - - $conffile .= "area {$ospfd_conf['area']} {\n"; - - if ($config['installedpackages']['ospfdinterfaces']['config']) { - foreach ($config['installedpackages']['ospfdinterfaces']['config'] as $conf) { - if (intval($g['latest_config']) >= 6) { - $ospfdif = get_real_interface($conf['interface']); - if ($ospfdif) - $conffile .= "\tinterface {$ospfdif}"; - else - continue; - } else - $conffile .= "\tinterface " . $config['interfaces'][$conf['interface']]['if']; - $options_present = false; - $ifconfigs = ""; - if (!empty($conf['metric'])) { - $options_present = true; - $ifconfigs .= "\t\tmetric {$conf['metric']}\n"; - } - if (!empty($conf['hellointervalinseconds'])) { - $options_present = true; - $ifconfigs .= "\t\thello-interval {$conf['hellointervalinseconds']}\n"; - } - if ($conf['md5password'] && !empty($conf['password'])) { - $options_present = true; - $ifconfigs .= "\t\tauth-type crypt\n"; - $ifconfigs .= "\t\tauth-md 1 \"" . substr($conf['password'], 0, 15) . "\"\n"; - $ifconfigs .= "\t\tauth-md-keyid 1\n"; - } else if (!empty($conf['password'])) { - $options_present = true; - $ifconfigs .= "\t\tauth-type simple\n"; - $ifconfigs .= "\t\tauth-key \"" . substr($conf['password'], 0, 8) . "\"\n"; - } - if (!empty($conf['routerpriorityelections'])) { - $options_present = true; - $ifconfigs .= "\t\trouter-priority {$conf['routerpriorityelections']}\n"; - } - if (!empty($conf['retransmitinterval'])) { - $options_present = true; - $ifconfigs .= "\t\tretransmit-interval {$conf['retransmitinterval']}\n"; - } - if (!empty($conf['deadtimer'])) { - $options_present = true; - $ifconfigs .= "\t\trouter-dead-time {$conf['deadtimer']}\n"; - } - if (!empty($conf['passive'])) { - $options_present = true; - $ifconfigs .= "\t\tpassive\n"; - } - if (!empty($ifconfigs)) { - $conffile .= " {\n {$ifconfigs} \n"; - if ($options_present == true) - $conffile .= "\t}\n"; - } else - $conffile .= "\n"; - } - } - $conffile .= "}\n"; - } - - $fd = fopen("/usr/local/etc/ospfd.conf", "w"); - - // Write out the configuration file - fwrite($fd, $conffile); - - // Close file handle - fclose($fd); - - // Create rc.d file - $rc_file_stop = "killall ospfd"; - $rc_file_start = <<<EOF -/usr/local/sbin/ospfctl reload -if [ "$0" != "0" ]; then - /bin/pkill -x ospfd - /usr/local/sbin/ospfd -f /usr/local/etc/ospfd.conf -fi - -EOF; - write_rcfile(array( - "file" => "ospfd.sh", - "start" => $rc_file_start, - "stop" => $rc_file_stop - ) - ); - - // Ensure files have correct permissions - exec("chmod a+rx /usr/local/etc/rc.d/ospfd.sh"); - exec("chmod a-rw /usr/local/etc/ospfd.conf"); - exec("chmod u+rw /usr/local/etc/ospfd.conf"); - - // Kick off newly created rc.d script - exec("/usr/local/etc/rc.d/ospfd.sh start"); - - // Back to RO mount for NanoBSD and friends - conf_mount_ro(); -} - -function ospfd_validate_interface() { - global $config, $g, $id, $input_errors; - - if ($config['installedpackages']['ospfdinterfaces']['config']) { - foreach ($config['installedpackages']['ospfdinterfaces']['config'] as $index => $conf) { - if ($index == 0) - continue; - if ($id != $index && $conf['interface'] == $_POST['interface']) - $input_errors[] = "Interface {$_POST['interface']} is already configured."; - } - } - if ($_POST['md5password'] && empty($_POST['password'])) - $input_errors[] = "Please input a password."; -} - -function ospfd_validate_input() { - global $config, $g, $input_errors; - - if (!empty($_POST['routerid']) && !is_ipaddr($_POST['routerid'])) - $input_errors[] = "Router ID must be an address."; - if (!is_ipaddr($_POST['area'])) - $input_errors[] = "Area needs to be a valid ip_address."; - if ($_POST['spfholdtime'] <> "" && ($_POST['spfholdtime'] < 1 || $_POST['spfholdtime'] > 5)) - $input_errors[] = "SPF holdtime needs to be between 1 and 5."; - if ($_POST['spfdelay'] <> "" && ($_POST['spfdelay'] < 1 || $_POST['spfdelay'] > 10)) - $input_errors[] = "SPF delay needs to be between 1 and 10."; - if (!$config['installedpackages']['ospfdinterfaces']['config']) - $input_errors[] = "Please select an interface to use for OpenOSPFd."; -} - -// get the raw ospfd confi file for manual inspection/editing -function ospfd_get_raw_config() { - return file_get_contents("/usr/local/etc/ospfd.conf"); -} - -// serialize the raw ospfd confi file to config.xml -function ospfd_put_raw_config($conffile) { - global $config; - if ($conffile == "") - unset($config['installedpackages']['ospfd']['rawconfig']); - else { - $config['installedpackages']['ospfd']['rawconfig'] = array(); - $config['installedpackages']['ospfd']['rawconfig']['item'] = explode("\n",$_POST['ospfd_raw']); - $config['installedpackages']['ospfd']['rawconfig'] = $conffile; - } -} - -?> diff --git a/config/openospfd/openospfd.xml b/config/openospfd/openospfd.xml deleted file mode 100644 index 9498100f..00000000 --- a/config/openospfd/openospfd.xml +++ /dev/null @@ -1,141 +0,0 @@ -<packagegui> - <name>ospfd</name> - <version>0.1</version> - <title>Services: OpenOSPFd</title> - <include_file>/usr/local/pkg/openospfd.inc</include_file> - <aftersaveredirect>pkg_edit.php?xml=openospfd.xml&id=0</aftersaveredirect> - <additional_files_needed> - <prefix>/usr/local/pkg/</prefix> - <chmod>077</chmod> - <item>https://packages.pfsense.org/packages/config/openospfd/openospfd.inc</item> - </additional_files_needed> - <additional_files_needed> - <prefix>/usr/local/pkg/</prefix> - <chmod>077</chmod> - <item>https://packages.pfsense.org/packages/config/openospfd/openospfd_interfaces.xml</item> - </additional_files_needed> - <additional_files_needed> - <prefix>/usr/local/www/</prefix> - <chmod>077</chmod> - <item>https://packages.pfsense.org/packages/config/openospfd/status_ospfd.php</item> - </additional_files_needed> - <menu> - <name>OpenOSPFd</name> - <tooltiptext>Modify ospfd settings.</tooltiptext> - <section>Services</section> - <configfile>openospfd.xml</configfile> - <url>/pkg_edit.php?xml=openospfd.xml&id=0</url> - </menu> - <tabs> - <tab> - <text>Global Settings</text> - <url>pkg_edit.php?xml=openospfd.xml&id=0</url> - <active/> - </tab> - <tab> - <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>OpenOSPFd</name> - <rcfile>ospfd.sh</rcfile> - <executable>ospfd</executable> - <description>OpenBSD OSPF Daemon</description> - </service> - <fields> - <field> - <fielddescr>Router ID</fielddescr> - <fieldname>routerid</fieldname> - <description> - <![CDATA[ - Specify the Router ID. RID is the highest logical (loopback) IP address configured on a router. For more information on router identifiers see <a target='_new' href='http://en.wikipedia.org/wiki/Open_Shortest_Path_First'>wikipedia</a>. - ]]> - </description> - <type>input</type> - </field> - <field> - <fielddescr>Area</fielddescr> - <fieldname>area</fieldname> - <description> - <![CDATA[ - OpenOSPFd area for this instance of OSPF. For more information on Areas see <a target='_new' href='http://en.wikipedia.org/wiki/Open_Shortest_Path_First#Area_types'>wikipedia</a>. - ]]> - </description> - <type>input</type> - <required/> - </field> - <field> - <fielddescr>Disable FIB updates (Routing table)</fielddescr> - <fieldname>updatefib</fieldname> - <description>Disables the updating of the host routing table(turns into stub router).</description> - <type>checkbox</type> - </field> - <field> - <fielddescr>Redistribute connected subnets</fielddescr> - <fieldname>redistributeconnectedsubnets</fieldname> - <description>Enables the redistribution of connected networks (Default no)</description> - <type>checkbox</type> - </field> - <field> - <fielddescr>Redistribute default route</fielddescr> - <fieldname>redistributedefaultroute</fieldname> - <description>Enables the redistribution of a default route to this device (Default no)</description> - <type>checkbox</type> - </field> - <field> - <fielddescr>Redistribute static</fielddescr> - <fieldname>redistributestatic</fieldname> - <description>Enables the redistribution of static routes</description> - <type>checkbox</type> - </field> - <field> - <fielddescr>SPF Hold Time</fielddescr> - <fieldname>spfholdtime</fieldname> - <description>Set the SPF holdtime in seconds. The minimum time between two consecutive shortest path first calculations. The default value is 5 seconds; the valid range is 1-5 seconds.</description> - <type>input</type> - </field> - <field> - <fielddescr>SPF Delay</fielddescr> - <fieldname>spfdelay</fieldname> - <description>Set SPF delay in seconds. The delay between receiving an update to the link state database and starting the shortest path first calculation. The default value is 1; valid range is 1-10 seconds.</description> - <type>input</type> - </field> - <field> - <fielddescr>RFC 1583 compatible</fielddescr> - <fieldname>rfc1583</fieldname> - <description>If set to yes, decisions regarding AS-external routes are evaluated according to RFC 1583. The default is no.</description> - <type>checkbox</type> - </field> - <field> - <fielddescr>These rules take precedence over any redistribute options specified above.</fielddescr> - <fieldname>none</fieldname> - <type>rowhelper</type> - <rowhelper> - <rowhelperfield> - <fielddescr>Disable <br/>Redistribution</fielddescr> - <fieldname>redistribute</fieldname> - <description>Redistribute rules.</description> - <type>checkbox</type> - <size>20</size> - </rowhelperfield> - <rowhelperfield> - <fielddescr>Subnet to Route</fielddescr> - <fieldname>routevalue</fieldname> - <type>input</type> - <size>25</size> - </rowhelperfield> - </rowhelper> - </field> - </fields> - <custom_php_resync_config_command> - ospfd_install_conf(); - </custom_php_resync_config_command> - <custom_php_validation_command> - ospfd_validate_input(); - </custom_php_validation_command> -</packagegui>
\ No newline at end of file diff --git a/config/openospfd/openospfd_interfaces.xml b/config/openospfd/openospfd_interfaces.xml deleted file mode 100644 index 61d36976..00000000 --- a/config/openospfd/openospfd_interfaces.xml +++ /dev/null @@ -1,122 +0,0 @@ -<packagegui> - <name>OSPFd Interfaces</name> - <version>0.1</version> - <title>Services: OpenOSPFd</title> - <include_file>/usr/local/pkg/openospfd.inc</include_file> - <aftersaveredirect>pkg.php?xml=openospfd_interfaces.xml</aftersaveredirect> - <custom_php_command_before_form>ospfd_display_friendlyiface();</custom_php_command_before_form> - <additional_files_needed> - <prefix>/usr/local/pkg/</prefix> - <chmod>077</chmod> - <item>https://packages.pfsense.org/packages/config/openospfd/openospfd.inc</item> - </additional_files_needed> - <menu> - <name>OSPF</name> - <tooltiptext>Modify ospfd settings.</tooltiptext> - <section>Services</section> - <configfile>openospfd.xml</configfile> - <url>/pkg_edit.php?xml=openospfd.xml&id=0</url> - </menu> - <tabs> - <tab> - <text>Global Settings</text> - <url>pkg_edit.php?xml=openospfd.xml&id=0</url> - </tab> - <tab> - <text>Interface Settings</text> - <url>pkg.php?xml=openospfd_interfaces.xml</url> - <active/> - </tab> - <tab> - <text>Status</text> - <url>/status_ospfd.php</url> - </tab> - </tabs> - <adddeleteeditpagefields> - <columnitem> - <fielddescr>Interface</fielddescr> - <fieldname>interface</fieldname> - <type>interface</type> - </columnitem> - <columnitem> - <fielddescr>Description</fielddescr> - <fieldname>descr</fieldname> - </columnitem> - </adddeleteeditpagefields> - <service> - <name>OpenOSPFd</name> - <rcfile>ospfd.sh</rcfile> - <executable>ospfd</executable> - </service> - <fields> - <field> - <fielddescr>Interface</fielddescr> - <fieldname>interface</fieldname> - <description>Enter the desired participating interface here.</description> - <type>interfaces_selection</type> - <required/> - </field> - <field> - <fielddescr>Metric</fielddescr> - <fieldname>metric</fieldname> - <description>Metric for this OSPF interface (leave blank for default).</description> - <type>input</type> - </field> - <field> - <fielddescr>Description</fielddescr> - <fieldname>descr</fieldname> - <size>30</size> - <type>input</type> - </field> - <field> - <fielddescr>Interface is Passive</fielddescr> - <fieldname>passive</fieldname> - <description>Prevent transmission and reception of OSPF packets on this interface. The specified interface will be announced as a stub network.</description> - <type>checkbox</type> - </field> - <field> - <fielddescr>Enable MD5 password for this OpenOSPFd interface (default no)</fielddescr> - <fieldname>md5password</fieldname> - <description>Enables the use of an MD5 password to on this instance</description> - <type>checkbox</type> - </field> - <field> - <fielddescr>Password</fielddescr> - <fieldname>password</fieldname> - <description>Password for this OSPF interface.</description> - <type>input</type> - </field> - <field> - <fielddescr>Router Priority</fielddescr> - <fieldname>routerpriorityelections</fieldname> - <description> - Router priority when participating in elections for DR (Default 1) Valid range is 0-255. 0 will cause the router to not participate in election. - </description> - <type>input</type> - </field> - <field> - <fielddescr>Hello Interval</fielddescr> - <fieldname>hellointervalinseconds</fieldname> - <description>Hello Interval this OSPF interface in seconds (Default 10).</description> - <type>input</type> - </field> - <field> - <fielddescr>Retransmit Interval</fielddescr> - <fieldname>retransmitinterval</fieldname> - <description>Retransmit Interval this OSPF interface in seconds (Default 5).</description> - <type>input</type> - </field> - <field> - <fielddescr>Dead Timer</fielddescr> - <fieldname>deadtimer</fieldname> - <description>Dead Timer for this OSPF interface in seconds (Default 40).</description> - <type>input</type> - </field> - </fields> - <custom_php_resync_config_command> - ospfd_install_conf(); - </custom_php_resync_config_command> - <custom_php_validation_command> - ospfd_validate_interface(); - </custom_php_validation_command> -</packagegui> diff --git a/config/openospfd/status_ospfd.php b/config/openospfd/status_ospfd.php deleted file mode 100644 index 25f18d85..00000000 --- a/config/openospfd/status_ospfd.php +++ /dev/null @@ -1,147 +0,0 @@ -<?php -/* - status_ospfd.php - Copyright (C) 2010 Nick Buraglio; nick@buraglio.com - Copyright (C) 2010 Scott Ullrich <sullrich@pfsense.org> - 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"); - -$pgtitle = "OpenOSPFd: Status"; -include("head.inc"); - -/* List all of the commands as an index. */ -function listCmds() { - global $commands; - echo "<br/>This status page includes the following information:\n"; - echo "<ul width=\"100%\">\n"; - for ($i = 0; isset($commands[$i]); $i++ ) { - echo "<li><strong><a href=\"#" . $commands[$i][0] . "\">" . $commands[$i][0] . "</a></strong></li>\n"; - } - echo "</ul>\n"; -} - -function execCmds() { - global $commands; - for ($i = 0; isset($commands[$i]); $i++ ) { - doCmdT($commands[$i][0], $commands[$i][1]); - } -} - -/* Define a command, with a title, to be executed later. */ -function defCmdT($title, $command) { - global $commands; - $title = htmlspecialchars($title,ENT_NOQUOTES); - $commands[] = array($title, $command); -} - -function doCmdT($title, $command) { - echo "<p>\n"; - echo "<a name=\"" . $title . "\">\n"; - echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"; - echo "<tr><td class=\"listtopic\">" . $title . "</td></tr>\n"; - echo "<tr><td class=\"listlr\"><pre>"; /* no newline after pre */ - - if ($command == "dumpconfigxml") { - $fd = @fopen("/conf/config.xml", "r"); - if ($fd) { - while (!feof($fd)) { - $line = fgets($fd); - /* remove sensitive contents */ - $line = preg_replace("/<password>.*?<\\/password>/", "<password>xxxxx</password>", $line); - $line = preg_replace("/<pre-shared-key>.*?<\\/pre-shared-key>/", "<pre-shared-key>xxxxx</pre-shared-key>", $line); - $line = preg_replace("/<rocommunity>.*?<\\/rocommunity>/", "<rocommunity>xxxxx</rocommunity>", $line); - $line = str_replace("\t", " ", $line); - echo htmlspecialchars($line,ENT_NOQUOTES); - } - } - fclose($fd); - } else { - $execOutput = ""; - $execStatus = ""; - exec ($command . " 2>&1", $execOutput, $execStatus); - for ($i = 0; isset($execOutput[$i]); $i++) { - if ($i > 0) { - echo "\n"; - } - echo htmlspecialchars($execOutput[$i],ENT_NOQUOTES); - } - } - echo "</pre></tr>\n"; - echo "</table>\n"; -} - -$pf_version=substr(trim(file_get_contents("/etc/version")),0,3); -if ($pf_version < 2.0) - $one_two = true; - -?> - -<html> - <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> - <?php include("fbegin.inc"); ?> - <?php if($one_two): ?> - <p class="pgtitle"><?=$pgtitle?></font></p> - <?php endif; ?> - <?php if ($savemsg) print_info_box($savemsg); ?> - - <table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr><td class="tabnavtbl"> -<?php - $tab_array = array(); - $tab_array[] = array(gettext("Settings"), false, "/pkg_edit.php?xml=openospfd.xml&id=0"); - $tab_array[] = array(gettext("Interface Settings"), false, "/pkg.php?xml=openospfd_interfaces.xml"); - $tab_array[] = array(gettext("Status"), true, "/status_ospfd.php"); - display_top_tabs($tab_array); - ?> - </td></tr> - <tr> - <td> - <div id="mainarea"> - <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td> -<?php - defCmdT("OpenOSPFd Summary","/usr/local/sbin/ospfctl show summary"); - defCmdT("OpenOSPFd Neighbors","/usr/local/sbin/ospfctl show neighbor"); - defCmdT("OpenOSPFd FIB","/usr/local/sbin/ospfctl show fib"); - defCmdT("OpenOSPFd RIB","/usr/local/sbin/ospfctl show rib"); - defCmdT("OpenOSPFd Interfaces","/usr/local/sbin/ospfctl show interfaces"); - defCmdT("OpenOSPFD Database","/usr/local/sbin/ospfctl show database"); -?> - <div id="cmdspace" style="width:100%"> - <?php listCmds(); ?> - <?php execCmds(); ?> - </div> - </td> - </tr> - </table> - </div> - </td> - </tr> - </table> - <?php include("fend.inc"); ?> - </body> -</html> |