From 6c79f4d46a7f3ea42094e33e123001d6fbf0546b Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 18 Feb 2014 19:41:20 +0000 Subject: Add ladvd package from Ticket #3456. With modification to bring it to current levels and pfsense urls. --- config/ladvd/ladvd.inc | 104 +++++++++++++++++++++++++++++ config/ladvd/ladvd.xml | 149 ++++++++++++++++++++++++++++++++++++++++++ config/ladvd/status_ladvd.php | 118 +++++++++++++++++++++++++++++++++ 3 files changed, 371 insertions(+) create mode 100644 config/ladvd/ladvd.inc create mode 100644 config/ladvd/ladvd.xml create mode 100644 config/ladvd/status_ladvd.php (limited to 'config') diff --git a/config/ladvd/ladvd.inc b/config/ladvd/ladvd.inc new file mode 100644 index 00000000..acf277b3 --- /dev/null +++ b/config/ladvd/ladvd.inc @@ -0,0 +1,104 @@ + "ladvd.sh", + "start" => "/usr/local/sbin/ladvd $cmdline", + "stop" => "/usr/bin/killall -9 ladvd" + ) + ); + + restart_service("ladvd"); + sleep(1); + conf_mount_ro(); +} + +?> diff --git a/config/ladvd/ladvd.xml b/config/ladvd/ladvd.xml new file mode 100644 index 00000000..d250f16c --- /dev/null +++ b/config/ladvd/ladvd.xml @@ -0,0 +1,149 @@ + + + + + + Link Layer Discovery Protocol + LADVD + 1.0.2 + Network Management + Services: LADVD + ladvd + /usr/local/pkg/ladvd.inc + /pkg_edit.php?xml=ladvd.xml&id=0 + + http://www.pfsense.com/packages/config/ladvd/ladvd.inc + /usr/local/pkg/ + 0644 + + + /usr/local/www/ + 0755 + http://www.pfsense.com/packages/config/ladvd/status_ladvd.php + + + LADVD + Modify LADVD settings. +
Services
+ /pkg_edit.php?xml=ladvd.xml&id=0 +
+ + LADVD Status + +
Status
+ /status_ladvd.php +
+ + ladvd + ladvd.sh + ladvd + Send and decode link layer advertisements + + + + General + /pkg_edit.php?xml=ladvd.xml&id=0 + + + + Status + /status_ladvd.php + + + + + Enable ladvd + enable + Enable or disable ladvd + iface_array[],autoenable,silent,management,location,lldp,cdp,edp,ndp + checkbox + + + Interfaces + iface_array + lan + true + 3 + interfaces_selection + Select the interfaces that LADVD will bind to. You can use the CTRL or COMMAND key to select multiple interfaces. + + + Auto-enable protocols + autoenable + Auto-enable protocols based on received packets (also enables receive mode). + checkbox + + + Silent + silent + Silent, don't transmit packets. + checkbox + + + Management interfaces + management + lan + interfaces_selection + The management interface for this host. Addresses on this interface are auto-detected (IPv4 and IPv6). + + + System Location + location + input + 30 + Specify the physical location of the host. + + + Enable LLDP + lldp + Enable LLDP (Link Layer Discovery Protocol). + checkbox + + + Enable CDP + cdp + Enable CDP (Cisco Discovery Protocol). + checkbox + + + Enable EDP + edp + Enable EDP (Extreme Discovery Protocol). + checkbox + + + Enable NDP + ndp + Enable NDP (Nortel Discovery Protocol) formerly called SynOptics Network Management Protocol (SONMP). + checkbox + + + ladvd_resync_config(); +
diff --git a/config/ladvd/status_ladvd.php b/config/ladvd/status_ladvd.php new file mode 100644 index 00000000..3333145a --- /dev/null +++ b/config/ladvd/status_ladvd.php @@ -0,0 +1,118 @@ +This status page includes the following information:\n"; + echo "\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 "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
" . $title . "
";		/* no newline after pre */
+
+	$execOutput = "";
+	$execStatus = "";
+	$fd = popen("{$command} 2>&1", "r");
+	while (($line = fgets($fd)) !== FALSE) {
+		echo htmlspecialchars($line, ENT_NOQUOTES);
+	}
+	pclose($fd);
+	echo "
\n"; +} + +?> + + + + + + + + + + + +
+ +
+
+ + + + +
+ +
+ + +
+
+
+
+ + + -- cgit v1.2.3