aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/ladvd/ladvd.inc26
-rw-r--r--config/ladvd/ladvd.xml38
-rw-r--r--config/ladvd/status_ladvd.php81
3 files changed, 78 insertions, 67 deletions
diff --git a/config/ladvd/ladvd.inc b/config/ladvd/ladvd.inc
index acf277b3..da37a1a9 100644
--- a/config/ladvd/ladvd.inc
+++ b/config/ladvd/ladvd.inc
@@ -1,7 +1,10 @@
<?php
/*
ladvd.inc
- Copyright (C) 2006 Scott Ullrich
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2014 Andrea Tuccia
+ Copyright (C) 2014 Ermal Luçi
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -25,7 +28,6 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-
require_once("globals.inc");
require_once("util.inc");
require_once("functions.inc");
@@ -50,39 +52,39 @@ function ladvd_resync_config() {
$cmdline = "";
if (!empty($ladvd_conf['autoenable'])) {
- $cmdline .= "-a ";
+ $cmdline .= "-a ";
}
if (!empty($ladvd_conf['silent'])) {
- $cmdline .= "-s ";
+ $cmdline .= "-s ";
}
if (!empty($ladvd_conf['management'])) {
- $cmdline .= "-m " . escapeshellarg(get_real_interface($ladvd_conf['management'])) . " ";
+ $cmdline .= "-m " . escapeshellarg(get_real_interface($ladvd_conf['management'])) . " ";
}
if (!empty($ladvd_conf['location'])) {
- $cmdline .= "-l '{$ladvd_conf['location']}' ";
+ $cmdline .= "-l '{$ladvd_conf['location']}' ";
}
if (!empty($ladvd_conf['lldp'])) {
- $cmdline .= "-L ";
+ $cmdline .= "-L ";
}
if (!empty($ladvd_conf['cdp'])) {
- $cmdline .= "-C ";
+ $cmdline .= "-C ";
}
if (!empty($ladvd_conf['edp'])) {
- $cmdline .= "-E ";
+ $cmdline .= "-E ";
}
if (!empty($ladvd_conf['fdp'])) {
- $cmdline .= "-F ";
+ $cmdline .= "-F ";
}
if (!empty($ladvd_conf['ndp'])) {
- $cmdline .= "-N ";
+ $cmdline .= "-N ";
}
$ifaces = explode(",", $ladvd_conf['iface_array']);
@@ -91,7 +93,7 @@ function ladvd_resync_config() {
write_rcfile(array(
"file" => "ladvd.sh",
- "start" => "/usr/local/sbin/ladvd $cmdline",
+ "start" => "/usr/local/sbin/ladvd {$cmdline}",
"stop" => "/usr/bin/killall -9 ladvd"
)
);
diff --git a/config/ladvd/ladvd.xml b/config/ladvd/ladvd.xml
index 0367a19a..5862afca 100644
--- a/config/ladvd/ladvd.xml
+++ b/config/ladvd/ladvd.xml
@@ -1,15 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
+<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
- <![CDATA[
+<![CDATA[
+/* $Id$ */
+/* ====================================================================================== */
/*
ladvd.xml
- Copyright (C) 2006 Scott Ullrich
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2014 Andrea Tuccia
+ Copyright (C) 2014 Ermal Luçi
+ Copyright (C) 2015 ESF, LLC
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.
@@ -17,6 +27,7 @@
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
@@ -28,11 +39,12 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================================== */
]]>
</copyright>
<description>Link Layer Discovery Protocol</description>
<name>LADVD</name>
- <version>1.0.2</version>
+ <version>1.0.4.2</version>
<category>Network Management</category>
<title>Services: LADVD</title>
<savetext>Save</savetext>
@@ -41,13 +53,11 @@
<additional_files_needed>
<item>https://packages.pfsense.org/packages/config/ladvd/ladvd.inc</item>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0644</chmod>
</additional_files_needed>
- <additional_files_needed>
- <prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
- <item>https://packages.pfsense.org/packages/config/ladvd/status_ladvd.php</item>
- </additional_files_needed>
+ <additional_files_needed>
+ <prefix>/usr/local/www/</prefix>
+ <item>https://packages.pfsense.org/packages/config/ladvd/status_ladvd.php</item>
+ </additional_files_needed>
<menu>
<name>LADVD</name>
<tooltiptext>Modify LADVD settings.</tooltiptext>
@@ -59,12 +69,12 @@
<tooltiptext></tooltiptext>
<section>Status</section>
<url>/status_ladvd.php</url>
- </menu>
+ </menu>
<service>
<name>ladvd</name>
<rcfile>ladvd.sh</rcfile>
<executable>ladvd</executable>
- <description>Send and decode link layer advertisements</description>
+ <description>Send and decode link layer advertisements.</description>
</service>
<tabs>
<tab>
@@ -81,7 +91,7 @@
<field>
<fielddescr>Enable ladvd</fielddescr>
<fieldname>enable</fieldname>
- <description>Enable or disable ladvd</description>
+ <description>Enable or disable ladvd.</description>
<enablefields>iface_array[],autoenable,silent,management,location,lldp,cdp,edp,ndp</enablefields>
<type>checkbox</type>
</field>
@@ -92,7 +102,7 @@
<multiple>true</multiple>
<size>3</size>
<type>interfaces_selection</type>
- <description>Select the interfaces that LADVD will bind to. You can use the CTRL or COMMAND key to select multiple interfaces.</description>
+ <description>Select the interfaces that LADVD will bind to. You can use the CTRL or COMMAND key to select multiple interfaces.</description>
</field>
<field>
<fielddescr>Auto-enable protocols</fielddescr>
diff --git a/config/ladvd/status_ladvd.php b/config/ladvd/status_ladvd.php
index 3333145a..86e7187c 100644
--- a/config/ladvd/status_ladvd.php
+++ b/config/ladvd/status_ladvd.php
@@ -1,7 +1,10 @@
<?php
/*
status_ladvd.php
- Copyright (C) 2006 Scott Ullrich
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2014 Andrea Tuccia
+ Copyright (C) 2014 Ermal Luçi
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -15,7 +18,7 @@
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
+ 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
@@ -25,7 +28,6 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-
require("guiconfig.inc");
$pgtitle = "LADVD: Status";
@@ -37,9 +39,9 @@ $control_script = "/usr/local/sbin/ladvdc";
function listCmds() {
global $commands;
echo "<br/>This status page includes the following information:\n";
- echo "<ul width=\"100%\">\n";
+ echo "<ul>\n";
for ($i = 0; isset($commands[$i]); $i++ ) {
- echo "<li><strong><a href=\"#" . $commands[$i][0] . "\">" . $commands[$i][0] . "</a></strong></li>\n";
+ echo "<li><strong><a href=\"#" . str_replace(' ', '_', $commands[$i][0]) . "\">" . $commands[$i][0] . "</a></strong></li>\n";
}
echo "</ul>\n";
}
@@ -59,11 +61,12 @@ function defCmdT($title, $command) {
}
function doCmdT($title, $command) {
- echo "<p>\n";
- echo "<a name=\"" . $title . "\">\n";
+ echo "<div>\n";
+ echo "<a name=\"" . str_replace(' ', '_', $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 */
+ /* no newline after pre */
+ echo "<tr><td class=\"listlr\"><pre>";
$execOutput = "";
$execStatus = "";
@@ -72,47 +75,43 @@ function doCmdT($title, $command) {
echo htmlspecialchars($line, ENT_NOQUOTES);
}
pclose($fd);
- echo "</pre></tr>\n";
+ echo "</pre></td></tr>\n";
echo "</table>\n";
+ echo "</div>\n";
}
?>
-<html>
- <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
- <?php include("fbegin.inc"); ?>
- <?php if ($savemsg) print_info_box($savemsg); ?>
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<?php include("fbegin.inc"); ?>
+<?php if ($savemsg) print_info_box($savemsg); ?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr><td class="tabnavtbl">
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr><td class="tabnavtbl">
<?php
- $tab_array = array();
- $tab_array[] = array(gettext("General"), false, "/pkg_edit.php?xml=ladvd.xml&id=0");
- $tab_array[] = array(gettext("Status"), true, "/status_ladvd.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>
+ $tab_array = array();
+ $tab_array[] = array(gettext("General"), false, "/pkg_edit.php?xml=ladvd.xml&amp;id=0");
+ $tab_array[] = array(gettext("Status"), true, "/status_ladvd.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("LADVD Devices", "{$control_script}");
- defCmdT("LADVD Detailed decode", "{$control_script} -f");
+ defCmdT("LADVD Devices", "{$control_script}");
+ defCmdT("LADVD Detailed decode", "{$control_script} -f");
?>
- <div id="cmdspace" style="width:100%">
- <?php listCmds(); ?>
- <?php execCmds(); ?>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
+ <div id="cmdspace" style="width:100%">
+ <?php listCmds(); ?>
+ <?php execCmds(); ?>
+ </div>
+ </td></tr>
</table>
- <?php include("fend.inc"); ?>
- </body>
+ </div>
+ </td></tr>
+</table>
+<?php include("fend.inc"); ?>
+</body>
</html>