* [PATCH 4/6] web-user-interface: Add lldp.cgi
2025-11-06 16:46 New Feature: LLDP Michael Tremer
` (2 preceding siblings ...)
2025-11-06 16:46 ` [PATCH 3/6] cfgroot: Create /var/ipfire/lldp/settings Michael Tremer
@ 2025-11-06 16:46 ` Michael Tremer
2025-11-06 16:46 ` [PATCH 5/6] web-user-interface: Add LLDP to the network menu Michael Tremer
2025-11-06 16:46 ` [PATCH 6/6] initscripts: Add an initscript for lldpd Michael Tremer
5 siblings, 0 replies; 9+ messages in thread
From: Michael Tremer @ 2025-11-06 16:46 UTC (permalink / raw)
To: development; +Cc: Michael Tremer
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
config/rootfiles/common/web-user-interface | 1 +
doc/language_issues.de | 1 -
doc/language_issues.en | 7 +-
doc/language_issues.es | 5 +-
doc/language_issues.fr | 5 +-
doc/language_issues.it | 5 +-
doc/language_issues.nl | 5 +-
doc/language_issues.pl | 5 +-
doc/language_issues.ru | 5 +-
doc/language_issues.tr | 5 +-
doc/language_issues.tw | 5 +-
doc/language_issues.zh | 5 +-
doc/language_missings | 36 ++++
html/cgi-bin/lldp.cgi | 240 +++++++++++++++++++++
langs/de/cgi-bin/de.pl | 6 +-
langs/en/cgi-bin/en.pl | 6 +-
langs/es/cgi-bin/es.pl | 2 +-
langs/fr/cgi-bin/fr.pl | 2 +-
langs/nl/cgi-bin/nl.pl | 2 +-
langs/pl/cgi-bin/pl.pl | 2 +-
langs/ru/cgi-bin/ru.pl | 2 +-
langs/tr/cgi-bin/tr.pl | 2 +-
22 files changed, 335 insertions(+), 19 deletions(-)
create mode 100644 html/cgi-bin/lldp.cgi
diff --git a/config/rootfiles/common/web-user-interface b/config/rootfiles/common/web-user-interface
index aa31491d2..29fb52c28 100644
--- a/config/rootfiles/common/web-user-interface
+++ b/config/rootfiles/common/web-user-interface
@@ -29,6 +29,7 @@ srv/web/ipfire/cgi-bin/index.cgi
srv/web/ipfire/cgi-bin/ipblocklist.cgi
srv/web/ipfire/cgi-bin/ipinfo.cgi
srv/web/ipfire/cgi-bin/iptables.cgi
+srv/web/ipfire/cgi-bin/lldp.cgi
srv/web/ipfire/cgi-bin/location-block.cgi
srv/web/ipfire/cgi-bin/logs.cgi
srv/web/ipfire/cgi-bin/logs.cgi/calamaris.dat
diff --git a/doc/language_issues.de b/doc/language_issues.de
index ed9c20449..37be0c63c 100644
--- a/doc/language_issues.de
+++ b/doc/language_issues.de
@@ -218,7 +218,6 @@ WARNING: translation string unused: delete pc
WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
WARNING: translation string unused: deprecated fs warn
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
diff --git a/doc/language_issues.en b/doc/language_issues.en
index e40571450..b2250d8af 100644
--- a/doc/language_issues.en
+++ b/doc/language_issues.en
@@ -548,6 +548,7 @@ WARNING: untranslated string: default IP address = Default IP Address
WARNING: untranslated string: default lease time = Default lease time (mins):
WARNING: untranslated string: default renewal time = Default Renewal Time
WARNING: untranslated string: delete = Delete
+WARNING: untranslated string: description = Description
WARNING: untranslated string: desired = Desired
WARNING: untranslated string: dest ip and port = Dest. IP: Port
WARNING: untranslated string: destination = Destination
@@ -1235,6 +1236,9 @@ WARNING: untranslated string: least preferred = least preferred
WARNING: untranslated string: legend = Legend
WARNING: untranslated string: lifetime = Lifetime:
WARNING: untranslated string: link-layer encapsulation = Link-Layer Encapsulation
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: load average = Load Average
WARNING: untranslated string: local ip address = Local IP Address
WARNING: untranslated string: local ntp server specified but not enabled = Local NTP server specified but not enabled
@@ -1558,7 +1562,7 @@ WARNING: untranslated string: profile name = Profile name:
WARNING: untranslated string: profile name not given = Profile name not given.
WARNING: untranslated string: profile saved = Profile saved:
WARNING: untranslated string: proto = Proto
-WARNING: untranslated string: protocol = Protocol:
+WARNING: untranslated string: protocol = Protocol
WARNING: untranslated string: proxy admin password = Cache administrator password
WARNING: untranslated string: proxy cachemgr = Activate cachemanager
WARNING: untranslated string: proxy errmsg filedescriptors = Wrong amount of filedescriptors
@@ -2140,6 +2144,7 @@ WARNING: untranslated string: version = Version
WARNING: untranslated string: virtual address = Virtual Address
WARNING: untranslated string: virtual private networking = Virtual Private Networking
WARNING: untranslated string: visit us at = Visit us at
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpi number = VPI number:
WARNING: untranslated string: vpn = VPN
WARNING: untranslated string: vpn altname syntax = SubjectAltName is a comma separated list of email, dns, uri, rid and ip objects.<br />email:an email address. Syntax email:copy takes the email field from the cert to be used.<br />DNS:a valid domain name.<br />URI:any valid uri.<br />RID:registered object identifier.<br />IP:an IP address.<br />Note:charset is limited and case is significant.<br />Example:<br /><b>email:</b>ipfire@foo.org<b>,email:</b>copy<b>,DNS:</b>www.ipfire.org<b>,IP:</b>127.0.0.1<b>,URI:</b>http://url/to/something
diff --git a/doc/language_issues.es b/doc/language_issues.es
index ffb077eb0..48c69f189 100644
--- a/doc/language_issues.es
+++ b/doc/language_issues.es
@@ -240,7 +240,6 @@ WARNING: translation string unused: delete pc
WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
WARNING: translation string unused: deprecated fs warn
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
@@ -1075,6 +1074,9 @@ WARNING: untranslated string: ids reports weekly = Send a weekly report
WARNING: untranslated string: ids send email on alert = Send email on alert
WARNING: untranslated string: indirect target selection = Indirect target selection
WARNING: untranslated string: info messages = unknown string
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: mdstat = Mdstat
WARNING: untranslated string: no data = unknown string
WARNING: untranslated string: offloaded = Offloaded
@@ -1107,6 +1109,7 @@ WARNING: untranslated string: rss = RSS
WARNING: untranslated string: rss long = Resident Set Size
WARNING: untranslated string: smt not implemented = Not Implemented
WARNING: untranslated string: transient sheduler attacks = Transient sheduler attacks
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpn deprecated = Deprecated
WARNING: untranslated string: wio = unknown string
WARNING: untranslated string: wio checked = unknown string
diff --git a/doc/language_issues.fr b/doc/language_issues.fr
index 2dbaeb3bc..28408469c 100644
--- a/doc/language_issues.fr
+++ b/doc/language_issues.fr
@@ -240,7 +240,6 @@ WARNING: translation string unused: delete pc
WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
WARNING: translation string unused: deprecated fs warn
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
@@ -1071,6 +1070,9 @@ WARNING: untranslated string: invalid keepalive interval = Invalid Keepalive Int
WARNING: untranslated string: invalid network = Invalid Network
WARNING: untranslated string: ips throughput = Throughput
WARNING: untranslated string: last updated = Last Updated
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: load average = Load Average
WARNING: untranslated string: local port = Local Port
WARNING: untranslated string: local subnets = Local Subnets
@@ -1120,6 +1122,7 @@ WARNING: untranslated string: system time = System Time (as of last page load)
WARNING: untranslated string: timeformat = %Y-%m-%d at %H:%M:%S %Z
WARNING: untranslated string: total = Total
WARNING: untranslated string: transient sheduler attacks = Transient sheduler attacks
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpn deprecated = Deprecated
WARNING: untranslated string: warning = Warning
WARNING: untranslated string: wg client pool = Client Pool
diff --git a/doc/language_issues.it b/doc/language_issues.it
index 4b1685986..e1a71dea0 100644
--- a/doc/language_issues.it
+++ b/doc/language_issues.it
@@ -208,7 +208,6 @@ WARNING: translation string unused: delete pc
WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
WARNING: translation string unused: deprecated fs warn
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
@@ -1263,6 +1262,9 @@ WARNING: untranslated string: ipsec settings = IPsec Settings
WARNING: untranslated string: itlb multihit = iTLB MultiHit
WARNING: untranslated string: last updated = Last Updated
WARNING: untranslated string: link-layer encapsulation = Link-Layer Encapsulation
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: load average = Load Average
WARNING: untranslated string: local ip address = Local IP Address
WARNING: untranslated string: local port = Local Port
@@ -1437,6 +1439,7 @@ WARNING: untranslated string: updxlrtr passive mode = Delivery only/no download
WARNING: untranslated string: uplink bit rate = Uplink Bit Rate
WARNING: untranslated string: user management = User Management
WARNING: untranslated string: version = Version
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpn broken = Broken
WARNING: untranslated string: vpn connecting = CONNECTING
WARNING: untranslated string: vpn deprecated = Deprecated
diff --git a/doc/language_issues.nl b/doc/language_issues.nl
index 0857c00ce..2a5f24b9d 100644
--- a/doc/language_issues.nl
+++ b/doc/language_issues.nl
@@ -209,7 +209,6 @@ WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
WARNING: translation string unused: demon login script
WARNING: translation string unused: deprecated fs warn
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
@@ -1270,6 +1269,9 @@ WARNING: untranslated string: ipsec settings = IPsec Settings
WARNING: untranslated string: itlb multihit = iTLB MultiHit
WARNING: untranslated string: last updated = Last Updated
WARNING: untranslated string: link-layer encapsulation = Link-Layer Encapsulation
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: load average = Load Average
WARNING: untranslated string: local ip address = Local IP Address
WARNING: untranslated string: local port = Local Port
@@ -1457,6 +1459,7 @@ WARNING: untranslated string: updxlrtr passive mode = Delivery only/no download
WARNING: untranslated string: uplink bit rate = Uplink Bit Rate
WARNING: untranslated string: user management = User Management
WARNING: untranslated string: vendor = Vendor
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpn broken = Broken
WARNING: untranslated string: vpn connecting = CONNECTING
WARNING: untranslated string: vpn deprecated = Deprecated
diff --git a/doc/language_issues.pl b/doc/language_issues.pl
index b005b9946..570f4a3d5 100644
--- a/doc/language_issues.pl
+++ b/doc/language_issues.pl
@@ -193,7 +193,6 @@ WARNING: translation string unused: delete cron
WARNING: translation string unused: delete pc
WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
@@ -1399,6 +1398,9 @@ WARNING: untranslated string: last updated = Last Updated
WARNING: untranslated string: least preferred = least preferred
WARNING: untranslated string: lifetime = Lifetime:
WARNING: untranslated string: link-layer encapsulation = Link-Layer Encapsulation
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: load average = Load Average
WARNING: untranslated string: local ip address = Local IP Address
WARNING: untranslated string: local port = Local Port
@@ -1675,6 +1677,7 @@ WARNING: untranslated string: user management = User Management
WARNING: untranslated string: vendor = Vendor
WARNING: untranslated string: version = Version
WARNING: untranslated string: visit us at = Visit us at
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpn broken = Broken
WARNING: untranslated string: vpn connecting = CONNECTING
WARNING: untranslated string: vpn deprecated = Deprecated
diff --git a/doc/language_issues.ru b/doc/language_issues.ru
index 46aa8120f..272998de3 100644
--- a/doc/language_issues.ru
+++ b/doc/language_issues.ru
@@ -192,7 +192,6 @@ WARNING: translation string unused: delete cron
WARNING: translation string unused: delete pc
WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
@@ -1398,6 +1397,9 @@ WARNING: untranslated string: last updated = Last Updated
WARNING: untranslated string: least preferred = least preferred
WARNING: untranslated string: lifetime = Lifetime:
WARNING: untranslated string: link-layer encapsulation = Link-Layer Encapsulation
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: load average = Load Average
WARNING: untranslated string: local ip address = Local IP Address
WARNING: untranslated string: local port = Local Port
@@ -1674,6 +1676,7 @@ WARNING: untranslated string: user management = User Management
WARNING: untranslated string: vendor = Vendor
WARNING: untranslated string: version = Version
WARNING: untranslated string: visit us at = Visit us at
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpn broken = Broken
WARNING: untranslated string: vpn connecting = CONNECTING
WARNING: untranslated string: vpn deprecated = Deprecated
diff --git a/doc/language_issues.tr b/doc/language_issues.tr
index 8e3eb45cb..3b30c7d4c 100644
--- a/doc/language_issues.tr
+++ b/doc/language_issues.tr
@@ -230,7 +230,6 @@ WARNING: translation string unused: delete pc
WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
WARNING: translation string unused: deprecated fs warn
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
@@ -1201,6 +1200,9 @@ WARNING: untranslated string: ipsec settings = IPsec Settings
WARNING: untranslated string: itlb multihit = iTLB MultiHit
WARNING: untranslated string: last updated = Last Updated
WARNING: untranslated string: link-layer encapsulation = Link-Layer Encapsulation
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: load average = Load Average
WARNING: untranslated string: local ip address = Local IP Address
WARNING: untranslated string: local port = Local Port
@@ -1334,6 +1336,7 @@ WARNING: untranslated string: transport mode does not support vti = VTI is not s
WARNING: untranslated string: updxlrtr passive mode = Delivery only/no download mode
WARNING: untranslated string: user management = User Management
WARNING: untranslated string: version = Version
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpn deprecated = Deprecated
WARNING: untranslated string: vpn start action add = Wait for connection initiation
WARNING: untranslated string: vpn subjectaltname missing = SubjectAlternativeName cannot be emtpy.
diff --git a/doc/language_issues.tw b/doc/language_issues.tw
index 2a058e720..9fe0df551 100644
--- a/doc/language_issues.tw
+++ b/doc/language_issues.tw
@@ -242,7 +242,6 @@ WARNING: translation string unused: delete pc
WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
WARNING: translation string unused: deprecated fs warn
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
@@ -1083,6 +1082,9 @@ WARNING: untranslated string: ids reports weekly = Send a weekly report
WARNING: untranslated string: ids send email on alert = Send email on alert
WARNING: untranslated string: indirect target selection = Indirect target selection
WARNING: untranslated string: info messages = unknown string
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: max bandwidth = Maximum bandwidth
WARNING: untranslated string: no data = unknown string
WARNING: untranslated string: offloaded = Offloaded
@@ -1125,6 +1127,7 @@ WARNING: untranslated string: rss = RSS
WARNING: untranslated string: rss long = Resident Set Size
WARNING: untranslated string: smt not implemented = Not Implemented
WARNING: untranslated string: transient sheduler attacks = Transient sheduler attacks
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpn deprecated = Deprecated
WARNING: untranslated string: wio = unknown string
WARNING: untranslated string: wio checked = unknown string
diff --git a/doc/language_issues.zh b/doc/language_issues.zh
index 2a058e720..9fe0df551 100644
--- a/doc/language_issues.zh
+++ b/doc/language_issues.zh
@@ -242,7 +242,6 @@ WARNING: translation string unused: delete pc
WARNING: translation string unused: delete share
WARNING: translation string unused: delete user
WARNING: translation string unused: deprecated fs warn
-WARNING: translation string unused: description
WARNING: translation string unused: destination ip bad
WARNING: translation string unused: destination ip or net
WARNING: translation string unused: destination net
@@ -1083,6 +1082,9 @@ WARNING: untranslated string: ids reports weekly = Send a weekly report
WARNING: untranslated string: ids send email on alert = Send email on alert
WARNING: untranslated string: indirect target selection = Indirect target selection
WARNING: untranslated string: info messages = unknown string
+WARNING: untranslated string: lldp = Link Layer Discovery Protocol
+WARNING: untranslated string: lldp neighbors = Neighbors
+WARNING: untranslated string: lldp there are no neighbors = There are currently no neighbors
WARNING: untranslated string: max bandwidth = Maximum bandwidth
WARNING: untranslated string: no data = unknown string
WARNING: untranslated string: offloaded = Offloaded
@@ -1125,6 +1127,7 @@ WARNING: untranslated string: rss = RSS
WARNING: untranslated string: rss long = Resident Set Size
WARNING: untranslated string: smt not implemented = Not Implemented
WARNING: untranslated string: transient sheduler attacks = Transient sheduler attacks
+WARNING: untranslated string: vlan = VLAN
WARNING: untranslated string: vpn deprecated = Deprecated
WARNING: untranslated string: wio = unknown string
WARNING: untranslated string: wio checked = unknown string
diff --git a/doc/language_missings b/doc/language_missings
index 24602b7d1..bb07f3fab 100644
--- a/doc/language_missings
+++ b/doc/language_missings
@@ -179,6 +179,9 @@
< ids reports weekly
< ids send email on alert
< indirect target selection
+< lldp
+< lldp neighbors
+< lldp there are no neighbors
< mdstat
< offloaded
< online
@@ -206,6 +209,7 @@
< rss long
< smt not implemented
< transient sheduler attacks
+< vlan
< vpn deprecated
< wlanap 802.11ac
< wlanap 802.11ac 160mhz
@@ -287,6 +291,9 @@
< invalid network
< ips throughput
< last updated
+< lldp
+< lldp neighbors
+< lldp there are no neighbors
< load average
< local port
< local subnets
@@ -335,6 +342,7 @@
< total
< transient sheduler attacks
< upload fcdsl.o
+< vlan
< vpn deprecated
< warning
< wg
@@ -768,6 +776,9 @@
< last updated
< legacy architecture warning
< link-layer encapsulation
+< lldp
+< lldp neighbors
+< lldp there are no neighbors
< load average
< local ip address
< local port
@@ -952,6 +963,7 @@
< uplink bit rate
< user management
< version
+< vlan
< vpn broken
< vpn connecting
< vpn deprecated
@@ -1461,6 +1473,9 @@
< last updated
< legacy architecture warning
< link-layer encapsulation
+< lldp
+< lldp neighbors
+< lldp there are no neighbors
< load average
< local ip address
< local port
@@ -1662,6 +1677,7 @@
< uplink bit rate
< user management
< vendor
+< vlan
< vpn broken
< vpn connecting
< vpn deprecated
@@ -2464,6 +2480,9 @@
< legacy architecture warning
< lifetime
< link-layer encapsulation
+< lldp
+< lldp neighbors
+< lldp there are no neighbors
< load average
< local ip address
< local port
@@ -2785,6 +2804,7 @@
< vendor
< version
< visit us at
+< vlan
< vpn broken
< vpn connecting
< vpn deprecated
@@ -3626,6 +3646,9 @@
< legacy architecture warning
< lifetime
< link-layer encapsulation
+< lldp
+< lldp neighbors
+< lldp there are no neighbors
< load average
< local ip address
< local port
@@ -3946,6 +3969,7 @@
< vendor
< version
< visit us at
+< vlan
< vpn broken
< vpn connecting
< vpn deprecated
@@ -4363,6 +4387,9 @@
< last updated
< legacy architecture warning
< link-layer encapsulation
+< lldp
+< lldp neighbors
+< lldp there are no neighbors
< load average
< local ip address
< local port
@@ -4500,6 +4527,7 @@
< updxlrtr passive mode
< user management
< version
+< vlan
< vpn deprecated
< vpn start action add
< vpn subjectaltname missing
@@ -4646,6 +4674,9 @@
< ids reports weekly
< ids send email on alert
< indirect target selection
+< lldp
+< lldp neighbors
+< lldp there are no neighbors
< max bandwidth
< offloaded
< online
@@ -4684,6 +4715,7 @@
< rss long
< smt not implemented
< transient sheduler attacks
+< vlan
< vpn deprecated
< wlanap 802.11ac
< wlanap 802.11ac 160mhz
@@ -4741,6 +4773,9 @@
< ids reports weekly
< ids send email on alert
< indirect target selection
+< lldp
+< lldp neighbors
+< lldp there are no neighbors
< max bandwidth
< offloaded
< online
@@ -4779,6 +4814,7 @@
< rss long
< smt not implemented
< transient sheduler attacks
+< vlan
< vpn deprecated
< wlanap 802.11ac
< wlanap 802.11ac 160mhz
diff --git a/html/cgi-bin/lldp.cgi b/html/cgi-bin/lldp.cgi
new file mode 100644
index 000000000..755d3dc46
--- /dev/null
+++ b/html/cgi-bin/lldp.cgi
@@ -0,0 +1,240 @@
+#!/usr/bin/perl
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2025 Michael Tremer <michael.tremer@ipfire.org> #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+use strict;
+use JSON::PP;
+
+# enable only the following on debugging purpose
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
+
+require "/var/ipfire/general-functions.pl";
+require "${General::swroot}/header.pl";
+
+my %cgiparams = ();
+my @errormessages = ();
+
+# Fetch CGI parameters
+&Header::getcgihash(\%cgiparams, {'wantfile' => 1, 'filevar' => 'FH'});
+
+# Read the settings
+my %settings = ();
+&General::readhash("${General::swroot}/lldp/settings", \%settings);
+
+# Save on main page
+if ($cgiparams{"ACTION"} eq $Lang::tr{'save'}) {
+ # Store whether enabled or not
+ if ($cgiparams{'ENABLED'} =~ m/^(on|off)?$/) {
+ $settings{'ENABLED'} = $cgiparams{'ENABLED'};
+ }
+
+ # XXX Validate the description
+ $settings{"DESCRIPTION"} = $cgiparams{"DESCRIPTION"};
+
+ # Don't continue on error
+ goto MAIN if (scalar @errormessages);
+
+ # Store the configuration file
+ &General::writehash("${General::swroot}/lldp/settings", \%settings);
+
+ # Start if enabled
+ if ($settings{"ENABLED"} eq "on") {
+ &General::system("/usr/local/bin/lldpdctrl", "restart");
+ } else {
+ &General::system("/usr/local/bin/lldpdctrl", "stop");
+ }
+}
+
+# The main page starts here
+MAIN:
+ # Send HTTP Headers
+ &Header::showhttpheaders();
+
+ # Open the page
+ &Header::openpage($Lang::tr{'lldp'}, 1, '');
+
+ # Show any error messages
+ &Header::errorbox(@errormessages);
+
+ # Open a box for Global Settings
+ &Header::openbox('100%', '', $Lang::tr{'global settings'});
+
+ my %checked = (
+ "ENABLED" => ($settings{"ENABLED"} eq "on") ? "checked" : "",
+ );
+
+ print <<END;
+ <form method="POST" action="">
+ <table class="form">
+ <tr>
+ <td>$Lang::tr{'enabled'}</td>
+ <td>
+ <input type="checkbox" name="ENABLED" $checked{'ENABLED'} />
+ </td>
+ </tr>
+
+ <tr>
+ <td>$Lang::tr{'description'}</td>
+ <td>
+ <input type="text" name="DESCRIPTION" value="$settings{'DESCRIPTION'}" />
+ </td>
+ </tr>
+
+ <tr class="action">
+ <td colspan="2">
+ <input type='submit' name='ACTION' value='$Lang::tr{'save'}' />
+ </td>
+ </tr>
+ </table>
+ </form>
+END
+ &Header::closebox();
+
+ # Load data about all peers
+ my @output = &General::system_output("lldpctl", "-f", "json0");
+
+ my $json;
+
+ # Parse the JSON output
+ eval {
+ $json = decode_json join("\n", @output);
+ 1;
+ } or do {
+ $json = undef;
+ };
+
+ # Show a list with all peers if the service is enabled
+ if ($settings{"ENABLED"} eq "on") {
+ &Header::opensection($Lang::tr{'lldp neighbors'});
+
+ # Fetch the interface object
+ my $interface = $json->{"lldp"}[0]->{"interface"};
+
+ print <<END;
+ <table class='tbl'>
+ <tr>
+ <th>
+ $Lang::tr{'name'}
+ </th>
+
+ <th>
+ $Lang::tr{'interface'}
+ </th>
+
+ <th>
+ $Lang::tr{'port'}
+ </th>
+
+ <th style="text-align: right;">
+ $Lang::tr{'vlan'}
+ </th>
+
+ <th>
+ $Lang::tr{'protocol'}
+ </th>
+
+ <th>
+ $Lang::tr{'description'}
+ </th>
+ </tr>
+END
+
+ foreach my $peer (@{ $interface }) {
+ my $intf = $peer->{"name"};
+ my $proto = $peer->{"via"};
+ my $name = "";
+ my $descr = "";
+ my $port_name = "";
+ my $vlan_id = "";
+
+ # Fetch the chassis
+ foreach my $chassis (@{ $peer->{"chassis"} }) {
+ $name = &Header::escape(
+ $chassis->{"name"}[0]->{"value"}
+ );;
+ $descr = &Header::escape(
+ $chassis->{"descr"}[0]->{"value"}
+ );
+
+ # Replace any line breaks in the description
+ $descr =~ s/\n/<br>/g;
+ }
+
+ # Fetch the port
+ foreach my $port (@{ $peer->{"port"} }) {
+ $port_name = $port->{"descr"}[0]->{"value"};
+ }
+
+ # Fetch the VLAN
+ foreach my $vlan (@{ $peer->{"vlan"} }) {
+ $vlan_id = $vlan->{"vlan-id"};
+ }
+
+ print <<END;
+ <tr>
+ <th scope="row">
+ $name
+ </th>
+
+ <td>
+ $intf
+ </td>
+
+ <td>
+ $port_name
+ </td>
+
+ <td style="text-align: right;">
+ $vlan_id
+ </td>
+
+ <td>
+ $proto
+ </td>
+
+ <td>
+ $descr
+ </td>
+ </tr>
+END
+ }
+
+ # Show a message if there are no neighbors
+ unless (scalar @{ $interface }) {
+ print <<END;
+ <tr>
+ <td colspan="6" style="text-align: center;">
+ $Lang::tr{'lldp there are no neighbors'}
+ </td>
+ </tr>
+END
+ }
+
+ print <<END;
+ </table>
+END
+
+ &Header::closesection();
+ }
+
+ &Header::closepage();
+
+ exit(0);
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index 55804a897..132c04ff1 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -1639,6 +1639,9 @@
'lifetime' => 'Lebensdauer:',
'line' => 'Leitung',
'linkq' => 'Antwortzeit',
+'lldp' => 'Link-Layer-Discovery-Protokoll',
+'lldp neighbors' => 'Nachbarn',
+'lldp there are no neighbors' => 'Aktuell gibt es keine Nachbarn',
'load average' => 'Load Average',
'load printer' => 'Lade Drucker',
'loaded modules' => 'Geladene Module:',
@@ -2140,7 +2143,7 @@
'profile saved' => 'Profil gespeichert: ',
'profiles' => 'Profile:',
'proto' => 'Proto',
-'protocol' => 'Protokoll:',
+'protocol' => 'Protokoll',
'proxy' => 'Proxy',
'proxy access graphs' => 'Diagramme zur Proxyauslastung',
'proxy admin password' => 'Cache Administrator Passwort',
@@ -2920,6 +2923,7 @@
'virtual private networking' => 'Virtuelles Privates Netzwerk',
'visible in browselist' => 'Sichtbar in der Verzeichnisliste',
'visit us at' => 'Besuchen Sie uns auf',
+'vlan' => 'VLAN',
'voldown10' => 'Laustärke um 10 verringern',
'voldown5' => 'Laustärke um 5 verringern',
'volup10' => 'Laustärke um 10 erhöhen',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index 08967bc84..9cef3edd2 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -1705,6 +1705,9 @@
'line' => 'Line',
'link-layer encapsulation' => 'Link-Layer Encapsulation',
'linkq' => 'Link Quality',
+'lldp' => 'Link Layer Discovery Protocol',
+'lldp neighbors' => 'Neighbors',
+'lldp there are no neighbors' => 'There are currently no neighbors',
'load average' => 'Load Average',
'load printer' => 'Load Printer',
'loaded modules' => 'Loaded modules:',
@@ -2227,7 +2230,7 @@
'profile saved' => 'Profile saved: ',
'profiles' => 'Profiles:',
'proto' => 'Proto',
-'protocol' => 'Protocol:',
+'protocol' => 'Protocol',
'proxy' => 'Proxy',
'proxy access graphs' => 'Proxy access graphs',
'proxy admin password' => 'Cache administrator password',
@@ -3032,6 +3035,7 @@
'virtual private networking' => 'Virtual Private Networking',
'visible in browselist' => 'visible in browselist',
'visit us at' => 'Visit us at',
+'vlan' => 'VLAN',
'voldown10' => 'Decrease volume by 10',
'voldown5' => 'Decrease volume by 5',
'volup10' => 'Increase volume by 10',
diff --git a/langs/es/cgi-bin/es.pl b/langs/es/cgi-bin/es.pl
index a4764e6cb..fb529805e 100644
--- a/langs/es/cgi-bin/es.pl
+++ b/langs/es/cgi-bin/es.pl
@@ -2194,7 +2194,7 @@
'profile saved' => 'Perfil guardado:',
'profiles' => 'Perfiles:',
'proto' => 'Proto',
-'protocol' => 'Protocolo:',
+'protocol' => 'Protocolo',
'proxy' => 'Proxy',
'proxy access graphs' => 'Gráficas de acceso al proxy',
'proxy admin password' => 'Contraseña del Administrador del Caché',
diff --git a/langs/fr/cgi-bin/fr.pl b/langs/fr/cgi-bin/fr.pl
index a7085b773..57db1f394 100644
--- a/langs/fr/cgi-bin/fr.pl
+++ b/langs/fr/cgi-bin/fr.pl
@@ -2161,7 +2161,7 @@
'profile saved' => 'Profil sauvegardé:',
'profiles' => 'Profils :',
'proto' => 'Proto',
-'protocol' => 'Protocole :',
+'protocol' => 'Protocole',
'proxy' => 'Proxy',
'proxy access graphs' => 'Graphiques des accès proxy',
'proxy admin password' => 'Mot de passe admnistrateur du cache',
diff --git a/langs/nl/cgi-bin/nl.pl b/langs/nl/cgi-bin/nl.pl
index 17db7389f..c4612da4a 100644
--- a/langs/nl/cgi-bin/nl.pl
+++ b/langs/nl/cgi-bin/nl.pl
@@ -1764,7 +1764,7 @@
'profile saved' => 'Profiel opgeslagen: ',
'profiles' => 'Profielen:',
'proto' => 'Proto',
-'protocol' => 'Protocol:',
+'protocol' => 'Protocol',
'proxy' => 'Proxy',
'proxy access graphs' => 'Proxy toegangsgrafieken',
'proxy admin password' => 'Cache beheerder wachtwoord',
diff --git a/langs/pl/cgi-bin/pl.pl b/langs/pl/cgi-bin/pl.pl
index 0326a37e6..0972de0b3 100644
--- a/langs/pl/cgi-bin/pl.pl
+++ b/langs/pl/cgi-bin/pl.pl
@@ -1429,7 +1429,7 @@
'profile saved' => 'Zapisano profil: ',
'profiles' => 'Profile:',
'proto' => 'Proto',
-'protocol' => 'Protokół:',
+'protocol' => 'Protokół',
'proxy' => 'Proxy',
'proxy access graphs' => 'Wykresy dostępu do Proxy',
'proxy admin password' => 'Hasło administratora Cache',
diff --git a/langs/ru/cgi-bin/ru.pl b/langs/ru/cgi-bin/ru.pl
index ae4450fe3..8472e1fde 100644
--- a/langs/ru/cgi-bin/ru.pl
+++ b/langs/ru/cgi-bin/ru.pl
@@ -1424,7 +1424,7 @@
'profile saved' => 'Профиль сохранён: ',
'profiles' => 'Профили:',
'proto' => 'Proto',
-'protocol' => 'Протокол:',
+'protocol' => 'Протокол',
'proxy' => 'Proxy',
'proxy access graphs' => 'Proxy access graphs',
'proxy admin password' => 'Cache administrator password',
diff --git a/langs/tr/cgi-bin/tr.pl b/langs/tr/cgi-bin/tr.pl
index ad8fec7eb..320ff2018 100644
--- a/langs/tr/cgi-bin/tr.pl
+++ b/langs/tr/cgi-bin/tr.pl
@@ -1935,7 +1935,7 @@
'profile saved' => 'Kaydedilen profiller: ',
'profiles' => 'Profiller:',
'proto' => 'Kural',
-'protocol' => 'Kural ',
+'protocol' => 'Kural',
'proxy' => 'Vekil sunucu',
'proxy access graphs' => 'Vekil sunucu erişim grafiği',
'proxy admin password' => 'Önbellek yönetici parolası',
--
2.47.3
^ permalink raw reply [flat|nested] 9+ messages in thread