aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/lldpd
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/services/lldpd')
-rw-r--r--package/network/services/lldpd/.svn/entries68
-rw-r--r--package/network/services/lldpd/.svn/text-base/Makefile.svn-base62
-rw-r--r--package/network/services/lldpd/Makefile62
-rw-r--r--package/network/services/lldpd/files/.svn/entries96
-rw-r--r--package/network/services/lldpd/files/.svn/text-base/lldpd.config.svn-base15
-rw-r--r--package/network/services/lldpd/files/.svn/text-base/lldpd.init.svn-base72
-rw-r--r--package/network/services/lldpd/files/lldpd.config15
-rw-r--r--package/network/services/lldpd/files/lldpd.init72
-rw-r--r--package/network/services/lldpd/patches/.svn/entries62
-rw-r--r--package/network/services/lldpd/patches/.svn/text-base/002-no-stack-protector.patch.svn-base10
-rw-r--r--package/network/services/lldpd/patches/002-no-stack-protector.patch10
11 files changed, 544 insertions, 0 deletions
diff --git a/package/network/services/lldpd/.svn/entries b/package/network/services/lldpd/.svn/entries
new file mode 100644
index 0000000..17155ad
--- /dev/null
+++ b/package/network/services/lldpd/.svn/entries
@@ -0,0 +1,68 @@
+10
+
+dir
+36060
+svn://svn.openwrt.org/openwrt/trunk/package/network/services/lldpd
+svn://svn.openwrt.org/openwrt
+
+
+
+2013-01-02T14:35:43.615288Z
+34970
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3c298f89-4303-0410-b956-a3cf2f4a3e73
+
+files
+dir
+
+patches
+dir
+
+Makefile
+file
+
+
+
+
+2013-03-17T12:13:19.000000Z
+55090a14c621d8bafd253db9995ccfc5
+2013-01-02T14:35:43.615288Z
+34970
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1700
+
diff --git a/package/network/services/lldpd/.svn/text-base/Makefile.svn-base b/package/network/services/lldpd/.svn/text-base/Makefile.svn-base
new file mode 100644
index 0000000..f0983f7
--- /dev/null
+++ b/package/network/services/lldpd/.svn/text-base/Makefile.svn-base
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2008-2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lldpd
+PKG_VERSION:=0.6.1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd
+PKG_MD5SUM:=d2f9ae67e0bcce0206a3a501a81d0738
+
+PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lldpd
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Routing and Redirection
+ TITLE:=Link Layer Discovery Protocol daemon
+ URL:=https://github.com/vincentbernat/lldpd/wiki
+ DEPENDS:=+libevent2
+endef
+
+define Package/lldpd/description
+ LLDP (Link Layer Discovery Protocol) is an industry standard protocol designed
+ to supplant proprietary Link-Layer protocols such as
+ Extreme's EDP (Extreme Discovery Protocol) and
+ CDP (Cisco Discovery Protocol).
+ The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver
+ Link-Layer notifications to adjacent network devices.
+endef
+
+define Package/lldpd/install
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/sbin
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lldp{ctl,d} $(1)/usr/sbin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblldpctl.so* $(1)/usr/lib/
+ $(INSTALL_BIN) ./files/lldpd.init $(1)/etc/init.d/lldpd
+ $(INSTALL_DATA) ./files/lldpd.config $(1)/etc/config/lldpd
+endef
+
+define Package/lldpd/conffiles
+/etc/config/lldpd
+endef
+
+CONFIGURE_ARGS += \
+ --with-privsep-user=lldp \
+ --with-privsep-group=lldp \
+ --with-privsep-chroot=/var/run/lldp
+
+$(eval $(call BuildPackage,lldpd))
diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile
new file mode 100644
index 0000000..f0983f7
--- /dev/null
+++ b/package/network/services/lldpd/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2008-2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lldpd
+PKG_VERSION:=0.6.1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd
+PKG_MD5SUM:=d2f9ae67e0bcce0206a3a501a81d0738
+
+PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lldpd
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Routing and Redirection
+ TITLE:=Link Layer Discovery Protocol daemon
+ URL:=https://github.com/vincentbernat/lldpd/wiki
+ DEPENDS:=+libevent2
+endef
+
+define Package/lldpd/description
+ LLDP (Link Layer Discovery Protocol) is an industry standard protocol designed
+ to supplant proprietary Link-Layer protocols such as
+ Extreme's EDP (Extreme Discovery Protocol) and
+ CDP (Cisco Discovery Protocol).
+ The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver
+ Link-Layer notifications to adjacent network devices.
+endef
+
+define Package/lldpd/install
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/sbin
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lldp{ctl,d} $(1)/usr/sbin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblldpctl.so* $(1)/usr/lib/
+ $(INSTALL_BIN) ./files/lldpd.init $(1)/etc/init.d/lldpd
+ $(INSTALL_DATA) ./files/lldpd.config $(1)/etc/config/lldpd
+endef
+
+define Package/lldpd/conffiles
+/etc/config/lldpd
+endef
+
+CONFIGURE_ARGS += \
+ --with-privsep-user=lldp \
+ --with-privsep-group=lldp \
+ --with-privsep-chroot=/var/run/lldp
+
+$(eval $(call BuildPackage,lldpd))
diff --git a/package/network/services/lldpd/files/.svn/entries b/package/network/services/lldpd/files/.svn/entries
new file mode 100644
index 0000000..e2b4e69
--- /dev/null
+++ b/package/network/services/lldpd/files/.svn/entries
@@ -0,0 +1,96 @@
+10
+
+dir
+36060
+svn://svn.openwrt.org/openwrt/trunk/package/network/services/lldpd/files
+svn://svn.openwrt.org/openwrt
+
+
+
+2013-01-02T14:35:43.615288Z
+34970
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3c298f89-4303-0410-b956-a3cf2f4a3e73
+
+lldpd.init
+file
+
+
+
+
+2013-03-17T12:13:19.000000Z
+aeefcca799b8ff00558af620766797c3
+2013-01-02T14:35:43.615288Z
+34970
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1854
+
+lldpd.config
+file
+
+
+
+
+2013-03-17T12:13:19.000000Z
+0b6222785562db13bf3570bcdb741234
+2013-01-02T14:35:43.615288Z
+34970
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+362
+
diff --git a/package/network/services/lldpd/files/.svn/text-base/lldpd.config.svn-base b/package/network/services/lldpd/files/.svn/text-base/lldpd.config.svn-base
new file mode 100644
index 0000000..48728e0
--- /dev/null
+++ b/package/network/services/lldpd/files/.svn/text-base/lldpd.config.svn-base
@@ -0,0 +1,15 @@
+config lldpd config
+ option enable_cdp 1
+ option enable_fdp 1
+ option enable_sonmp 1
+ option enable_edp 1
+
+ option lldp_class 4
+ option lldp_location "2:FR:6:Commercial Rd:3:Roseville:19:4"
+
+ # if empty, the distribution description is sent
+ #option lldp_description "OpenWrt System"
+
+ # interfaces to listen on
+ list interface "loopback"
+ list interface "lan"
diff --git a/package/network/services/lldpd/files/.svn/text-base/lldpd.init.svn-base b/package/network/services/lldpd/files/.svn/text-base/lldpd.init.svn-base
new file mode 100644
index 0000000..3599950
--- /dev/null
+++ b/package/network/services/lldpd/files/.svn/text-base/lldpd.init.svn-base
@@ -0,0 +1,72 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2012 OpenWrt.org
+
+START=90
+
+SERVICE_USE_PID=1
+
+find_release_info()
+{
+ [ -s /etc/openwrt_release ] && . /etc/openwrt_release
+ [ -z "$DISTRIB_DESCRIPTION" ] && [ -s /etc/openwrt_version ] && \
+ DISTRIB_DESCRIPTION="$(cat /etc/openwrt_version)"
+
+ echo "${DISTRIB_DESCRIPTION:-Unknown OpenWrt release} @ $(cat /proc/sys/kernel/hostname)"
+}
+
+start() {
+ . /lib/functions/network.sh
+
+ local enable_cdp
+ local enable_fdp
+ local enable_sonmp
+ local enable_edp
+ local lldp_class
+ local lldp_location
+ local lldp_description
+
+ config_load 'lldpd'
+ config_get_bool enable_cdp 'config' 'enable_cdp' 0
+ config_get_bool enable_fdp 'config' 'enable_fdp' 0
+ config_get_bool enable_sonmp 'config' 'enable_sonmp' 0
+ config_get_bool enable_edp 'config' 'enable_edp' 0
+ config_get lldp_class 'config' 'lldp_class'
+ config_get lldp_location 'config' 'lldp_location'
+ config_get lldp_description 'config' 'lldp_description' "$(find_release_info)"
+
+ local ifaces
+ config_get ifaces 'config' 'interface'
+
+ local iface
+ for iface in $ifaces; do
+ local ifname=""
+ if network_get_device ifname "$iface" || [ -e "/sys/class/net/$iface" ]; then
+ append args "-I ${ifname:-$iface}"
+ fi
+ done
+
+ [ $enable_cdp -gt 0 ] && append args '-c'
+ [ $enable_fdp -gt 0 ] && append args '-f'
+ [ $enable_sonmp -gt 0 ] && append args '-s'
+ [ $enable_edp -gt 0 ] && append args '-e'
+
+ user_exists lldp 121 || user_add lldp 121 129
+ group_exists lldp 129 || group_add lldp 129
+
+ mkdir -p /var/run/lldp
+ chown lldp:lldp /var/run/lldp
+
+ service_start /usr/sbin/lldpd $args \
+ ${lldp_class:+ -M $lldp_class} \
+ ${lldp_description:+ -S "$lldp_description"}
+
+ [ -n "$lldp_location" ] && {
+ sleep 1
+ /usr/sbin/lldpctl -L "$lldp_location" > /dev/null 2>&1
+ }
+}
+
+stop() {
+ service_stop /usr/sbin/lldpd
+ rm -f /var/run/lldpd.socket /var/run/lldpd.pid
+}
diff --git a/package/network/services/lldpd/files/lldpd.config b/package/network/services/lldpd/files/lldpd.config
new file mode 100644
index 0000000..48728e0
--- /dev/null
+++ b/package/network/services/lldpd/files/lldpd.config
@@ -0,0 +1,15 @@
+config lldpd config
+ option enable_cdp 1
+ option enable_fdp 1
+ option enable_sonmp 1
+ option enable_edp 1
+
+ option lldp_class 4
+ option lldp_location "2:FR:6:Commercial Rd:3:Roseville:19:4"
+
+ # if empty, the distribution description is sent
+ #option lldp_description "OpenWrt System"
+
+ # interfaces to listen on
+ list interface "loopback"
+ list interface "lan"
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
new file mode 100644
index 0000000..3599950
--- /dev/null
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -0,0 +1,72 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2012 OpenWrt.org
+
+START=90
+
+SERVICE_USE_PID=1
+
+find_release_info()
+{
+ [ -s /etc/openwrt_release ] && . /etc/openwrt_release
+ [ -z "$DISTRIB_DESCRIPTION" ] && [ -s /etc/openwrt_version ] && \
+ DISTRIB_DESCRIPTION="$(cat /etc/openwrt_version)"
+
+ echo "${DISTRIB_DESCRIPTION:-Unknown OpenWrt release} @ $(cat /proc/sys/kernel/hostname)"
+}
+
+start() {
+ . /lib/functions/network.sh
+
+ local enable_cdp
+ local enable_fdp
+ local enable_sonmp
+ local enable_edp
+ local lldp_class
+ local lldp_location
+ local lldp_description
+
+ config_load 'lldpd'
+ config_get_bool enable_cdp 'config' 'enable_cdp' 0
+ config_get_bool enable_fdp 'config' 'enable_fdp' 0
+ config_get_bool enable_sonmp 'config' 'enable_sonmp' 0
+ config_get_bool enable_edp 'config' 'enable_edp' 0
+ config_get lldp_class 'config' 'lldp_class'
+ config_get lldp_location 'config' 'lldp_location'
+ config_get lldp_description 'config' 'lldp_description' "$(find_release_info)"
+
+ local ifaces
+ config_get ifaces 'config' 'interface'
+
+ local iface
+ for iface in $ifaces; do
+ local ifname=""
+ if network_get_device ifname "$iface" || [ -e "/sys/class/net/$iface" ]; then
+ append args "-I ${ifname:-$iface}"
+ fi
+ done
+
+ [ $enable_cdp -gt 0 ] && append args '-c'
+ [ $enable_fdp -gt 0 ] && append args '-f'
+ [ $enable_sonmp -gt 0 ] && append args '-s'
+ [ $enable_edp -gt 0 ] && append args '-e'
+
+ user_exists lldp 121 || user_add lldp 121 129
+ group_exists lldp 129 || group_add lldp 129
+
+ mkdir -p /var/run/lldp
+ chown lldp:lldp /var/run/lldp
+
+ service_start /usr/sbin/lldpd $args \
+ ${lldp_class:+ -M $lldp_class} \
+ ${lldp_description:+ -S "$lldp_description"}
+
+ [ -n "$lldp_location" ] && {
+ sleep 1
+ /usr/sbin/lldpctl -L "$lldp_location" > /dev/null 2>&1
+ }
+}
+
+stop() {
+ service_stop /usr/sbin/lldpd
+ rm -f /var/run/lldpd.socket /var/run/lldpd.pid
+}
diff --git a/package/network/services/lldpd/patches/.svn/entries b/package/network/services/lldpd/patches/.svn/entries
new file mode 100644
index 0000000..4d3739c
--- /dev/null
+++ b/package/network/services/lldpd/patches/.svn/entries
@@ -0,0 +1,62 @@
+10
+
+dir
+36060
+svn://svn.openwrt.org/openwrt/trunk/package/network/services/lldpd/patches
+svn://svn.openwrt.org/openwrt
+
+
+
+2012-10-12T11:58:19.209594Z
+33729
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3c298f89-4303-0410-b956-a3cf2f4a3e73
+
+002-no-stack-protector.patch
+file
+
+
+
+
+2013-03-17T12:13:19.000000Z
+8e86a48475025e3667815b3be7fae1fa
+2012-10-12T11:58:19.209594Z
+33729
+jow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+394
+
diff --git a/package/network/services/lldpd/patches/.svn/text-base/002-no-stack-protector.patch.svn-base b/package/network/services/lldpd/patches/.svn/text-base/002-no-stack-protector.patch.svn-base
new file mode 100644
index 0000000..dc861ba
--- /dev/null
+++ b/package/network/services/lldpd/patches/.svn/text-base/002-no-stack-protector.patch.svn-base
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -62,7 +62,6 @@ AX_CFLAGS_GCC_OPTION([-Wformat])
+ AX_CFLAGS_GCC_OPTION([-Wformat-security])
+ AX_CFLAGS_GCC_OPTION([-Wcast-align])
+ AX_CFLAGS_GCC_OPTION([-Winline])
+-AX_CFLAGS_GCC_OPTION([-fstack-protector])
+ AX_CFLAGS_GCC_OPTION([-D_FORTIFY_SOURCE=2])
+ AX_CFLAGS_GCC_OPTION([-Wdeclaration-after-statement])
+ AX_CFLAGS_GCC_OPTION([-Wno-unused-parameter])
diff --git a/package/network/services/lldpd/patches/002-no-stack-protector.patch b/package/network/services/lldpd/patches/002-no-stack-protector.patch
new file mode 100644
index 0000000..dc861ba
--- /dev/null
+++ b/package/network/services/lldpd/patches/002-no-stack-protector.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -62,7 +62,6 @@ AX_CFLAGS_GCC_OPTION([-Wformat])
+ AX_CFLAGS_GCC_OPTION([-Wformat-security])
+ AX_CFLAGS_GCC_OPTION([-Wcast-align])
+ AX_CFLAGS_GCC_OPTION([-Winline])
+-AX_CFLAGS_GCC_OPTION([-fstack-protector])
+ AX_CFLAGS_GCC_OPTION([-D_FORTIFY_SOURCE=2])
+ AX_CFLAGS_GCC_OPTION([-Wdeclaration-after-statement])
+ AX_CFLAGS_GCC_OPTION([-Wno-unused-parameter])