debian/0000755000000000000000000000000011674613732007200 5ustar debian/rules0000755000000000000000000000415611674607205010264 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) TEST_TARGET = else TEST_TARGET = endif config.status: configure dh_testdir # Add here commands to configure the package. ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ LDFLAGS="-Wl,-z,defs" build: build-stamp build-stamp: config.status dh_testdir $(MAKE) touch $@ test: test-stamp test-stamp: build dh_testdir $(MAKE) check touch $@ clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. [ ! -f Makefile ] || $(MAKE) distclean rm -f config.sub config.guess dh_clean install: build $(TEST_TARGET) dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) DESTDIR=$(CURDIR)/debian/ladvd install # remove upstream copyright file rm $(CURDIR)/debian/ladvd/usr/share/doc/ladvd/LICENSE # rename upstream changelog mv $(CURDIR)/debian/ladvd/usr/share/doc/ladvd/ChangeLog \ $(CURDIR)/debian/ladvd/usr/share/doc/ladvd/changelog # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples dh_installinit dh_installman dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/postrm0000644000000000000000000000026111446062047010440 0ustar #!/bin/sh set -e #DEBHELPER# if [ "$1" = "purge" ]; then [ -d /var/run/ladvd ] && rm -rf /var/run/ladvd >/dev/null 2>&1 || : deluser --system --quiet ladvd || : fi debian/control0000644000000000000000000000114111450054655010573 0ustar Source: ladvd Section: net Priority: extra Maintainer: Sten Spans Build-Depends: debhelper (>= 5), autotools-dev, libcap-ng-dev | libcap-dev, libevent-dev, libpci-dev | pciutils-dev, check, pkg-config, lsb-base Standards-Version: 3.9.1 Package: ladvd Architecture: any Depends: adduser, lsb-base, pciutils, ${shlibs:Depends}, ${misc:Depends} Suggests: lsb-release Description: minimal LLDP/CDP sender ladvd sends link layer advertisements on all available interfaces. This makes connected hosts visible on managed switches. By default it will run as a privilege-separated daemon. debian/watch0000644000000000000000000000052711446062047010227 0ustar # Example watch control file for uscan # Rename this file to "watch" and then you can run the "uscan" command # to check for upstream updates and more. # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 # Uncomment to examine a Webserver directory http://www.blinkenlights.nl/software/ladvd/ladvd-(.*)\.tar\.gz debian/copyright0000644000000000000000000000606211446062047011131 0ustar Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 Name: Ladvd Maintainer: Sten Spans Source: http://code.google.com/p/ladvd/ Files: * Copyright: 2008, 2009, 2010 Sten Spans License: ISC Files: src/compat/setproctitle.c Copyright: 2003 Damien Miller 1983, 1995-1997 Eric P. Allman 1988, 1993 The Regents of the University of California. License: BSD Files: src/compat/strlcat.c src/compat/strlcpy.c Copyright: 1998 Todd C. Miller License: ISC Files: src/compat/vis.c Copyright: 1989, 1993 The Regents of the University of California. License: BSD Files: src/compat/vis.h Copyright: 1990 The Regents of the University of California. License: BSD Files: src/compat/sys-queue.h Copyright: 1991, 1993 The Regents of the University of California. License: BSD License: ISC Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. License: BSD Copyright (c) The Regents of the University of California. 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. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. debian/init.d0000644000000000000000000000217211446062047010304 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: ladvd # Required-Start: $network $remote_fs $syslog # Required-Stop: $network $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start ladvd ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin . /lib/lsb/init-functions NAME=ladvd DAEMON=/usr/sbin/$NAME PIDFILE=/var/run/$NAME.pid test -x $DAEMON || exit 5 # Include defaults if available if [ -f /etc/default/$NAME ] ; then . /etc/default/$NAME fi set -e case "$1" in start) # create the privsep empty dir if necessary if [ ! -d /var/run/ladvd ]; then mkdir /var/run/ladvd chmod 0755 /var/run/ladvd fi log_begin_msg "Starting $NAME: " start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE \ --exec $DAEMON -- $DAEMON_OPTS log_end_msg $? ;; stop) log_begin_msg "Stopping $NAME: " start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \ --exec $DAEMON log_end_msg $? ;; restart|force-reload) $0 stop && sleep 2 && $0 start ;; *) echo "Usage: $0 {start|stop|restart|force-reload}" exit 1 ;; esac exit 0 debian/dirs0000644000000000000000000000001111446062047010046 0ustar usr/sbin debian/postinst0000644000000000000000000000034411446062047011001 0ustar #!/bin/sh set -e if [ "$1" = "configure" ]; then if ! getent passwd ladvd >/dev/null; then adduser --system --quiet --group --no-create-home \ --disabled-password --disabled-login ladvd || : fi fi #DEBHELPER# debian/default0000644000000000000000000000030111446062047010533 0ustar # Defaults for ladvd initscript # sourced by /etc/init.d/ladvd # installed at /etc/default/ladvd by the maintainer scripts # Additional options that are passed to the Daemon. DAEMON_OPTS="-a" debian/patches/0000755000000000000000000000000011674610536010626 5ustar debian/patches/series0000644000000000000000000000001611674610534012036 0ustar gcc-4.6-fixes debian/patches/gcc-4.6-fixes0000644000000000000000000000404011674606533012726 0ustar diff -r b83ab1bccaa3 -r f860a9d53454 src/proto/cdp.c --- a/src/proto/cdp.c Tue Jun 28 22:31:23 2011 +0200 +++ b/src/proto/cdp.c Tue Jun 28 22:43:18 2011 +0200 @@ -261,7 +261,6 @@ size_t length; struct cdp_header cdp; - char *tlv; char *pos; tlv_t type; diff -r b83ab1bccaa3 -r f860a9d53454 src/proto/edp.c --- a/src/proto/edp.c Tue Jun 28 22:31:23 2011 +0200 +++ b/src/proto/edp.c Tue Jun 28 22:43:18 2011 +0200 @@ -190,7 +190,6 @@ size_t length; struct edp_header edp; - char *tlv; char *pos; tlv_t type; diff -r b83ab1bccaa3 -r f860a9d53454 src/proto/fdp.c --- a/src/proto/fdp.c Tue Jun 28 22:31:23 2011 +0200 +++ b/src/proto/fdp.c Tue Jun 28 22:43:18 2011 +0200 @@ -216,7 +216,6 @@ size_t length; struct fdp_header fdp; - char *tlv; char *pos; tlv_t type; diff -r b83ab1bccaa3 -r f860a9d53454 src/proto/lldp.c --- a/src/proto/lldp.c Tue Jun 28 22:31:23 2011 +0200 +++ b/src/proto/lldp.c Tue Jun 28 22:43:18 2011 +0200 @@ -412,7 +412,7 @@ char *packet = NULL; size_t length; - char *tlv; + char *pos; tlv_t type; diff -r b83ab1bccaa3 -r f860a9d53454 src/proto/tlv.h --- a/src/proto/tlv.h Tue Jun 28 22:31:23 2011 +0200 +++ b/src/proto/tlv.h Tue Jun 28 22:43:18 2011 +0200 @@ -111,7 +111,6 @@ ) #define GRAB_CDP_TLV(t, l) \ ( \ - tlv = pos, \ GRAB_UINT16(t) && GRAB_UINT16(l) && \ ((l -= 2 * sizeof(uint16_t)) || 1) \ ) @@ -129,8 +128,7 @@ ) #define GRAB_LLDP_TLV(t, l) \ ( \ - tlv = pos, \ - memcpy(&type.uint16, tlv, sizeof(uint16_t)), \ + memcpy(&type.uint16, pos, sizeof(uint16_t)), \ t = ntohs(type.uint16) >> 9, \ l = ntohs(type.uint16) & 0x01ff, \ SKIP(2) \ @@ -149,7 +147,6 @@ ) #define GRAB_EDP_TLV(t, l) \ ( \ - tlv = pos, \ SKIP(1) && GRAB_UINT8(t) && GRAB_UINT16(l) &&\ ((l -= 2 * sizeof(uint16_t)) || 1) \ ) @@ -166,7 +163,6 @@ ) #define GRAB_FDP_TLV(t, l) \ ( \ - tlv = pos, \ GRAB_UINT16(t) && GRAB_UINT16(l) &&\ ((l -= 2 * sizeof(uint16_t)) || 1) \ ) debian/changelog0000644000000000000000000000105711674613732011055 0ustar ladvd (0.9.2-2) unstable; urgency=low * Disable tests during build. Closes: #650670 * Add gcc 4.6 fixes. Closes: #625363 -- Sten Spans Thu, 22 Dec 2011 12:07:36 +0200 ladvd (0.9.2-1.1) unstable; urgency=low * Non maintainer upload. * Build with -Wno-error=unused-but-set-variable. Closes: #625363. -- Matthias Klose Sun, 04 Sep 2011 02:17:51 +0200 ladvd (0.9.2-1) unstable; urgency=low * Initial release (Closes: #572336) -- Sten Spans Mon, 27 Sep 2010 10:44:36 +0200 debian/compat0000644000000000000000000000000211446062047010370 0ustar 5 debian/source/0000755000000000000000000000000011446062047010472 5ustar debian/source/format0000644000000000000000000000001411674605341011703 0ustar 3.0 (quilt)